Repository navigation
fix(bin): report exited quota-stalled workers as agent gone - #5952
mehulbhagwani wants to merge 25 commits into
Conversation
[Medium impact] Updates agent skill documentation and operational scripts. The PR does not appear safe to merge while a readable, dead secondmate can still appear finished. Reviews (7) · Last reviewed commit: "no-mistakes(ci): Captain, added regressi..." · Reviewed by Greptile |
132c3fb to
e206c6e
Compare
e206c6e to
51521cd
Compare
51521cd to
26f878d
Compare
26f878d to
9e60919
Compare
|
CI evidence on head |
Fresh exact-head Herdr/Pi proofAt exact PR head
The disposable named Herdr lab cleaned up successfully, and the default Herdr session plus Rex is unavailable on this machine, so the Rex case remains explicitly untested. This proof covers the requested Pi readable-shell and stale-agent path; it does not claim provider quota exhaustion. |
|
Speaking as Kun's firstmate: thanks @mehulbhagwani, and thanks for the fresh Pi + Herdr proof at the exact head. I read the whole thread and the diff of head Contract-class: restore. The documented crew-state default already says a dead endpoint "stays unknown instead of trusting a stale log". A harness that exited and left its shell behind was slipping past that. Nothing new is on by default. VISION: one captain aligns (no false "working" hiding a stalled worker) · authority aligns (read-only, no recovery action) · scripts/judgment aligns (deterministic classifier) · restart aligns (reconciles from live session state) · delegation aligns · vendor aligns (tmux/Herdr/Rex each use their own classifier) · scope aligns. Where it stands:
One small ask (waiting on you): could you do one quick live check on tmux at this head and post the output here? Start a Pi (or any harness) worker on tmux, exit the harness so the pane drops to its shell, and show |
|
Speaking as Kun's firstmate: thanks @mehulbhagwani for the re-raise and for driving the tmux case. Delta since my 2026-10-23 stamp ( Live evidence: the PR body now has a real disposable tmux run in which the harness exits and leaves its shell, and Gates on head
Contract-class: restore (unchanged). VISION verdicts are as in my 2026-10-23 comment: it aligns on all rules. Nothing more is needed from you. When serial 1 is green on this head, this can auto-merge on a later pass. |
|
Speaking as Kun's firstmate: thanks @mehulbhagwani for keeping this current. Head Waiting on you for one thing: the no-mistakes attestation on this head has Contract class: restore (a dead harness with a stale busy record or |
…ed in script header
A shell-only pane with no attributed run was reporting unknown on the dead-endpoint path before a valid ship/scout done: or failed: status could be preserved. Check the status log first on every death-class verdict.
This reverts commit 51521cd526d6cd38a27d64da0178dee38b476a86.
A documentation pass committed a full duplicate of tests/fm-crew-state.test.sh as tests/crewstate_targeted_run.sh; it is not a test entry point and only duplicates the real suite.
…ed in script header
A shell-only pane with no attributed run was reporting unknown on the dead-endpoint path before a valid ship/scout done: or failed: status could be preserved. Check the status log first on every death-class verdict.
This reverts commit 51521cd526d6cd38a27d64da0178dee38b476a86.
A documentation pass committed a full duplicate of tests/fm-crew-state.test.sh as tests/crewstate_targeted_run.sh; it is not a test entry point and only duplicates the real suite.
…ed in script header
A shell-only pane with no attributed run was reporting unknown on the dead-endpoint path before a valid ship/scout done: or failed: status could be preserved. Check the status log first on every death-class verdict.
This reverts commit 51521cd526d6cd38a27d64da0178dee38b476a86.
A documentation pass committed a full duplicate of tests/fm-crew-state.test.sh as tests/crewstate_targeted_run.sh; it is not a test entry point and only duplicates the real suite.
…ed in script header
A shell-only pane with no attributed run was reporting unknown on the dead-endpoint path before a valid ship/scout done: or failed: status could be preserved. Check the status log first on every death-class verdict.
This reverts commit 51521cd526d6cd38a27d64da0178dee38b476a86.
A documentation pass committed a full duplicate of tests/fm-crew-state.test.sh as tests/crewstate_targeted_run.sh; it is not a test entry point and only duplicates the real suite.
…secondmates ending in done/failed. The faulty production override was already reverted. Regression fails on historical code and passes now. Crew-state suite, ShellCheck, and real-tmux verification passed. The suite emitted one nonfatal missing-basename fixture warning
f648e25 to
dbe5923
Compare
|
Speaking as Kun's firstmate: thank you @mehulbhagwani for the re-raise. Head Diff review of the current net diff (stands in for Greptile while it's out): safe, no P1, unchanged in substance from the head I reviewed last pass. Still open, not on you: live validation is inconclusive (2 of 3 driven; the Rex path was untestable because Rex is not available to you), and the old Greptile thread is outdated but not marked resolved. You are welcome to resolve it. The Rex behavior is covered by the fake-backend tests. I'll take this to the full suite next pass if the live gate allows it; otherwise I'll ask Kun whether the Rex fake-backend coverage is enough. Contract class: restore. VISION, rule by rule: One captain: aligns · Authority: aligns (it reports a state, takes no action) · Scripts: aligns (exact backend verdicts) · Restart: aligns (durable status log) · Delegation: aligns ("supervised, not trusted": a dead worker is not read as working) · Vendor: aligns (only backend-owned classifiers) · Scope: aligns. |
|
Speaking as Kun's firstmate: thanks @mehulbhagwani. Both old Greptile threads are now resolved, and head Live gate, decided: live validation is inconclusive (2 of 3) only because Rex isn't available to you. The tmux path is driven live, your earlier Herdr + Pi proof covers Herdr, and the fake-backend tests cover the Rex verdict. I'm accepting that as the live evidence for this restore rather than asking Kun. Diff review: safe, no P1 (unchanged from my last note). Contract class: restore. Next: this pass is at its cap on new |
Closes #5946
Intent
Report an exited, quota-stalled Pi worker as gone when the endpoint shows only a shell. Keep valid terminal outcomes and secondmate handling unchanged.
What Changed
done/failedstatus declarations after harness exit, while keeping secondmate status-log handling unchanged.Risk Assessment
✅ Low: The change is narrowly scoped to the no-run fallback, preserves terminal declarations, and adds executable regression coverage for the introduced liveness boundary without a substantiated remaining defect.
Testing
The focused crew-state test file completed successfully. Two live product scenarios passed against real isolated tmux workers, with reviewer-visible transcripts captured; Rex-specific live validation remains untested because no Rex executable or disposable credentialed runtime is available.
Evidence: Live tmux shell-only reconciliation
Source: Live tmux shell-only reconciliation
state: unknown · source: none · backend target gone: lab:fm-worker (agent gone, pane shell remains)Evidence: Live tmux active endpoint guard
Source: Live tmux active endpoint guard
state: unknown · source: pane · harness state unavailable (unknown missing)Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
🔧 **Rebase** - 2 issues found → auto-fixed ✅
bin/fm-crew-state.sh- merge conflict rebasing onto origin/maintests/fm-crew-state.test.sh- merge conflict rebasing onto origin/main🔧 Fix applied.
✅ Re-checked - no issues remain.
✅ **Review** - passed
✅ No issues found.
bash tests/fm-crew-state.test.shReal isolated tmux worker exits to shell, thenbin/fm-crew-state.sh workerReal isolated tmux worker remains active, thenbin/fm-crew-state.sh worker✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.
Closes #5946