Skip to content

fix(alertd): report unrunnable doctor checks as broken#595

Merged
passcod merged 7 commits into
mainfrom
alertd-broken-checks
Jun 26, 2026
Merged

fix(alertd): report unrunnable doctor checks as broken#595
passcod merged 7 commits into
mainfrom
alertd-broken-checks

Conversation

@passcod

@passcod passcod commented Jun 26, 2026

Copy link
Copy Markdown
Member

🤖 Several doctor checks reported "I couldn't actually run this check" as a warning, fail, or skip, which either dressed up a blind check as a degraded system or hid it behind a precondition skip. A check that couldn't run says nothing about the system under test — that's what the broken status is for (the same status query_error_check already uses for 42xxx schema errors).

Each commit reclassifies one check:

  • version_driftpodman ps failing was a warning; now broken.
  • caddy_version — caddy exiting non-zero or emitting unparseable output was a skip; now broken. skip stays for caddy not being installed.
  • inodesdf exiting non-zero was a skip; now broken. skip stays for df not on PATH.
  • kopia_backup — undecodable kopia output (clean exit, garbage stdout) was a skip; now broken. The non-zero-exit arms stay skip because on Linux they legitimately catch sudo/elevation denial, a privilege precondition.
  • migrations / db_version — a row that comes back but won't decode is a schema/check mismatch, not a system fault; was fail, now broken.
  • external_users — enumeration failures (who/quser ran but errored) collapsed into the same skip as the platform-unsupported fallback. CollectOutcome is split into Failed (broken) and Unsupported (skip).

passcod and others added 7 commits June 26, 2026 19:21
A failed `podman ps` means the check could not run, so it says nothing
about the system. That is a broken check, not a warning (which implies a
degraded system).

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
caddy exiting non-zero or emitting unparseable output means the check
couldn't determine a version, so it says nothing about the system. That's
a broken check, not a skip (which implies a precondition like caddy not
being installed).

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
A non-zero `df` exit means inode usage couldn't be read, so the check
couldn't run and says nothing about the system: broken, not skip (skip
stays for df not being on PATH).

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
When kopia exits cleanly but emits output we can't parse, the check
couldn't run and says nothing about backups: broken, not skip. The
non-zero-exit arms stay skip because on Linux they legitimately catch
sudo/elevation denial, a privilege precondition.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
A row that comes back but won't decode is a schema/check mismatch, not a
system fault — mirror how query_error_check treats 42xxx schema errors and
report broken rather than failed.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
A version() row that won't decode as text is a check mismatch, not a
database fault — mirror query_error_check's handling of 42xxx schema errors
and report broken rather than failed.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Enumeration failures (who/quser ran but errored) previously collapsed into
the same skip as the platform-unsupported fallback, hiding a check that
couldn't run behind a precondition skip. Split CollectOutcome into Failed
(broken: the tool ran but we got no answer) and Unsupported (skip: no
enumeration on this platform).

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@passcod passcod enabled auto-merge June 26, 2026 07:36
@passcod passcod added this pull request to the merge queue Jun 26, 2026
Merged via the queue into main with commit 54eb1c4 Jun 26, 2026
11 checks passed
@passcod passcod deleted the alertd-broken-checks branch June 26, 2026 07:50
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