Silent-failure surfacing built and proven — closing with evidence (one deploy step blocked externally, named below)
Built (PR #10309, merged 2026-11-14T17:47Z):
pm-stack/host-health-collector.py + pm-stack/systemd/pm-host-health.{service,timer}: every 5 min it snapshots the claimant mode file and the pm-git-sync / pm-projector-reconcile / pm-kaneo-sync-guard / pm-dashboard-backup unit + timer states to ~/.local/state/pm-aggregator/host-health.json. Live now (timer enabled; first snapshots written; claimant currently reads live).
- Aggregator: new
src/host-health.ts + watchdog derivation + cfg.hostHealthFile (env PM_AGG_HOST_HEALTH_FILE). The staleness-watchdog tier now derives items for: claimant mode missing/unreadable/invalid; any watched unit's failed last run; an inactive unit timer; pm-projector-reconcile stuck in activating >10 min; dashboard backup with no success >36 h (its cadence is daily ~04:30 — 1.5× bound); and the snapshot itself absent or stale >15 min, so the surfacer cannot fail silently. Derived, never persisted — recovery clears the cards on the next derivation.
claimant.py read_mode(): shadow stays the fail-safe default (the intended default per this issue — visibility is the fix, not a different default), and every missing/unreadable/invalid read now logs a loud CLAIMANT-MODE-WARNING line to stderr. Live now: the claimant runs from the primary checkout, which pm-git-sync pulled to the merge commit.
- Scoping note, stated plainly: a mode file that says
shadow is a deliberate setting and does not raise a tier item; the item fires when the file is missing/unreadable/invalid (the silent case in this issue, and the acceptance case below).
Acceptance proof (packaged artifact, not a mock): pkgs/pm-aggregator built from merged main (/nix/store/1ikq66f2ylji6b03c7iwyqchrgi2m149-pm-aggregator-0.1.0) and run on a scratch port/state against the real production fleet feed, fed snapshots from the real collector:
- Baseline (real mode file): no claimant item.
- Induced: collector run with
--mode-file pointed at a nonexistent scratch path → the aggregator's attention output showed "opencode claimant mode file is missing" as a watchdog tier item within one render cycle. The live claimant mode file and every live service were untouched.
- Restored (normal collector run): the item cleared on the next derivation.
Unit tests: test/host-health.test.ts (12 new cases incl. failed-pm-git-sync → item → recovery clears, stuck-activating, guard failure, backup staleness, timer-inactive) + the existing watchdog suite — 25/25 pass; claimant suite 8/8 (3 new read_mode cases); tsc clean in all touched files.
Today's real pm-git-sync failure illustrates the channel: it sat failed this morning because the primary checkout was dirty (another lane's in-flight work — surfacing named exactly that cause class), and recovered by itself at 17:37Z once the tree was clean. Its surfacing runs through the identical snapshot→derivation path proven above and is pinned by the dedicated unit test.
Remaining deploy step, blocked externally: the production pm-aggregator.service still runs the pre-merge package because a full nixos-rebuild switch from current main fails in unrelated pkgs/id (zig 0.16 OptimizeMode.small removal) — filed as #10313. pm-aggregator itself builds clean (above). One nixos-rebuild switch after #10313 lands completes the production deploy; every other part of this slice is already live.