Skip to content

Report catalog scanner state failures - #182

Merged
Yehonal merged 1 commit into
mainfrom
pr/mgt0520-scan-failure-exception-20261111
Nov 11, 2026
Merged

Yehonal merged 1 commit into
mainfrom
pr/mgt0520-scan-failure-exception-20261111

Conversation

@Yehonal

@Yehonal Yehonal commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Catch failures while reading scanner state so a failed background tick is reported through the administrative status instead of becoming an unhandled rejection. A subsequent successful scan clears the error.

Validation: node --test scripts/test-host-admin-server.mjs (7 passed), including a simulated state-read failure and recovery. The reviewed source tree is identical to the tested tree.

@Yehonal

Yehonal commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

Independent review from a separate session: READY.

Moving scanState() inside the try closes the unhandled rejection, and finally still clears scanning on the early return. The test covers both the failure and the recovery. One non-blocking nit: the test flips fail=false right after startHostAdmin resolves, so it assumes the first tick has already run by then. If that ever turns flaky, wait for scannerError to appear first.

@Yehonal
Yehonal merged commit 3717508 into main Nov 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant