Skip to content

fix(bin): unblock exits, rotate mates, and detect quota stalls - #8370

Open
taimurrabuske wants to merge 17 commits into
kunchenguid:mainfrom
taimurrabuske:fm/fm-mate-throughput-fixes-upstream-20261111
Open

taimurrabuske wants to merge 17 commits into
kunchenguid:mainfrom
taimurrabuske:fm/fm-mate-throughput-fixes-upstream-20261111

Conversation

@taimurrabuske

Copy link
Copy Markdown

Intent

have we unbloated and sped up task execution in FM?
let's fix the 3
one-time publish!

Context: a throughput audit found three Firstmate-side problems:

  1. Every bin/fm-control.sh exit/relaunch of a busy Pi second mate today failed with phase=failed:stopping and rollback=instructions-restored-agent-alive, because the composer check runs about 0 s after the final interrupt key, before the composer settles (around lines 521-526 and 787-801 of bin/fm-control.sh: send_interrupt_keys exits immediately on the final press without sleeping the press gap, and do_exit probes fm_backend_composer_state once right after Escape while Pi is still aborting its turn, rather than polling up to a bounded settle timeout). The same refusal ("composer state is unknown, not proven empty") blocked bin/fm-secondmate-restart.sh for all four mates, and agy (Gemini 4 Carbon) workers can never be exited because their bare ">" composer always classifies unknown. Mates had to be restarted by hand (Escape, Ctrl+C to clear, /quit, then bin/fm-spawn.sh --secondmate).
  2. Second mates ran with 674k-1,032k-token sessions and long turns (3.7x-6.0x slower per step above 200k-800k tokens), leaving half the lanes empty; nothing rotates a mate session before it bloats (proposal: rotate/compact an idle mate onto a fresh session at about 250k context tokens, at most once per window, after persisting its open work through bin/fm-secondmate-restart.sh).
  3. Workers stalled for hours on hard quota errors (Z.AI 1308 5-hour cap, Z.AI 1310 weekly/monthly cap, Antigravity/Gemini 429 quota reached, Codex/Claude usage limits, and repeated Z.AI 1302 rate-limit storms of >= 5 errors) before anyone relaunched them; 25 tasks lost about 22 worker-hours today. Proposal: a quota pre-flight before spawn (using quota-axi when a candidate is exhausted_now) and a watcher circuit breaker that detects hard quota/rate-limit refusals in a live worker and wakes the owning firstmate so it relaunches the worker on the next same-group candidate per config/crew-dispatch.json (never crossing groups).
    The captain granted one-time upstream contribution consent for this task: github.com/kunchenguid/firstmate.

What Changed

  • Make control-plane exits wait for composer settling, safely clear agy composers, and support fresh-session relaunches.
  • Add opt-in rotation for oversized idle second-mate sessions through persist-then-restart with per-mate cooldowns.
  • Add advisory quota preflight and an opt-in circuit breaker for hard quota and rate-limit stalls, preserving same-group dispatch recovery.

Risk Assessment

⚠️ Medium: The change is broadly bounded, but a narrow relaunch race can still trigger an unnecessary replacement of a healthy worker.

Testing

Validated control settling, AGY lifecycle behavior, quota preflight and breaker wakes, mate rotation, and end-to-end restart/rotate flows; all targeted checks passed with reviewer-visible logs captured.

Evidence: Control lifecycle tests

Source: Control lifecycle tests

ok - fm-control exit: every verified harness gets its own verified exit command
ok - fm-control exit: a recorded OpenCode major picks /exit (1.x) or Ctrl-U then Ctrl-C (2.x)
ok - fm-control exit: OpenCode 2.x retries Ctrl-C exactly once while the agent is still alive
ok - fm-control interrupt: every verified harness gets its own verified key and repeat count
ok - fm-control Devin interrupt: second press only after the armed hint, then busy invalidated without fabricating idle
ok - fm-control Devin interrupt: an idle agent gets one Escape and reports not-running
ok - fm-control Devin exit: a busy record whose turn already ended never opens the revert picker
ok - fm-control Devin interrupt: a revert picker a press opened is closed with Escape, never Enter
ok - fm-control Devin: an open revert picker refuses every typed command
ok - fm-control interrupt: opencode needs a double Escape, claude a single one
ok - fm-control: a harness with no verified control mechanics is refused, not guessed at
ok - fm-control-lib: a recorded harness resolves to its verified adapter without guessing
ok - fm-control-lib: only a runtime's own recorded session has a relaunch resume form
ok - fm-control: prefixed recorded harnesses reach interrupt and exit mechanics
ok - fm-control-lib: the backend key matrix matches each adapter's real send-key surface
ok - fm-control-lib: adapter capability is per task kind, not per adapter alone
ok - fm-control interrupt: a backend that cannot deliver the harness's key refuses instead of sending another
ok - fm-control: a backend that cannot prove an agent stopped refuses exit and relaunch
ok - fm-control relaunch: commandcode off tmux and herdr is refused before the running agent is stopped
ok - fm-control relaunch: Hermes profile model and gateway refusals preserve the current worker
ok - fm-control-lib: stop-proving verbs are gated on the backends that really classify agent state
ok - fm-control: a legacy window label is refused and the exact task id is named
ok - fm-control: an explicit backend endpoint is never a control target
ok - fm-control: an unrecorded task id is refused
ok - fm-control: a record whose endpoint identity names another task is refused
ok - fm-control: a remotely placed secondmate is refused by placement, not by a metadata complaint
ok - fm-control: interrupt and exit lock before task-state resolution
ok - fm-control: the verb list is closed - no raw keys, arbitrary text, or clear verb
ok - fm-control: resume is refused with the determinism reason and the alternative
ok - fm-control: profile and note flags belong to relaunch only
ok - fm-control exit: an already-stopped agent is idempotent success with no bytes sent
ok - fm-control exit: an unprovable tmux endpoint refuses instead of claiming the agent stopped
ok - fm-control interrupt: refuses when no agent is running rather than keying a shell
ok - fm-control exit: an endpoint whose process cannot be attributed refuses
ok - fm-control exit: a busy agent receives interrupt delivery before the exit command
ok - fm-control exit: an idle agent goes straight to its exit command
ok - fm-control exit: retiring a codex incarnation drops busy_gen with the sidecar
ok - fm-control exit: an already-open background-task picker is not typed into
ok - fm-control exit: the Enter that opens the background-task picker is not followed by a confirming Enter
ok - fm-control exit: a picker that renders after the submit returned is named when the stop wait times out
ok - fm-control interrupt: unconfirmed delivery preserves observed busy state
ok - fm-control interrupt: muse confirms cancellation from its session log
ok - fm-control interrupt: postconditions are revalidated after acknowledgement polling
ok - fm-control exit: an interrupt-stopped agent satisfies the gone-state postcondition
ok - fm-control exit: a stubborn agent reports delivered input and an unconfirmed exit
ok - fm-control interrupt: grok reports delivery without claiming cancellation
ok - fm-control interrupt: grok's idle footer does not confirm cancellation
ok - fm-control: a lifecycle command to a secondmate is unmarked and opens no reply expectation
ok - fm-control's arrival leaves fm-send's from-firstmate marking untouched
ok - fm-control exit: a busy Pi is exited once its composer settles after the interrupt
ok - fm-control exit: text left in a settled composer still refuses and is never cleared
ok - fm-control exit: a composer that never settles still refuses on an adapter with no clear key
ok - fm-control exit: agy clears only after an explicit idle status marker
ok - fm-control-lib: only agy declares a composer clear key
ok - fm-control-lib: --fresh-session moves a resumed session file aside and refuses a reference it cannot
ok - fm-control: --fresh-session belongs to relaunch only
Evidence: AGY harness tests

Source: AGY harness tests

ok - fm-harness.sh: ancestry detects a natively-named agy command
ok - fm-harness.sh: ancestry rejects unrelated agy mentions
ok - fm-harness.sh: no inherited launcher marker claims the agy identity
ok - fm-control-lib: agy mechanics are Escape once, no clear key, and /quit
ok - fm-busy-lib: only the pinned esc-to-cancel row carries the agy busy verdict
ok - fm-composer-lib: agy delivery signatures never cross harnesses
ok - fm-busy-lib: agy classifies busy, idle, and ambiguous tails distinctly
ok - bin/fm-agent-process-lib.sh: agy is an agent, fragments are not
ok - herdr exit detection: done with a live registry and an agy process view stays live and refuses replacement
ok - herdr exit detection: a registered status over a shell-only pane is stale-agent and still refuses closing
ok - herdr exit detection: a registered pane with an agy foreground stays live however its shell ranks
ok - herdr exit detection: only a positively unregistered pane is agent-free
ok - herdr exit detection: malformed and failed reads stay unknown
ok - fm-spawn: agy launch carries brief, model, effort, and autonomy with cleared markers
ok - fm-spawn: agy omits xhigh from the launch but records it in task metadata
ok - fm-spawn: an unlisted agy model refuses before pane creation
ok - fm-spawn: an unreachable agy listing establishes nothing and launches
ok - fm-spawn: a hung agy listing is cut off by the shared bound and launches unvalidated
ok - fm-spawn: a zero FM_AGY_MODELS_TIMEOUT is clamped to the default bound
ok - fm-agy-trust.sh: registers the logical and resolved worktree paths and preserves the store
ok - fm-agy-trust.sh: creates agy's settings store when none exists
ok - fm-agy-trust.sh: refuses every out-of-scope path and never rewrites a broken store
ok - fm-spawn: agy pre-registers the worktree and launches straight into a busy turn
ok - fm-spawn: agy answers a dialog that renders anyway exactly once, then confirms busy
ok - fm-spawn: on an unregistered path a premature busy verdict waits for the dialog to be answered
ok - fm-spawn: a busy verdict on an unregistered path without a dialog fails and closes the endpoint
ok - fm-spawn: an agy dialog that never turns busy fails the spawn and closes the endpoint
ok - fm-spawn: a missing agy executable refuses before pane creation
ok - fm-spawn: agy secondmate pre-trusts the secondmate home and records kind=secondmate
ok - fm-spawn: agy arms no busy wiring and writes no sidecar
Evidence: Quota breaker tests

Source: Quota breaker tests

ok - fm-quota-breaker classify: every verified provider refusal maps to its class
ok - fm-quota-breaker classify: a recovered refusal and a single rate limit do not trip
ok - fm-quota-breaker scan: one report per stalled ship or scout incarnation, off without its config
ok - fm-quota-breaker: the watcher sweep queues one wake per stalled worker, only with the gate present
Evidence: Quota preflight tests

Source: Quota preflight tests

ok - fm-quota-preflight: an exhausted candidate gets one notice, a healthy one none
ok - fm-quota-preflight: the declared provider, effort, and quota scope bind safely
ok - fm-quota-preflight: explicit lanes and account roots select the launched account
ok - fm-quota-preflight: ordinary Claude preserves its unset config-root contract
ok - fm-quota-preflight: quiet and successful whenever it has no evidence to speak from
Evidence: Secondmate rotation tests

Source: Secondmate rotation tests

ok - fm-secondmate-rotate tokens: Pi and Claude transcripts are measured, everything else is unmeasured
ok - fm-secondmate-rotate tokens: Herdr bare IDs select exact, unambiguous Pi transcripts
ok - fm-secondmate-rotate tokens: unreadable Herdr registrations stay unmeasured
ok - fm-secondmate-rotate tokens: account-pinned Pi roots are measured
ok - fm-secondmate-rotate scan: only idle local mates past the threshold, at most once per window
ok - fm-secondmate-rotate scan: an invalid restart command does not consume a rotation window
ok - fm-secondmate-rotate: the watcher sweep rotates a due mate and queues one wake
Evidence: Secondmate restart end-to-end tests

Source: Secondmate restart end-to-end tests

ok - T1 persist is a gate, and asks for open records and task status only
ok - T2 the mate persists before anything is stopped
ok - T2b an arrived persist answer is resolved before timeout
ok - T2c a reply between the preliminary scan and timeout decision wins
ok - T3 a runtime that cannot prove a restart falls back to the re-read message
ok - T4 every named mate is accounted for, including one this home does not know
ok - T5 a refused restart leaves the mate running and reports an unknown outcome
ok - T8 a local restart re-resolves this home's pin and reports the runtime that came up
ok - native Ultra survives local restart and the remote restart transport
ok - T6 a remote mate restarts through the host-local control plane over the fm-on hop
ok - T6a a remote mate with a per-mate override restarts onto that override, not the default pin
ok - T6b a remote mate with no override line still restarts onto the default pin
ok - T6d a legacy pin file still restarts the mate onto its first line
ok - T6c an unreadable per-mate pin falls back to the re-read path with its agent left running
ok - T7 an unreachable host is reported honestly instead of claimed as reloaded
ok - T9 the persist gate retains its explicitly allocated correlation
ok - T10 pending persist answers are polled as one fleet
ok - T11 post-stop restart failure is never misreported as a nudge
ok - T12 relaunch waits do not block fleet persistence polling
ok - T13 a dead restart worker cannot hang the parent
ok - T14 a result published during reaping is honored
ok - T15 an already-current live mate is named by the update pass and genuinely restarted
ok - T16 an already-current mate with an unprovable runtime keeps the honest nudge path
ok - T17 a T3 mate is routed to the re-read message by both passes, never restarted
# all fm-secondmate-restart tests passed
ok - T17 --rotate relaunches onto a fresh session after the persist gate and never nudges
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/order-24756/home/state/sm1.git-hooks/commit-msg': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/order-24756/home/state/sm1.git-hooks/applypatch-msg': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/order-24756/home/state/sm1.git-hooks/pre-applypatch': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/order-24756/home/state/sm1.git-hooks/post-applypatch': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/order-24756/home/state/sm1.git-hooks/pre-commit': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/order-24756/home/state/sm1.git-hooks/pre-merge-commit': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/order-24756/home/state/sm1.git-hooks/prepare-commit-msg': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/order-24756/home/state/sm1.git-hooks/post-commit': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/order-24756/home/state/sm1.git-hooks/pre-rebase': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/order-24756/home/state/sm1.git-hooks/post-checkout': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/order-24756/home/state/sm1.git-hooks/post-merge': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/order-24756/home/state/sm1.git-hooks/pre-push': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/order-24756/home/state/sm1.git-hooks/post-rewrite': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/order-24756/home/state/sm1.git-hooks/pre-auto-gc': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/order-24756/home/state/sm1.git-hooks/sendemail-validate': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/arrived-at-bound-4078/home/state/sm1.git-hooks/commit-msg': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/arrived-at-bound-4078/home/state/sm1.git-hooks/applypatch-msg': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/arrived-at-bound-4078/home/state/sm1.git-hooks/pre-applypatch': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/arrived-at-bound-4078/home/state/sm1.git-hooks/post-applypatch': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/arrived-at-bound-4078/home/state/sm1.git-hooks/pre-commit': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/arrived-at-bound-4078/home/state/sm1.git-hooks/pre-merge-commit': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/arrived-at-bound-4078/home/state/sm1.git-hooks/prepare-commit-msg': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/arrived-at-bound-4078/home/state/sm1.git-hooks/post-commit': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/arrived-at-bound-4078/home/state/sm1.git-hooks/pre-rebase': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/arrived-at-bound-4078/home/state/sm1.git-hooks/post-checkout': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/arrived-at-bound-4078/home/state/sm1.git-hooks/post-merge': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/arrived-at-bound-4078/home/state/sm1.git-hooks/pre-push': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/arrived-at-bound-4078/home/state/sm1.git-hooks/post-rewrite': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/arrived-at-bound-4078/home/state/sm1.git-hooks/pre-auto-gc': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/arrived-at-bound-4078/home/state/sm1.git-hooks/sendemail-validate': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/answer-at-timeout-decision-21816/home/state/sm1.git-hooks/commit-msg': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/answer-at-timeout-decision-21816/home/state/sm1.git-hooks/applypatch-msg': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/answer-at-timeout-decision-21816/home/state/sm1.git-hooks/pre-applypatch': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/answer-at-timeout-decision-21816/home/state/sm1.git-hooks/post-applypatch': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/answer-at-timeout-decision-21816/home/state/sm1.git-hooks/pre-commit': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/answer-at-timeout-decision-21816/home/state/sm1.git-hooks/pre-merge-commit': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/answer-at-timeout-decision-21816/home/state/sm1.git-hooks/prepare-commit-msg': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/answer-at-timeout-decision-21816/home/state/sm1.git-hooks/post-commit': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/answer-at-timeout-decision-21816/home/state/sm1.git-hooks/pre-rebase': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/answer-at-timeout-decision-21816/home/state/sm1.git-hooks/post-checkout': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/answer-at-timeout-decision-21816/home/state/sm1.git-hooks/post-merge': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/answer-at-timeout-decision-21816/home/state/sm1.git-hooks/pre-push': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/answer-at-timeout-decision-21816/home/state/sm1.git-hooks/post-rewrite': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/answer-at-timeout-decision-21816/home/state/sm1.git-hooks/pre-auto-gc': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/answer-at-timeout-decision-21816/home/state/sm1.git-hooks/sendemail-validate': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/unknown-29046/home/state/sm1.git-hooks/commit-msg': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/unknown-29046/home/state/sm1.git-hooks/applypatch-m

... [7036 bytes truncated] ...

: Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/concurrent-waits-23259/home/state/sm2.git-hooks/post-rewrite': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/concurrent-waits-23259/home/state/sm2.git-hooks/pre-auto-gc': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/concurrent-waits-23259/home/state/sm2.git-hooks/sendemail-validate': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/post-stop-1533/home/state/sm1.git-hooks/commit-msg': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/post-stop-1533/home/state/sm1.git-hooks/applypatch-msg': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/post-stop-1533/home/state/sm1.git-hooks/pre-applypatch': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/post-stop-1533/home/state/sm1.git-hooks/post-applypatch': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/post-stop-1533/home/state/sm1.git-hooks/pre-commit': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/post-stop-1533/home/state/sm1.git-hooks/pre-merge-commit': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/post-stop-1533/home/state/sm1.git-hooks/prepare-commit-msg': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/post-stop-1533/home/state/sm1.git-hooks/post-commit': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/post-stop-1533/home/state/sm1.git-hooks/pre-rebase': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/post-stop-1533/home/state/sm1.git-hooks/post-checkout': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/post-stop-1533/home/state/sm1.git-hooks/post-merge': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/post-stop-1533/home/state/sm1.git-hooks/pre-push': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/post-stop-1533/home/state/sm1.git-hooks/post-rewrite': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/post-stop-1533/home/state/sm1.git-hooks/pre-auto-gc': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/post-stop-1533/home/state/sm1.git-hooks/sendemail-validate': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/relaunch-polling-4667/home/state/sm2.git-hooks/commit-msg': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/relaunch-polling-4667/home/state/sm2.git-hooks/applypatch-msg': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/relaunch-polling-4667/home/state/sm2.git-hooks/pre-applypatch': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/relaunch-polling-4667/home/state/sm2.git-hooks/post-applypatch': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/relaunch-polling-4667/home/state/sm2.git-hooks/pre-commit': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/relaunch-polling-4667/home/state/sm2.git-hooks/pre-merge-commit': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/relaunch-polling-4667/home/state/sm2.git-hooks/prepare-commit-msg': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/relaunch-polling-4667/home/state/sm2.git-hooks/post-commit': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/relaunch-polling-4667/home/state/sm2.git-hooks/pre-rebase': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/relaunch-polling-4667/home/state/sm2.git-hooks/post-checkout': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/relaunch-polling-4667/home/state/sm2.git-hooks/post-merge': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/relaunch-polling-4667/home/state/sm2.git-hooks/pre-push': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/relaunch-polling-4667/home/state/sm2.git-hooks/post-rewrite': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/relaunch-polling-4667/home/state/sm2.git-hooks/pre-auto-gc': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/relaunch-polling-4667/home/state/sm2.git-hooks/sendemail-validate': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/already-current-17862/home/state/sm1.git-hooks/commit-msg': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/already-current-17862/home/state/sm1.git-hooks/applypatch-msg': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/already-current-17862/home/state/sm1.git-hooks/pre-applypatch': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/already-current-17862/home/state/sm1.git-hooks/post-applypatch': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/already-current-17862/home/state/sm1.git-hooks/pre-commit': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/already-current-17862/home/state/sm1.git-hooks/pre-merge-commit': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/already-current-17862/home/state/sm1.git-hooks/prepare-commit-msg': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/already-current-17862/home/state/sm1.git-hooks/post-commit': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/already-current-17862/home/state/sm1.git-hooks/pre-rebase': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/already-current-17862/home/state/sm1.git-hooks/post-checkout': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/already-current-17862/home/state/sm1.git-hooks/post-merge': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/already-current-17862/home/state/sm1.git-hooks/pre-push': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/already-current-17862/home/state/sm1.git-hooks/post-rewrite': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/already-current-17862/home/state/sm1.git-hooks/pre-auto-gc': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/already-current-17862/home/state/sm1.git-hooks/sendemail-validate': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/rotate-6374/home/state/sm1.git-hooks/commit-msg': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/rotate-6374/home/state/sm1.git-hooks/applypatch-msg': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/rotate-6374/home/state/sm1.git-hooks/pre-applypatch': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/rotate-6374/home/state/sm1.git-hooks/post-applypatch': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/rotate-6374/home/state/sm1.git-hooks/pre-commit': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/rotate-6374/home/state/sm1.git-hooks/pre-merge-commit': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/rotate-6374/home/state/sm1.git-hooks/prepare-commit-msg': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/rotate-6374/home/state/sm1.git-hooks/post-commit': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/rotate-6374/home/state/sm1.git-hooks/pre-rebase': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/rotate-6374/home/state/sm1.git-hooks/post-checkout': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/rotate-6374/home/state/sm1.git-hooks/post-merge': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/rotate-6374/home/state/sm1.git-hooks/pre-push': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/rotate-6374/home/state/sm1.git-hooks/post-rewrite': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/rotate-6374/home/state/sm1.git-hooks/pre-auto-gc': Permission denied
rm: cannot remove '/tmp/fm-secondmate-restart.EqkzVI/rotate-6374/home/state/sm1.git-hooks/sendemail-validate': Permission denied
Evidence: Spawn quota preflight end-to-end evidence

Source: Spawn quota preflight end-to-end evidence

ok - allowlist=absent preserves the operational floor and filters only when opted in
ok - allowlist=missing-config preserves the operational floor and filters only when opted in
ok - allowlist=enabled preserves the operational floor and filters only when opted in
ok - allowlist=empty preserves the operational floor and filters only when opted in
ok - invalid allowlist names refuse before launch or task publication
ok - inaccessible config with present allowlist refuses before launch or task publication
ok - inaccessible config with absent allowlist refuses before launch or task publication
ok - inaccessible ancestor with present allowlist refuses before launch or task publication
ok - inaccessible ancestor with absent allowlist refuses before launch or task publication
ok - secondmate launch inherits the allowlist for subsequent worker launches
ok - local inheritance preserves the allowlist on source errors and mirrors proven absence
ok - remote inheritance preserves the allowlist on source errors and mirrors proven absence
spawn_status=0
quota-preflight: pi:zai/glm-5.3-flash provider zai is exhausted_now at all_models (0% left); this worker will stall on its first request - choose the next same-group candidate
warning: /tmp/fm-spawn-dispatch-profile.lX388k/quota-preflight-e2e/home/data/quota-preflight-e2e/launch-brief.md records no ship branch; defaulting to legacy branch fm/quota-preflight-e2e
warning: /tmp/fm-spawn-dispatch-profile.lX388k/quota-preflight-e2e/home/data/quota-preflight-e2e/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
spawned quota-preflight-e2e harness=pi kind=ship mode=no-mistakes yolo=off window=firstmate:fm-quota-preflight-e2e worktree=/tmp/fm-spawn-dispatch-profile.lX388k/quota-preflight-e2e/wt
meta_profile=pi/zai/glm-5.3-flash/high
- Outcome: 🔧 1 issue found → auto-fixed ✅ across 2 runs (56m33s)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 1 warning
  • 🚨 bin/fm-control.sh:774 - An unknown busy verdict is treated as settled for agy. If agy's esc to cancel marker has scrolled out during a live turn, the classifier returns unknown; this path then sends Ctrl+U and /quit into the still-running turn. Require a proven idle verdict before clearing an unknown composer; keep unknown as unresolved and refuse or continue polling.
  • ⚠️ bin/fm-quota-breaker.sh:86 - The breaker counts Z.AI 1302 errors across the entire captured tail, while other hard signatures use the bottom 15 rows and the contract says stale refusals must not trip it. Four old errors plus one current error can falsely trigger a relaunch of a recovered worker. Count rate-limit refusals within the same recent bottom window.
  • ⚠️ bin/fm-quota-preflight.sh:64 - Provider lookup never examines the top-level crew-dispatch.json .default; it only evaluates .default fields nested inside each rule. A valid default profile such as Pi with provider: zai therefore has no provider resolved, and Pi has no single-provider fallback, so an exhausted candidate receives no preflight notice. Include top-level default profiles in the lookup.

🔧 Fix: Hardened agy settling and corrected quota detection
1 error still open:

  • 🚨 bin/fm-control.sh:1240 - --fresh-session accepts any absolute Herdr session reference as archivable, then archive_fresh_session silently succeeds when the path is missing and moves directories as if they were session files. A deleted or malformed reference therefore stops the old agent instead of refusing before the stop, contradicting the fail-closed fresh-session contract. Require a readable regular file during preflight and do not silently skip it during archiving.

🔧 Fix: Validated fresh-session references before relaunch stopping
2 warnings still open:

  • ⚠️ bin/fm-secondmate-rotate.sh:232 - Rotation launch failures are ignored: the detached child can fail before exec, yet the script records the rotation and reports it started. An invalid restart command can therefore suppress retries for the full window while no restart occurred. Propagate launch failure or record/report it distinctly.
  • ⚠️ bin/fm-quota-preflight.sh:64 - Preflight selects the first profile matching only harness and model across all rules/defaults, while spawn supplies no selected provider or quota scope. Valid profiles can share those fields but differ by effort, rule, provider, or scope, causing false exhausted notices or missed warnings and potentially wrong same-group failover. Use the actual dispatch profile's provider and scope.

🔧 Fix: Hardened rotation launches and disambiguated quota preflight
3 issues (1 error, 2 warnings) still open:

  • 🚨 bin/fm-control.sh:776 - The agy settle path treats every non-busy verdict, including unknown, as settled. An ambiguous agy pane therefore receives Ctrl+U, is coerced to cleared, and then /quit is submitted despite no idle proof. Require an idle* verdict before clearing.
  • ⚠️ bin/fm-control.sh:558 - Because agy now declares C-u as its composer clear key, send_interrupt_keys sends it immediately after Escape, before settle_composer proves the turn is idle. This can modify the composer while cancellation is still in progress; defer agy's clear until the idle-settled path.
  • ⚠️ bin/fm-quota-preflight.sh:83 - An ambiguous profile lookup is followed by a harness-family fallback, so the helper can guess after finding multiple provider/scope pairs. For example, two valid claude profiles with the same harness/model/effort but providers claude and zai leave the lookup empty, then resolve to claude and may emit a false exhaustion notice. Preserve unresolved ambiguity and only use the family fallback when no conflicting profiles match.

🔧 Fix: Preserved ambiguity in quota provider resolution
2 warnings still open:

  • ⚠️ bin/fm-quota-breaker.sh:123 - The breaker scans metadata and residual pane text without verifying the endpoint is still alive. A worker that exits after printing a 1308/1310 error can leave that text visible, causing a later sweep to emit a quota-breaker wake and potentially relaunch an already-dead or completed task. This conflicts with the required behavior of detecting hard refusals “in a live worker”; check agent liveness before classifying.
  • ⚠️ bin/fm-quota-preflight.sh:107 - Preflight joins schema-6 quota rows using only quota_lane(harness, model), while fm-spawn invokes it before resolving the selected worker account. Claude therefore falls back to the default account, and account-pinned Pi/Claude launches cannot reliably inspect the account they will actually use; an exhausted selected account can be missed or the wrong account can produce a false warning. This undermines the required “quota pre-flight before spawn ... when a candidate is exhausted_now” behavior; pass the resolved account identity or run preflight after account selection.

🔧 Fix: Scoped quota checks to live workers and selected accounts
3 warnings still open:

  • ⚠️ bin/fm-secondmate-rotate.sh:233 - Rotation checks only the cached busy record, not endpoint liveness. A dead or shell-only mate with a stale idle record and an oversized transcript can be queued for persist/restart, violating the live-idle guard and potentially sending the persist request to a non-agent endpoint. Require fm_backend_agent_state to be alive before classifying or launching rotation.
  • ⚠️ bin/fm-secondmate-rotate.sh:164 - Herdr session references may be bare IDs, but pi_bound_session rejects non-absolute references and then falls back to the newest transcript. If multiple sessions exist, rotation can measure the wrong conversation and rotate too early or fail to rotate a bloated mate. Resolve the bound ID to its exact transcript or remain unmeasured rather than guessing.
  • ⚠️ bin/fm-quota-breaker.sh:130 - The terminal-task guard examines only tail -n 1, not the last non-empty status line. A terminal status followed by a blank line therefore bypasses the guard; residual quota text can then produce a breaker wake for a completed or failed task. Filter blank lines before matching terminal states.

🔧 Fix: Hardened live rotation, bound sessions, and terminal quota guards
2 warnings still open:

  • ⚠️ bin/fm-quota-breaker.sh:138 - The breaker treats unverified as live, but fm_backend_agent_state defines it as having no recovery-grade liveness classifier. A dead shell with residual quota text can therefore trigger a false relaunch wake. Require alive or a backend-specific positive liveness proof.
  • ⚠️ bin/fm-secondmate-rotate.sh:164 - A single filename match returns before checking other transcripts whose first JSON line may carry the same bound session ID. With chat_<ref>.jsonl plus another file declaring id=<ref>, rotation measures an ambiguous session instead of remaining unmeasured. Combine both match sources before requiring uniqueness.

🔧 Fix: Require verified liveness and reject ambiguous bound sessions
5 warnings still open:

  • ⚠️ bin/fm-secondmate-rotate.sh:190 - Rotation derives Pi and Claude transcript roots only from the parent environment, not the mate's configured account pin. A per-secondmate account can therefore be measured as unmeasured or against another account's newest session, causing missed or incorrect rotations. Resolve the mate's effective account root using the shared account selector before locating transcripts.
  • ⚠️ bin/fm-spawn.sh:3588 - When a quota-breaker selects a different candidate and relaunches it, spawn still passes the original dispatch record's provider and quota scope to preflight. The preflight can consequently report the old candidate's exhaustion or miss the replacement candidate's exhaustion. Derive provider/scope from the actual relaunch profile instead of unconditionally using the stale dispatch record.
  • ⚠️ bin/fm-quota-preflight.sh:64 - A configured Claude account of ordinary intentionally launches with CLAUDE_CONFIG_DIR unset, but preflight converts it to $HOME/.claude and then invokes quota-axi with that environment at line 112. This can inspect a different Claude profile/keychain identity than the worker being launched. Preserve the ordinary-account unset semantics.
  • ⚠️ bin/fm-secondmate-rotate.sh:266 - The rotation-window check and record write are not atomic. Two concurrent scans can both observe an elapsed window, both launch --rotate, and issue duplicate persist/relaunch operations despite the documented at-most-once-per-window invariant. Claim a per-mate lock or atomic marker before launching.
  • ⚠️ bin/fm-quota-breaker.sh:148 - Breaker deduplication is also a read-then-write sequence without locking. Concurrent scans can both report the same class and incarnation, producing duplicate wake notifications within the realert window. Serialize or atomically claim the per-task breaker record before emitting the report.

🔧 Fix: Scoped accounts and serialized rotation and quota recovery
2 issues (1 error, 1 warning) still open:

  • 🚨 bin/fm-spawn.sh:3588 - The preflight tries to read provider/quota_scope from dispatch-resolution.json, but that record stores only harness/model/effort. When two profiles share harness/model with different providers, preflight resolves the candidate as ambiguous and stays silent, so an exhausted selected candidate launches without the required quota warning. Persist the selected provider and quota_scope or pass them from the authoritative dispatch result. This contradicts the required “quota pre-flight before spawn (using quota-axi when a candidate is exhausted_now)” criterion.
  • ⚠️ bin/fm-busy-lib.sh:1018 - AGY is classified idle when any of its last 12 nonblank lines contains ? for shortcuts, without proving that the text is the actual status footer. A worker outputting that phrase can therefore be treated as idle, allowing exit clearing/quit or session rotation during an active turn. Anchor the match to the verified footer position/shape and otherwise retain unknown.

🔧 Fix: Warned on ambiguous quota profiles and anchored AGY idle detection
2 issues (1 error, 1 warning) still open:

  • 🚨 bin/fm-quota-breaker.sh:172 - The quota-breaker wake contains only task/class/harness/model; it carries no matched rule/default group, and dispatch-resolution.json persists only the selected profile. Therefore the firstmate cannot reliably enforce the required “next same-group candidate ... never crossing groups” after a wake, especially after context loss. Persist or propagate the authoritative group identity before relying on this relaunch path.
  • ⚠️ bin/fm-quota-breaker.sh:143 - The breaker emits whenever a merely alive worker has a matching refusal anywhere in the bottom 15 rows. A worker can recover and continue working while the old error remains in that window, causing a false quota wake and potentially an unnecessary relaunch. Require current stalled/idle evidence or validate that no active turn followed the refusal before reporting.

🔧 Fix: Added brief-aware quota wakes and stale-refusal suppression
2 warnings still open:

  • ⚠️ bin/fm-quota-breaker.sh:180 - The scan captures a refusal before reading the worker's spawn generation. If the worker is relaunched between capture and lines 188-194, the old pane output is recorded against the new generation and wakes firstmate to relaunch a healthy replacement. Re-read and compare the incarnation before publishing the breaker record.
  • ⚠️ bin/fm-secondmate-rotate.sh:206 - For a Herdr Pi mate, any failed or unreadable session-registration lookup returns 1 and falls back to the newest transcript. With multiple sessions, an unrelated high-token transcript can trigger rotation of the live mate, while the fresh-session path likewise cannot archive the bound session. Treat unreadable Herdr identity as unmeasured rather than selecting an arbitrary newest session.

🔧 Fix: Guarded breaker generation races and unreadable Herdr sessions
1 warning still open:

  • ⚠️ bin/fm-quota-breaker.sh:202 - The final generation check is not serialized with spawn publication. A relaunch can update the metadata after line 202 but before lines 217-228, causing a stale refusal captured from the old incarnation to be recorded and emitted against a healthy replacement. Hold the shared task metadata lock across the generation check and record publication, as fm-spawn.sh does.
🔧 **Test** - 1 issue found → auto-fixed ✅
  • ⚠️ tests/fm-secondmate-restart.test.sh:794 - The restart suite aborts in T13 because its fixture does not produce the result directory within the 2-second polling window, so the full suite never reaches --rotate. The --rotate scenario passes through the same public interface when run directly.
  • bash tests/fm-control.test.sh
  • bash tests/fm-control-relaunch.test.sh
  • bash tests/fm-agy-harness.test.sh
  • bash tests/fm-secondmate-rotate.test.sh
  • bash tests/fm-quota-preflight.test.sh
  • bash tests/fm-quota-breaker.test.sh
  • bash tests/fm-secondmate-restart.test.sh
  • Focused --rotate execution through the public restart interface

🔧 Fix: Synchronize restart fixture before removing unpublished result
✅ Re-checked - no issues remain.

  • bash tests/fm-control.test.sh
  • bash tests/fm-agy-harness.test.sh
  • bash tests/fm-quota-breaker.test.sh
  • bash tests/fm-quota-preflight.test.sh
  • bash tests/fm-secondmate-rotate.test.sh
  • bash tests/fm-secondmate-restart.test.sh
  • Fixture-driven fm-spawn.sh launch with an exhausted Z.AI snapshot, confirming the advisory preflight notice and persisted profile.
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@greptile-apps

greptile-apps Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 3/5

[Medium impact] The PR changes worker lifecycle and recovery across the configured Firstmate home.

The PR still needs fixes for legacy tasks stopping the watcher and fresh-session relaunches blocking Herdr recovery.

Reviews (4) · Last reviewed commit: "no-mistakes: apply CI fixes" · Reviewed by Greptile

Comment thread bin/fm-quota-breaker.sh Resolved
Comment thread bin/fm-quota-breaker.sh Resolved
Comment thread bin/fm-quota-preflight.sh Resolved
Comment thread bin/fm-control.sh Resolved
Comment thread bin/fm-spawn.sh Resolved
Comment thread bin/fm-watch.sh
breaker_gen=$(printf '%s\n' "$sweep_line" | sed -n 's/.*\[quota-breaker-epoch=[0-9][0-9]* generation=\([^]]*\)\].*/\1/p')
breaker_payload=$(printf '%s\n' "${sweep_line#quota-breaker }" | sed 's/ \[quota-breaker-epoch=[0-9][0-9]* generation=[^]]*\]$//')
fm_wake_append check quota-breaker "check: quota-breaker: $breaker_payload" || exit 1
[ -n "$breaker_id" ] && [ -n "$breaker_class" ] && [ -n "$breaker_epoch" ] && [ -n "$breaker_gen" ] || exit 1

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Older tasks stop the watcher

A stalled legacy task without spawn_gen makes the watcher exit here. The breaker accepts the missing field and emits generation=, but this check requires a nonempty value after saving the wake. The watcher exits before acknowledging the pending report or running the remaining checks. Every replacement watcher repeats the failure.

Handle legacy records before publishing, or allow their empty generation consistently through acknowledgement.

Comment thread bin/fm-control.sh
Comment on lines +1221 to +1226
herdr_state=$(fm_backend_herdr_pane_agent_state "$FM_BACKEND_HERDR_SESSION" "$FM_BACKEND_HERDR_PANE" 2>/dev/null) \
|| herdr_state=unknown
case "$herdr_state" in
no-agent|dead) return 0 ;;
live|stale-agent) ;;
*) die "task $ID's herdr agent registration could not be verified for --fresh-session; refusing before stopping anything" ;;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Fresh relaunch blocks Herdr recovery

relaunch --fresh-session now refuses a Pi task when its Herdr server is stopped. fm_backend_herdr_pane_agent_state returns unknown, so this gate exits before the existing recovery path can restart the recorded server and check the restored pane. Ordinary relaunch already supports this case.

Use the existing absence recheck first, then inspect any restored registration before deciding whether it is unreadable.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thank you @taimurrabuske. I read the full diff against latest main 47df77f3 and approved the fork CI and no-mistakes runs on 1162edd2. Making rotation and the quota breaker notify-only and gated behind their own config files is the right shape. Moving the old session aside instead of deleting it, and keeping the relaunch choice with firstmate through quota-array-dispatch, also fit well.

Three things are waiting on you:

  1. Greptile P1 Older tasks stop the watcher (bin/fm-watch.sh). A stalled task record with no spawn_gen makes the breaker print generation= with an empty value. The watcher then hits exit 1 after appending the wake but before the ack, and every replacement watcher repeats it. A watcher crash loop on a home's older records needs fixing, with a test that has a legacy record.
  2. Greptile P1 Fresh relaunch blocks Herdr recovery (bin/fm-control.sh). With the Herdr server stopped, --fresh-session refuses a Pi task before the existing recovery path can restart the server, which plain relaunch already handles. Run the absence recheck first, then judge the restored registration.
  3. No-mistakes on the current head. The attestation binds c548872c, but the head is now 1162edd2, which has three later commits. Please do one clean git push no-mistakes re-raise after the fixes, so the attestation binds the final head with no skipped steps. If you can, include live scenarios: a real busy Pi exit and an agy exit. The fixes ride along with it.

Please resolve each thread once it's fixed or answered. After that, I'll look at queueing the full suite. The "Full suite" check without the label isn't something you need to act on.

contract-class: new-default. Rotation and the breaker are opt-in, but three parts change every home's unconfigured path. exit now polls the composer for up to 8 s after an interrupt. agy panes now classify idle and get Ctrl+U then /quit, where main documents the agy composer as unknown by design, so exit refuses today. And every ship or scout spawn in a home with config/crew-dispatch.json now runs quota-axi unless FM_QUOTA_PREFLIGHT=off. So once it's otherwise ready and the full suite is green, this goes to the captain for a decision rather than auto-merging. Optional, not a blocker: the exit/agy fix stands on its own, and splitting it from the two opt-in features would make each decision smaller.

VISION: One captain aligns (stalls become firstmate wakes, not captain noise) · Authority mixed (rotation and breaker are explicit grants; exit/agy/preflight change defaults) · Scripts aligns · Restart does not align until P1 #1 is fixed · Delegation aligns in purpose, P1 #2 open · Vendor aligns (agy re-verified on 1.5.6) · Scope cannot tell (three features in one PR).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants