Skip to content

feat(bin): add worker stand-down and repair to fm-control - #3281

Open
AgardnerAU wants to merge 61 commits into
kunchenguid:mainfrom
AgardnerAU:fm/fm-stooddown-worker-false-wedge-alarms
Open

AgardnerAU wants to merge 61 commits into
kunchenguid:mainfrom
AgardnerAU:fm/fm-stooddown-worker-false-wedge-alarms

Conversation

@AgardnerAU

@AgardnerAU AgardnerAU commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Intent

Refresh the contribution in #3281 locally from the approved d33bd39c baseline.

"A1" - start the 15 Nov firstmate code work after the 12 Nov upstream catch-up lands; local work and checks only; no upstream PR, push or post before 15 Nov.

publish the five local fixes to kunchenguid/firstmate as PRs - update PR 5805 (upstream-refresh-5805-herdr-lab), update PR 3281 (fm-refresh-3281-1018), a new PR for fm-herdr-presentation-e2e-concurrent-lock, a new PR for fm-lock-typed-outcomes, and the Herdr passive capture fix alone as its own PR (fm-herdr-passive-capture-contribution).

The referenced contribution adds worker stand-down and repair so held ship or scout workers can stop without false wedge alarms, while active validation and pending instructions remain protected, and addresses the three findings on retry exit failure, incomplete run listings, and live checks-green reporting.

What Changed

  • Adds stand-down and repair-worker-state verbs to bin/fm-control.sh, backed by the new bin/fm-worker-state-lib.sh. On the tmux backend, stand-down stops a held ship or scout worker and writes an exact state/<id>.worker-state record only after it proves the agent is gone. It refuses when the branch has an in-flight no-mistakes run, when a steering instruction is still unacknowledged, when the run state can't be read, or when the agent was already gone and the task has no paused:/captain-held: hold declared. repair-worker-state keeps a valid record only while its endpoint is proven dead. Otherwise it clears the record and returns the task to ordinary supervision.
  • bin/fm-nm-run-lib.sh now owns a single branch-run verdict (active, quiet, or refused when unreadable). It reads axi status first and uses only the newest no-mistakes runs row for this branch as corroboration. It refuses on a failed listing or a full window only when another branch has the active run.
  • The stood-down record is wired into the other scripts:
    • fm-watch skips stale-pane and wedge alarms for a proven worker-free endpoint.
    • fm-send refuses new input to such a task.
    • fm-spawn --relaunch clears the record before relaunching and restores it if the relaunch aborts.
    • fm-teardown removes the record.
    • fm-crew-state reports parked · source: worker-state unless a still-live attributed run (including one whose checks are green) keeps step authority. It reports unknown when the endpoint has vanished.
    • Docs and tests are updated to cover these cases.

🤖 Generated with Claude Code

Risk Assessment

✅ Low: The remaining four test files exercise the real fm-control, fm-send and fm-watch entry points against fake tmux and no-mistakes boundary stubs, each with a counterfactual case; the only issue is one stale explanatory comment.

Testing

All seven live scenarios passed against a real Claude worker in an isolated lab: stand-down, both refusals, repair, held-task reporting and send refusal, and relaunch with rollback; the transcripts are in the evidence directory. The fm-control, fm-control-relaunch and fm-crew-state suites passed. The fm-send-inbox, fm-task-inbox and fm-watch-triage suites were stopped unfinished because of the time budget. The fm-watch wedge exemption was not driven live, because its stale timers run for minutes. One early setup attempt ran Claude as the pane's own command, which is not how real spawns run it. The pane closed when Claude exited, and stand-down correctly refused and left the task supervised; that run is kept as s0 evidence. The tmux server was stopped and the lab socket dir torn down, but the sandbox denied rm -rf of the lab home, so /tmp/fm-lab.YPDRxi and the unpacked tmux in /tmp/tmuxpkg.KpKy are still there, outside the worktree.

  • Live validation: ✅ go - 7 of 8 scenarios driven live against the product
Scenario Result Live Evidence
Operator stands down a held ship while a steering instruction is still pending: refused, names the inbox record, worker stays alive, no record written ✅ pass live s1-pending-inbox-refusal.txt
repair-worker-state with a stale standing-down record and a live claude in the endpoint clears the record toward supervision; a repeat is a no-op ✅ pass live s3-repair-live-agent-clears-record.txt
Operator stands down a live claude ship worker: agent is stopped, pane falls back to bash, worker-state is written as stood-down bound to the task and endpoint, a repeat reports already-stood-down ✅ pass live s2-stand-down-live-worker.txt
While held, fm-crew-state reports parked from worker-state and fm-send refuses a new instruction without queuing anything ✅ pass live s4-crew-state-and-send-while-held.txt
Adversarial: a ship whose agent is already dead with no declared hold cannot be relabelled as a stand-down; after a paused: status line it can ✅ pass live s5-dead-agent-without-hold-refused.txt
Relaunch from a stood-down task: an aborted launch restores the hold record; a successful launch clears it and a real claude is running and reported as working ✅ pass live s6a-relaunch-abort-restores-hold.txt, s6-relaunch-from-stood-down.txt
Stand-down refused while the branch has an in-flight no-mistakes run, or when that run check cannot be answered ✅ pass live bash tests/fm-control.test.sh exit 0 (stand-down active-run, terminal-run and unanswerable-check cases); suite-fm-control.log
fm-watch skips stale and wedge alarms for a proven stood-down window and still supervises a live worker behind a stale record ⏸️ untested no A live check needs the watcher to sit through its multi-minute stale timers on a lab pane, and the 30-minute turn budget ran out after the other scenarios. The tests/fm-watch-triage.test.sh suite was…
Evidence: Pending inbox instruction refuses stand-down

Source: Pending inbox instruction refuses stand-down

$ mkdir state/t1.inbox; echo steer > state/t1.inbox/0001.msg   # pending instruction
$ fm-control.sh t1 stand-down
fm-gate-refuse: gate agent lifecycle permitted only against lab home /tmp/fm-lab.YPDRxi
error: task t1 has an unacknowledged instruction waiting at /tmp/fm-lab.YPDRxi/state/t1.inbox/0001.msg; let the worker handle it, or withdraw it explicitly with 'mv /tmp/fm-lab.YPDRxi/state/t1.inbox/0001.msg /tmp/fm-lab.YPDRxi/state/t1.inbox/handled/', before standing the worker down
exit=1
worker-state present? none
pane command: claude
Evidence: Stand-down of live claude worker plus idempotent repeat

Source: Stand-down of live claude worker plus idempotent repeat

pane before: claude
$ fm-control.sh t1 stand-down
fm-gate-refuse: gate agent lifecycle permitted only against lab home /tmp/fm-lab.YPDRxi
stood-down t1 harness=claude backend=tmux endpoint=fmlab:fm-t1 worktree=/tmp/fm-lab.YPDRxi/wt-t1
exit=0
pane after: bash
$ cat state/t1.worker-state
schema=1
task_id=t1
endpoint=fmlab:fm-t1
state=stood-down
$ fm-control.sh t1 stand-down   # repeat
fm-gate-refuse: gate agent lifecycle permitted only against lab home /tmp/fm-lab.YPDRxi
already-stood-down t1 harness=claude backend=tmux endpoint=fmlab:fm-t1 worktree=/tmp/fm-lab.YPDRxi/wt-t1
exit=0
--- pane tail ---
user@user-Z790-Steel-Legend-WiFi:/tmp/fm-lab.YPDRxi/wt-t1$ env -u NO_MISTAKES_GATE claude
user@user-Z790-Steel-Legend-WiFi:/tmp/fm-lab.YPDRxi/wt-t1$
Evidence: Repair clears a record contradicted by a live agent

Source: Repair clears a record contradicted by a live agent

# a stale standing-down record left behind, with a LIVE claude worker now in the endpoint
$ cat state/t1.worker-state
schema=1
task_id=t1
endpoint=fmlab:fm-t1
state=standing-down
pane: claude
$ fm-control.sh t1 repair-worker-state
fm-gate-refuse: gate agent lifecycle permitted only against lab home /tmp/fm-lab.YPDRxi
warning: task t1 declared no worker but its endpoint has a live agent; the declaration was cleared and the task is back under ordinary supervision
cleared-live-worker agent-state=alive t1 harness=claude backend=tmux endpoint=fmlab:fm-t1 worktree=/tmp/fm-lab.YPDRxi/wt-t1
exit=0
worker-state after: <none>
$ fm-control.sh t1 repair-worker-state   # repeat
fm-gate-refuse: gate agent lifecycle permitted only against lab home /tmp/fm-lab.YPDRxi
no-record agent-state=alive t1 harness=claude backend=tmux endpoint=fmlab:fm-t1 worktree=/tmp/fm-lab.YPDRxi/wt-t1
exit=0
Evidence: crew-state parked and fm-send refused while held

Source: crew-state parked and fm-send refused while held

$ fm-crew-state.sh
usage: fm-crew-state.sh <id>
exit=2
$ fm-send.sh t1 "new instruction"
fm-gate-refuse: gate agent lifecycle permitted only against lab home /tmp/fm-lab.YPDRxi
●━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
●  WATCHER DOWN - SUPERVISION IS OFF
●  1 task(s) in flight, but no watcher has a fresh beacon (last beat: never, grace 300s).
●  Trust the emitted supervision protocol for this harness; do not use shell & for watcher repair.
●  This is a supervision warning only; the requested message WILL still be sent.
●  watcher supervision needs Stop-owned automatic recovery; inspect the hook registration and startup status before ending the turn.
●━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
error: task t1 deliberately has no worker; relaunch it before sending an instruction
exit=1
inbox unhandled: 0
$ fm-crew-state.sh t1
state: parked · source: worker-state · worker deliberately stood down
exit=0
Evidence: Dead agent without declared hold refused, then accepted after paused:

Source: Dead agent without declared hold refused, then accepted after paused:

# t2: a ship whose claude worker is simply gone (bare shell in its pane), no hold declared
pane: bash
$ fm-control.sh t2 stand-down
fm-gate-refuse: gate agent lifecycle permitted only against lab home /tmp/fm-lab.YPDRxi
error: task t2's agent is already dead without a stand-down record; refusing to relabel a possible worker failure as intentional. Declare the hold first by appending a 'paused: <reason>' line to /tmp/fm-lab.YPDRxi/state/t2.status, then re-run stand-down
exit=1
worker-state: <none>
$ fm-crew-state.sh t2
state: unknown · source: pane · harness state unavailable (unknown missing)
exit=0
$ echo "paused: captain hold" >> state/t2.status; fm-control.sh t2 stand-down
fm-gate-refuse: gate agent lifecycle permitted only against lab home /tmp/fm-lab.YPDRxi
stood-down t2 harness=claude backend=tmux endpoint=fmlab:fm-t2 worktree=/tmp/fm-lab.YPDRxi/wt-t2
exit=0
worker-state: schema=1 task_id=t2 endpoint=fmlab:fm-t2 state=stood-down 
Evidence: Aborted relaunch restores the stood-down record

Source: Aborted relaunch restores the stood-down record

$ fm-control.sh t1 relaunch --note "resume after hold"
fm-gate-refuse: gate agent lifecycle permitted only against lab home /tmp/fm-lab.YPDRxi
fm-gate-refuse: gate agent lifecycle permitted only against lab home /tmp/fm-lab.YPDRxi
WARNING: watcher still down (same stale episode; last beat: never, grace 300s) - full banner already printed this episode.
error: /tmp/fm-lab.YPDRxi/data/t1/brief.md must contain nonempty ## Captain's intent and ## Firstmate spec subsections (or a nonempty legacy # Task body) before spawn
error: the replacement agent for t1 could not be launched on claude
error: t1's agent was stopped but the replacement did not launch; no agent is running, and its work plus the recorded progress note are preserved at /tmp/fm-lab.YPDRxi/wt-t1
exit=1
worker-state after relaunch: schema=1
task_id=t1
endpoint=fmlab:fm-t1
state=stood-down
pane: bash
$ fm-crew-state.sh t1
state: parked · source: worker-state · worker deliberately stood down
Evidence: Relaunch from stood-down clears record and restarts claude

Source: Relaunch from stood-down clears record and restarts claude

worker-state before: schema=1 task_id=t1 endpoint=fmlab:fm-t1 state=stood-down 
$ fm-control.sh t1 relaunch --note "resume after hold"
fm-gate-refuse: gate agent lifecycle permitted only against lab home /tmp/fm-lab.YPDRxi
fm-gate-refuse: gate agent lifecycle permitted only against lab home /tmp/fm-lab.YPDRxi
WARNING: watcher still down (same stale episode; last beat: never, grace 300s) - full banner already printed this episode.
warning: /tmp/fm-lab.YPDRxi/data/t1/launch-brief.md records no ship branch; defaulting to legacy branch fm/t1
warning: /tmp/fm-lab.YPDRxi/data/t1/launch-brief.md records no delivery contract line (scaffolded before ship briefs recorded one); launching on the explicit --mode no-mistakes - confirm its definition of done matches
relaunched t1 harness=claude from=claude model=default effort=default backend=tmux endpoint=fmlab:fm-t1 worktree=/tmp/fm-lab.YPDRxi/wt-t1
exit=0
worker-state after relaunch: <none>
pane: claude
$ fm-crew-state.sh t1
state: working · source: pane · harness busy (claude-hook)
  • Evidence: Setup run with Claude as the pane's own command (pane closed on exit): stand-down refused and left the record standing-down (local file: ~/.no-mistakes/evidence/01M7EHPTFV99DYVY0C73JYK3ZN/s0-setup-pane-without-shell-refuses.txt)
Evidence: Targeted suite results

Source: Targeted suite results

fm-control exit=0 187s
fm-control-relaunch exit=0 296s
fm-crew-state exit=0 141s
  • Outcome: ⚠️ 2 infos across 1 run (11m22s)

Pipeline

Updates from git push no-mistakes

✅ **Intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 1 info
  • ℹ️ tests/fm-control.test.sh:1407 - The comment above test_stand_down_refuses_while_an_instruction_is_unacknowledged says "the watcher's re-ring ladder stops for a stood-down window". That contradicts the shipped behaviour, which tests/fm-task-inbox.test.sh (test_watcher_ladder_still_runs_for_a_stood_down_task) pins: the ladder keeps running and only pane-stale and wedge detection are exempt. The reason for the refusal is still correct, because fm-send refuses new steers to a worker-free task and an unread steer would wait for a relaunch. Reword the comment so it matches the actual exemption.
⚠️ **Test** - 2 infos
  • ℹ️ The sandbox denied rm -rf on the disposable lab home /tmp/fm-lab.YPDRxi and the unpacked tmux in /tmp/tmuxpkg.KpKy. The lab tmux server was stopped and fm-lab-home.sh teardown succeeded, but both directories, outside the worktree, still need manual removal.
  • ℹ️ Three targeted suites (fm-send-inbox, fm-task-inbox, fm-watch-triage) were started but stopped unfinished because of the 30-minute budget. Remote CI must cover them.
  • Live validation: ✅ go - 7 of 8 scenarios driven live against the product
Scenario Result Live Evidence
Operator stands down a held ship while a steering instruction is still pending: refused, names the inbox record, worker stays alive, no record written ✅ pass live s1-pending-inbox-refusal.txt
repair-worker-state with a stale standing-down record and a live claude in the endpoint clears the record toward supervision; a repeat is a no-op ✅ pass live s3-repair-live-agent-clears-record.txt
Operator stands down a live claude ship worker: agent is stopped, pane falls back to bash, worker-state is written as stood-down bound to the task and endpoint, a repeat reports already-stood-down ✅ pass live s2-stand-down-live-worker.txt
While held, fm-crew-state reports parked from worker-state and fm-send refuses a new instruction without queuing anything ✅ pass live s4-crew-state-and-send-while-held.txt
Adversarial: a ship whose agent is already dead with no declared hold cannot be relabelled as a stand-down; after a paused: status line it can ✅ pass live s5-dead-agent-without-hold-refused.txt
Relaunch from a stood-down task: an aborted launch restores the hold record; a successful launch clears it and a real claude is running and reported as working ✅ pass live s6a-relaunch-abort-restores-hold.txt, s6-relaunch-from-stood-down.txt
Stand-down refused while the branch has an in-flight no-mistakes run, or when that run check cannot be answered ✅ pass live bash tests/fm-control.test.sh exit 0 (stand-down active-run, terminal-run and unanswerable-check cases); suite-fm-control.log
fm-watch skips stale and wedge alarms for a proven stood-down window and still supervises a live worker behind a stale record ⏸️ untested no A live check needs the watcher to sit through its multi-minute stale timers on a lab pane, and the 30-minute turn budget ran out after the other scenarios. The tests/fm-watch-triage.test.sh suite was…
  • bin/fm-lab-home.sh create plus tmux-dir lab home, with a tmux 3.6 binary unpacked inside the workspace (apt-get download + dpkg-deb -x, no system install)
  • Live: fm-control.sh t1 stand-down with an unacknowledged state/t1.inbox/0001.msg and a live claude worker
  • Live: fm-control.sh t1 repair-worker-state twice against a stale standing-down record with a live claude in the endpoint
  • Live: fm-control.sh t1 stand-down twice against a live claude worker in a shell pane, then cat state/t1.worker-state
  • Live: fm-crew-state.sh t1 and fm-send.sh t1 &#39;new instruction&#39; while t1 was stood down
  • Live: fm-control.sh t2 stand-down on a ship with a dead agent and no declared hold, then again after appending paused: to t2.status
  • Live: fm-control.sh t1 relaunch --note ... from stood-down, once refused by a fixture brief error (rollback) and once successful
  • bash tests/fm-control.test.sh (exit 0)
  • bash tests/fm-control-relaunch.test.sh (exit 0)
  • bash tests/fm-crew-state.test.sh (exit 0)
  • Stopped before finishing because of the time budget: tests/fm-send-inbox, fm-task-inbox, fm-watch-triage
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@greptile-apps

greptile-apps Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[High impact] The PR appears safe to merge.

Reviews (13) · Last reviewed commit: "no-mistakes(document): Clarify live chec..." · Reviewed by Greptile

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate:

Reviewed HEAD d402739060cecca80622526f652da54954ecfc1f vs main. Whole thread read (body, Greptile 5/5, no human reviews). Files: new bin/fm-worker-state-lib.sh, bin/fm-control.sh (stand-down / repair-worker-state), crew-state / nm-run-lib / send / spawn / teardown / watch, docs, tests. No .github/workflows/*. AgardnerAU is not blocked. Not disguised security. Fail-closed: unproven records clear toward supervision; live agents stay in wedge detection; Herdr relaunch remains; stand-down is tmux-only.

Contract-class: new-default. Unconfigured fleet now has first-class stand-down / repair-worker-state verbs, a durable worker-state record, watcher exemption for proven holds, and fm-send refusal to a proven worker-free task. That is a new default lifecycle path, not a restore of a promised existing hold.

VISION (per rule):

  • One captain, one interface — aligns (stops false dead-worker wedges on intentional holds).
  • Authority is explicit — tension (new capability ships as default verbs/docs, not an opt-in flag).
  • Scripts own the mechanics — aligns (deterministic record + classifiers; no agent judgment mixed in).
  • A restart is a non-event — aligns (durable endpoint-bound record; interrupted standing-down stays supervised).
  • Delegation with a spine — aligns (refuses unproven holds; does not cancel in-flight runs).
  • The fleet outlives any vendor — aligns (tmux-only worker-state; Herdr ordinary relaunch kept).
  • Scope — aligns (lifecycle supervision, not merge policy).

Attestation HTML binds head_sha b8a8bd077c4aa9401ccfc56420b2b8c9e071ce5c, not this HEAD. no-mistakes is blocking. Fork CI approved this pass: 33250636532 (CI), 33250636533 (Require no-mistakes). Waiting on the author to rebind attestation. Not with the captain (not otherwise ready). No auto-merge. I am not opening a competing PR.

@AgardnerAU
AgardnerAU force-pushed the fm/fm-stooddown-worker-false-wedge-alarms branch from d402739 to 562d760 Compare August 30, 2026 02:39
@AgardnerAU AgardnerAU changed the title fix(bin): distinguish intentional stand-downs from dead workers feat(bin): represent deliberately stood-down workers Aug 30, 2026
@AgardnerAU

Copy link
Copy Markdown
Contributor Author

Merged current upstream main into this branch (head 9dc61a0), resolving the conflicts in bin/fm-control.sh and tests/fm-contributions.test.sh; the budget-hang fixture fix is kept. The branch is up to date with main and ready for CI; the workflow runs are waiting for maintainer approval.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate (OSS triage, not the captain).

Thanks @AgardnerAU. My 09-19 stamp was waiting-author, because CI was red on the contributions budget-hang test at 2804abbd. Since then you've landed the fixture fix and merged main. The new head is 9dc61a0d, attestation matches it, and it merges cleanly with main fb75c1f9.

I re-reviewed the tip diff. There are no workflow or secret changes, so I approved the fork runs: CI 38010402948 and Require no-mistakes 38010402921.

Contract-class: new-default (unchanged). An unconfigured fleet gains first-class stand-down and repair-worker-state verbs, durable *.worker-state records, a watcher exemption for proven holds, and an fm-send refusal. That's a new default lifecycle surface, not a broken specified path being fixed.

VISION (unchanged):

  • One captain/one interface: aligns (no more false wedge alarms).
  • Authority: in tension, because the new default verbs have no opt-in gate. That's why this is new-default.
  • Scripts own mechanics: aligns.
  • Restart: aligns (durable record).
  • Delegation: aligns.
  • Vendor: aligns.
  • Scope: aligns.

Outcome: waiting-ci. The author-side blocker is cleared. Once CI and no-mistakes are green, this goes to the captain to merge or leave. It won't auto-merge. Nothing is needed from you right now.

…r-false-wedge-alarms

# Conflicts:
#	tests/fm-crew-state.test.sh
@AgardnerAU

Copy link
Copy Markdown
Contributor Author

Merged current upstream main into this branch (head 876c626); the one test-file conflict is resolved and the branch has no conflicts with main. The affected tests pass locally. Ready for CI - the fork workflow runs are waiting for maintainer approval.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thanks @AgardnerAU — tip 876c6265 merges current main; conflict resolved; attestation MATCH. Diff re-reviewed (stand-down / repair-worker-state, worker-state lib, watch exemption, send refuse, relaunch clear). Workflow-zero. Approved fork runs for this tip: CI 38477789539, Require no-mistakes 38477789751.

Contract-class: new-default (unchanged). Unconfigured fleet still gains first-class stand-down verbs, durable *.worker-state, watcher exemption for proven holds, and fm-send refusal — new default lifecycle surface, not restore.

VISION: one-interface / scripts / restart / spine / vendor / scope align; authority in tension (no opt-in gate) — hence new-default.

Outcome: waiting-ci. Main is red; no merge. When CI + no-mistakes are green on a green main, this goes to the captain to merge or leave (not auto-merge). Live 8/10 noted (relaunch + in-flight NM covered by suites). Nothing needed from you right now.

…r-false-wedge-alarms

# Conflicts:
#	bin/fm-spawn.sh
#	tests/fm-contributions.test.sh
#	tests/fm-control-relaunch.test.sh
#	tests/fm-crew-state.test.sh
#	tests/fm-send-inbox.test.sh
@AgardnerAU

Copy link
Copy Markdown
Contributor Author

Merged current upstream main (1aa2a21) into this branch and resolved the conflicts; head is now 45a6e5d. The relaunch rollback now arms only after upstream's polytoken hook-layer refusal, while a refused relaunch still restores the stood-down record (covered by a new test in tests/fm-control-relaunch.test.sh). Up to date with main and ready for CI - the workflow runs are waiting for maintainer approval.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thanks @AgardnerAU for keeping this current.

What changed since my 14 Oct stamp (876c6265): you merged main 1aa2a21e, and the head is now 45a6e5dd. In bin/fm-spawn.sh, the relaunch rollback now arms only after upstream's polytoken hook-layer refusal, and a refused relaunch still restores the stood-down record, which a new test in tests/fm-control-relaunch.test.sh covers. The stray scratch copy of the relaunch test suite is gone. The attestation is bound to this head, with live go 8/9. I re-reviewed the tip diff: no workflow, secret or network changes. GitHub reports it MERGEABLE.

I approved the held fork runs on this head: CI 39132134436 and Require no-mistakes 39132134514.

Contract-class: new-default (unchanged). An unconfigured fleet gains first-class stand-down and repair-worker-state verbs, durable *.worker-state records, a watcher/crew-state exemption for proven holds, and an fm-send refusal. That is a new default lifecycle surface, not a broken specified path being restored.
VISION.md: unchanged. One-interface, scripts, restart, spine, vendor and scope align. Authority is in tension because the new default verbs have no opt-in gate, which is why this is new-default.

Status: waiting-ci. Once CI and no-mistakes are green, this goes to Kun to merge or leave. It won't auto-merge, and nothing is waiting on you right now. Main's last completed run had Behavior portable serial 2 cancelled at the 30-minute ceiling (#7255). If that shard is the only red here, it mirrors main and isn't on you.

@AgardnerAU

Copy link
Copy Markdown
Contributor Author

The one red check, Behavior portable serial 5 (https://github.com/kunchenguid/firstmate/actions/runs/39132134436/job/117699354793), is a known intermittent failure that this PR does not cause: tests/fm-remote-secondmate-lifecycle-e2e.test.sh times out with "the watcher did not exit on its auto-relaunch wake within the bound". The same failure appears on unrelated branches: https://github.com/kunchenguid/firstmate/actions/runs/39152095982, https://github.com/kunchenguid/firstmate/actions/runs/39106745352, https://github.com/kunchenguid/firstmate/actions/runs/39094096437. The test file passes locally on this head. Could you please rerun the failed job?

Comment thread bin/fm-control.sh Resolved
Comment thread bin/fm-nm-run-lib.sh Resolved
Comment thread bin/fm-crew-state.sh Resolved
@AgardnerAU AgardnerAU changed the title fix(bin): stop false wedge alarms for deliberately stood-down workers feat(bin): add worker stand-down so held tasks stop raising false wedge alarms Nov 4, 2026
@kunchenguid kunchenguid added the full-ci Maintainer go-ahead: run the full CI suite on this outside pull request label Nov 4, 2026
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thanks @AgardnerAU for working through all three Greptile findings. Head 9733ec38 merges cleanly with main. Here's how each one is handled:

  • Retry false success (fm-control.sh): the interrupted stand-down retry now checks do_exit's result and refuses to publish stood-down unless the worker is stopped or already-stopped.
  • Listing proof (fm-nm-run-lib.sh): when axi status names another branch's active run, quiet now needs a row for this branch or a listing that finished below its limit. A capped or failed listing leaves the answer unknown.
  • Hold vs live done (fm-crew-state.sh): the stand-down hold now overrides only finished runs, so a live checks-green done keeps its verdict and PR link.

All three threads are resolved, and Greptile is 5/5 on this head. The attestation binds 9733ec38 with every step completed. Live is go 3 of 6. The three untested rows are failure-injection cases (a failed exit, a capped listing, a run started after stand-down), and hermetic tests cover them. The retried stand-down against a real Claude worker was driven live. Repo invariants, the coverage guard and the no-mistakes check pass, and there are no workflow, network or secret changes.

I've added full-ci, so the Full suite runs on this head. Contract-class: new-default (unchanged). An unconfigured fleet gains stand-down / repair-worker-state verbs, durable *.worker-state records, a watcher and crew-state exemption for proven holds, and an fm-send refusal. VISION: one captain, scripts own the mechanics, restart, delegation, vendor and scope all align. Authority is in tension because the new verbs have no opt-in gate, which is why Kun decides. If the Full suite is green, this goes to Kun as a merge-or-leave decision. Nothing more is needed from you, and any merge conflict is ours to fix.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: @kunchenguid this one is ready for your merge-or-leave call. The Full suite passed on 9733ec38 (run 41792357795), along with the quick checks, the no-mistakes check (attestation binds this head, no skipped steps) and Greptile 5/5 with every thread resolved. Live is go 3 of 6; the three untested rows are failure-injection cases that hermetic tests cover.

Contract-class: new-default. An unconfigured fleet gains stand-down / repair-worker-state verbs, durable *.worker-state records, a watcher and crew-state exemption for proven holds, and an fm-send refusal, with no opt-in gate. VISION: one captain, scripts own the mechanics, restart, delegation, vendor and scope align; authority is in tension because the new verbs are always on, which is why this is your call. Note: the PR body says the ci-1 regression test does not fail on the pre-fix scripts (ci-2 and ci-3 do). Rockets: none.

@AgardnerAU nothing more is needed from you; this is waiting on Kun, and any merge conflict is ours to fix.

@AgardnerAU AgardnerAU changed the title feat(bin): add worker stand-down so held tasks stop raising false wedge alarms feat(bin): add worker stand-down and repair to fm-control Nov 15, 2026
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thanks @AgardnerAU. I checked the refresh. Head f136f732 merges main 427056c4 into the head I flagged before (9733ec38) and adds one doc line in docs/agent-control.md: a live run whose checks went green keeps its step authority over a stand-down. Against main, the diff has the same files and line counts as the version Kun is looking at, apart from that line. It still touches no workflow, CI or credential files. The attestation binds f136f732 with no skipped steps. The no-mistakes check, coverage guard and repo invariants pass, and there are no open review threads. The full-ci label is still on, so the Full suite is running again on this head.

Nothing changes in where this stands: it is still waiting on Kun's merge-or-leave decision, not on you. Contract class: new-default (unchanged). Any merge conflict is ours to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-ci Maintainer go-ahead: run the full CI suite on this outside pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants