mirror of
https://github.com/jmagar/unraid-mcp.git
synced 2026-03-23 12:39:24 -07:00
fix: address 14 PR review comments from coderabbitai/chatgpt-codex
- guards.py: split confirm bypass into explicit check; use .get() for dict description to prevent KeyError on missing action keys - resources.py: use `is not None` for logs stream cache check; add on-demand subscribe_once fallback when auto_start is disabled so resources return real data instead of a perpetual "connecting" placeholder - setup.py: always prompt before overwriting credentials even on failed probe (transient outage ≠ bad credentials); update elicitation message - unraid.py: always elicit_reset_confirmation before overwriting creds; use asyncio.to_thread() for os.path.realpath() to avoid blocking async - test_health.py: update test for new always-prompt-on-overwrite behavior; add test for declined-reset on failed probe - test_resources.py: add tests for logs-stream None check, auto_start disabled fallback (success and failure), and fallback error recovery - test-tools.sh: add suite_live() covering cpu/memory/cpu_telemetry/ notifications_overview/log_tail; include in sequential and parallel runners - CLAUDE.md: correct unraid_live → live action reference; document that setup always prompts before overwriting; note subscribe_once fallback
This commit is contained in:
@@ -600,6 +600,18 @@ suite_oidc() {
|
||||
# provider and validate_session require IDs — skipped
|
||||
}
|
||||
|
||||
suite_live() {
|
||||
printf '\n%b== live (snapshot subscriptions) ==%b\n' "${C_BOLD}" "${C_RESET}" | tee -a "${LOG_FILE}"
|
||||
# Note: these subactions open a transient WebSocket and wait for the first event.
|
||||
# Event-driven actions (parity_progress, ups_status, notifications_overview,
|
||||
# owner, server_status) return status=no_recent_events when no events arrive.
|
||||
run_test "live: cpu" '{"action":"live","subaction":"cpu"}'
|
||||
run_test "live: memory" '{"action":"live","subaction":"memory"}'
|
||||
run_test "live: cpu_telemetry" '{"action":"live","subaction":"cpu_telemetry"}'
|
||||
run_test "live: notifications_overview" '{"action":"live","subaction":"notifications_overview"}'
|
||||
run_test "live: log_tail" '{"action":"live","subaction":"log_tail"}'
|
||||
}
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Print final summary
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -650,6 +662,7 @@ run_parallel() {
|
||||
suite_customization
|
||||
suite_plugin
|
||||
suite_oidc
|
||||
suite_live
|
||||
)
|
||||
|
||||
local pids=()
|
||||
@@ -705,6 +718,7 @@ run_sequential() {
|
||||
suite_customization
|
||||
suite_plugin
|
||||
suite_oidc
|
||||
suite_live
|
||||
}
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user