Repository navigation
fix: prevent AFK idle stalls and stale run attribution - #758
Merged
kunchenguid merged 7 commits intoJul 21, 2026
Merged
kunchenguid merged 7 commits into
kunchenguid merged 7 commits into
Conversation
added 7 commits
July 20, 2026 12:10
… state Stop free-text tokens like "merged" from promoting nonterminal working: lines to captain-relevant, so AFK no longer permanently suppresses idle recovery. Defend wedge aging independently for nonterminal progress verbs, bind no-mistakes current-state attribution to code identity (not branch alone), and mark setup-complete as nonterminal in the ship brief scaffold.
commented
Jul 21, 2026
Owner
|
Thanks @jjames27th-eng - merged! Really appreciate the contribution. |
This was referenced Jul 26, 2026
This was referenced Aug 2, 2026
Merged
This was referenced Aug 3, 2026
This was referenced Aug 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Validate and ship the committed Firstmate supervision corrections on fm/firstmate-afk-stage-idle-fix through a new upstream PR (do not merge).
Goal: fix the multi-hour AFK idle stall diagnosed in the stage-turn-idle report where a nonterminal working: line containing free-text "merged" was treated as captain-relevant, escalated once, then permanently suppressed possible-wedge recovery; also fix branch-only no-mistakes current-state misattribution on reused branch names, and add multi-stage brief protection that setup complete is nonterminal.
Required outcomes preserved by this branch:
Coordinate with open PRs #729/#735/#746/#747 without duplicating or regressing them. Keep the patch focused. Never use --yes; escalate ask-user findings; never merge.
What Changed
Risk Assessment
✅ Low: Captain, the change is focused, preserves the required supervision invariants, binds run attribution to code identity, and introduces no substantiated merge-blocking risk.
Testing
The previously successful baseline was supplemented with 10 consecutive live tmux smoke passes, focused supervision regressions, a fully green configured suite rerun including real tmux and Herdr E2E paths, and reviewer-visible classification and generated-brief evidence; no failures, flakes, residue, or actionable issues remain.
Evidence: Intent behavior evidence
Direct classification matrix plus AFK recovery, Git-head binding, and tmux stability evidence.Evidence: Generated multi-stage ship brief
Evidence: Complete test-suite log
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
🔧 **Test** - 1 issue found → auto-fixed (3) ✅
command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; exit "$rc"🔧 Fix: Wait for stable Herdr shell readiness
1 error still open:
command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; exit "$rc"🔧 Fix: Make Herdr and watcher readiness tests deterministic
1 error still open:
command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; exit "$rc"🔧 Fix: Make tmux capture and watcher lifecycle deterministic
✅ Re-checked - no issues remain.
command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; exit "$rc"Inspectedgit diff 4ab61fa7d453c170ee2f2d2f7eb334efa3058f78..0913948380acdb335f77ac7229a87bde1159e3e6against the supplied intent.Ranfor i in $(seq 1 10); do bash tests/fm-backend-tmux-smoke.test.sh; done.Ranbash tests/fm-watch-triage.test.sh.Ranbash tests/fm-daemon.test.sh.Ranbash tests/fm-crew-state.test.sh.Ranbash tests/fm-brief.test.sh.Reran the complete configuredtests/*.test.shsuite with tmux 3.7b and capturedfull-suite.log.Generated a direct supervisor classification matrix covering nonterminal progress, terminal verbs, legacy free text, and validated merge-check events.Generated a real ship brief and verified setup completion requires continuing until a defineddone:gate.Verifiedgit status --shortis empty after testing.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.