docs: Lift A docs pass, plus watchdog exits 0 after a tick #103

Merged
alee merged 14 commits from docs/lift-a-docs-pass into main 2026-09-27 02:33:41 +00:00
Owner

Docs pass after Lift A (#102), plus one watchdog fix found while writing it.

Docs

  • New docs/watchdog.md: signals and thresholds, alert lifecycle, admin surfaces, knobs, install (unit paths repointed with sed), --once, backtest, known limits.
  • CLAUDE.md: North Star #4, Lift A modules under "What's built", the watchdog timer under "Run as a service", test count 2414.
  • docs/incidents.md #8: full write-up (Evidence vs labelled Theory, Human response timeline); Lift A shipped; the plugin-loader root cause (router-link.js exported a Map, so opencode 1.18 rejected the whole plugin and identity never arrived from #99 until #102); identity now confirmed arriving.
  • docs/admin-portal.md, docs/api.md, docs/data-model.md, docs/clients.md: the watchdog endpoints and tables, blocked, the plugin loader contract. They describe what shipped and say plainly what did not: the Loops panel shows severity, key and time only, and there is no per-model stall rollup, Block-beside-evidence or Blocked list yet (North Star #4 is partly met).
  • Plans: the no-progress spec, the Lift A brief, the prototype, deploy separation, cockpit; each declares a valid Status:.
  • opencode.json: auto advertises 200k context (was 782k), matching the live global config.

Fix

  • watchdog --once exited with the number of alerts fired, so the first real alert would mark the systemd oneshot FAILED. It now exits 0 once the tick has run and logs the count. The new test fails against the old exit path.

Verification

  • Full suite: 2414 passed, 1 failed (test_incumbent_routing::test_debug_log_emits_incumbent_identity, also failing on main).
  • Pinned ruff@0.16.9: no new findings in touched Python files.
  • watchdog --once against a copy of the live DB: exit 0, 0 alert(s) fired.

After merge: the main checkout holds identical local copies of CLAUDE.md, docs/incidents.md, opencode.json and six untracked plans/ files; restore/remove them before git pull.

🤖 Generated with Claude Code

https://claude.ai/code/session_01N9biTbFC63yDfYfUsZmhgd

Docs pass after Lift A (#102), plus one watchdog fix found while writing it. **Docs** - New `docs/watchdog.md`: signals and thresholds, alert lifecycle, admin surfaces, knobs, install (unit paths repointed with `sed`), `--once`, backtest, known limits. - `CLAUDE.md`: North Star #4, Lift A modules under "What's built", the watchdog timer under "Run as a service", test count 2414. - `docs/incidents.md` #8: full write-up (Evidence vs labelled Theory, Human response timeline); Lift A shipped; the plugin-loader root cause (`router-link.js` exported a Map, so opencode 1.18 rejected the whole plugin and identity never arrived from #99 until #102); identity now confirmed arriving. - `docs/admin-portal.md`, `docs/api.md`, `docs/data-model.md`, `docs/clients.md`: the watchdog endpoints and tables, `blocked`, the plugin loader contract. They describe what shipped and say plainly what did not: the Loops panel shows severity, key and time only, and there is no per-model stall rollup, Block-beside-evidence or Blocked list yet (North Star #4 is partly met). - Plans: the no-progress spec, the Lift A brief, the prototype, deploy separation, cockpit; each declares a valid `Status:`. - `opencode.json`: `auto` advertises 200k context (was 782k), matching the live global config. **Fix** - `watchdog --once` exited with the number of alerts fired, so the first real alert would mark the systemd oneshot FAILED. It now exits 0 once the tick has run and logs the count. The new test fails against the old exit path. **Verification** - Full suite: 2414 passed, 1 failed (`test_incumbent_routing::test_debug_log_emits_incumbent_identity`, also failing on `main`). - Pinned `ruff@0.16.9`: no new findings in touched Python files. - `watchdog --once` against a copy of the live DB: exit 0, `0 alert(s) fired`. **After merge:** the main checkout holds identical local copies of `CLAUDE.md`, `docs/incidents.md`, `opencode.json` and six untracked `plans/` files; restore/remove them before `git pull`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01N9biTbFC63yDfYfUsZmhgd
alee added 14 commits 2026-09-27 01:48:08 +00:00
Incident #8 gains Evidence vs labelled Theory, a Human response timeline and
the confounded-mitigations note. CLAUDE.md gains North Star #4 and points at
#8 before any unattended agent run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N9biTbFC63yDfYfUsZmhgd
The no-progress spec is reference material; plans/no-progress-lift-a.md was
the contract for PR #102. deploy-separation.md is a spec plus a dry-run
cutover runbook; the cutover has not been done.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N9biTbFC63yDfYfUsZmhgd
At 782k opencode never compacted, and planning sessions grew to 500-640k
tokens before the models degraded (incident #8). The live global config
already carries 200k; this brings the repo copy in line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N9biTbFC63yDfYfUsZmhgd
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N9biTbFC63yDfYfUsZmhgd
`python -m watchdog --once` exited with the number of alerts fired. It runs
as a systemd oneshot, so the first real alert would have marked
llm-router-watchdog.service FAILED (and a count past 255 wraps), making a
working alert look like a crash. The __main__ block becomes main(argv) and
returns 0 once the tick has run; the count is logged instead. The new test
fails against the old exit path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N9biTbFC63yDfYfUsZmhgd
tests/test_plans_declare_status.py requires 'Status: <done|planned|in
progress|parked|reference> -- <reason>' in the first 8 lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N9biTbFC63yDfYfUsZmhgd
alee merged commit 5aaf1e67a2 into main 2026-09-27 02:33:41 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: alee/6krrt#103