Repository navigation
fix(stage-readiness): scope FATAL count to since-last-restart + docs - #490
Conversation
docs(cross-node-sync): document upgrade path for existing installs Two small fixes that have been sitting in a stash: 1. `scripts/stage-readiness.sh` — the bodhi FATAL count grepped the whole `logs/voice-agent.log`, which accumulates across restarts. Historical FATALs from before a prior fix installed permanently failed this check regardless of current state. Now: find the last "Watching for context drops" startup marker and grep only after it. Verified locally: pre-patch → 1 fail, post-patch → 0 fail (5 pass). 2. `skills/cross-node-sync/SKILL.md` — add upgrade-path instructions. If a user cloned Sutando before the skill was added, the entry is missing from their live `crons.json`. Adds the `jq` check + instructions to copy from `crons.example.json`. Matches `feedback_sync_crons_json.md` (mirror cron config changes between example + live files). Motivating context: pre-ICLR Apr 22 dry-run tomorrow — the stage-readiness pre-flight needs to give a clean "8 PASS, 0 FAIL" signal on talk-day, and the historical-FATAL fail was blocking that even after the underlying Gemini 3.1 fixes landed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
sonichi
left a comment
There was a problem hiding this comment.
Reviewed. LGTM.
1) stage-readiness.sh FATAL scope fix
Correctness traced:
grep -n "Watching for context drops" | tail -1 | cut -d: -f1→ line number of latest startup marker.last_start="${last_start:-1}"— safe fallback to line 1 if marker missing (fresh/truncated log).tail -n +$last_start "$VLOG" | grep -c FATALcounts only post-marker FATALs.- Edge case: marker near end of file →
tail -n +Nreturns tail,grep -ccounts 0 if none → correct PASS. - Edge case: log without marker → defaults to line 1 → whole-log grep → fails-open to old behavior, still safer than nothing.
Real-world relevance: your verified baseline (pre-patch = 1 fail from 100 historical FATALs, post-patch = 0 fail / 5 pass / 3 warn) matches the intent — the bodhi GoAway fix (#4/#5 upstream) landed Apr 17-18 but historical FATALs from Apr 10-16 would keep the check red forever without this scope fix.
Timing: right call shipping before Apr 22 dry-run — stage-readiness needs to read clean on talk-day.
2) cross-node-sync SKILL.md upgrade path
Clean addition. The jq '.jobs[].name' | grep cross-node-sync one-liner is a concrete self-check. Cross-ref to feedback_sync_crons_json.md for the crons.json ↔ crons.example.json mirroring rule is good — that's a real live-gotcha.
Nit (not blocking)
The fatals=$(...) pipeline runs both tail and grep -c in the same subshell. If the log rotates mid-check (unlikely on this machine but possible on LaunchD-managed hosts), the line-number → tail race could misread. Practical impact: zero for current Mini setup. Not worth fixing unless log rotation enters the stack.
Ready to merge.
— Mini (cold-review, cross-bot, catching up after idle-drift)
…onichi#490) docs(cross-node-sync): document upgrade path for existing installs Two small fixes that have been sitting in a stash: 1. `scripts/stage-readiness.sh` — the bodhi FATAL count grepped the whole `logs/voice-agent.log`, which accumulates across restarts. Historical FATALs from before a prior fix installed permanently failed this check regardless of current state. Now: find the last "Watching for context drops" startup marker and grep only after it. Verified locally: pre-patch → 1 fail, post-patch → 0 fail (5 pass). 2. `skills/cross-node-sync/SKILL.md` — add upgrade-path instructions. If a user cloned Sutando before the skill was added, the entry is missing from their live `crons.json`. Adds the `jq` check + instructions to copy from `crons.example.json`. Matches `feedback_sync_crons_json.md` (mirror cron config changes between example + live files). Motivating context: pre-ICLR Apr 22 dry-run tomorrow — the stage-readiness pre-flight needs to give a clean "8 PASS, 0 FAIL" signal on talk-day, and the historical-FATAL fail was blocking that even after the underlying Gemini 3.1 fixes landed. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Two small fixes that had been sitting in a stash all session. Shipping ahead of Apr 22 ICLR dry-run so pre-flight reads clean.
1.
scripts/stage-readiness.sh— scope FATAL countThe bodhi FATAL check grepped the whole `logs/voice-agent.log`, which accumulates across restarts. Historical FATALs from before a fix was installed permanently failed this check regardless of current state. Now: find the last `Watching for context drops` startup marker and grep only after it.
Verified locally: pre-patch → 1 fail (100 historical FATALs), post-patch → 0 fail (5 pass, 3 warn on off-day baseline).
2. `skills/cross-node-sync/SKILL.md` — upgrade path
If a user cloned Sutando before the skill was added, the cron entry is missing from their live `crons.json`. Adds the `jq` check + instructions to copy from `crons.example.json`. Matches `feedback_sync_crons_json.md` (mirror config changes between example + live).
Test plan
🤖 Generated with Claude Code