Skip to content

fix(bin): recognize passed-with-override as a passing outcome - #5294

Merged
kunchenguid merged 3 commits into
kunchenguid:mainfrom
mremond:fm/fm-passed-with-override-reads-unknown
Sep 22, 2026
Merged

kunchenguid merged 3 commits into
kunchenguid:mainfrom
mremond:fm/fm-passed-with-override-reads-unknown

Conversation

@mremond

@mremond mremond commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Intent

Fixes #4522

fm-crew-state classifies the no-mistakes outcome 'passed-with-override' as unknown, so a finished worker awaiting merge is re-alerted as stale.

Scope is exactly the issue: map passed-with-override as a passing outcome in the resolver, with a behavioral regression test that fails on the current base.

Keep out of scope: the cancelled->failed rounding, the wider precedence rule between run verdicts and declared pauses, and anything already covered by open PR #5068 / issue #5004.

The issue as filed: when a no-mistakes run finishes after an ask-user finding was override-approved, axi status emits outcome: passed-with-override. The outcome case in bin/fm-crew-state.sh only matches the literal tokens passed, checks-passed, failed, and cancelled, so passed-with-override falls through to the default and is classified unknown with detail outcome: passed-with-override. unknown is read by the fleet as "no current-state source", so a finished ship worker awaiting merge keeps being polled and re-alerted as stale or stuck until the task is manually held. The same outcome vocabulary is duplicated in bin/fm-teardown.sh and has the same blind spot, so a pre-teardown abort check also never recognizes the override outcome as terminal. The issue proposes mapping passed-with-override (and any override sibling token no-mistakes emits) to done, identical to a clean pass, updating the header mapping comment, fixing the parallel site in bin/fm-teardown.sh, and adding regression coverage in tests/fm-crew-state.test.sh mirroring test_terminal_passed.

What Changed

  • Map passed-with-override to done in crew-state resolution, using the same PR details as a clean pass, and recognize it as terminal during teardown.
  • Add regression coverage for override outcome resolution and teardown when an abort races with override completion.
  • Update the resolver’s mapping comment and replace duplicated outcome guidance in AGENTS.md with a reference to the resolver.

Risk Assessment

✅ Low: The exact-token change satisfies the requested scope, preserves existing identity and teardown safeguards, and introduces no substantiated defects.

Testing

This retry completed the requested cleanup, passed all six selected fixture-based checks, reproduced both defects on the base, captured CLI evidence, and verified a clean unchanged worktree; live fleet behavior remains untested under the phase restrictions.

  • Live validation: ⚠️ inconclusive - 0 of 3 scenarios driven live against the product
Scenario Result Live Evidence
Inspect an override-approved completed run and see done instead of unknown. ⏸️ untested no No isolated real override-completed run was supplied, and this phase cannot create one. Provide a real run bound to an authorized lab worktree.
Leave a finished worker awaiting merge without repeated stale alerts. ⏸️ untested no The retry scope permits only the named tests and immediate neighbours. Authorize a separate isolated fleet scenario with an open PR and a completed override run.
Clean up a worker when abort races an override-approved completion, without a false refusal. ⏸️ untested no The regression simulates the abort response. Real pipeline abort and approval are forbidden in this phase; authorize this race in a separate isolated validation run.
Evidence: Resolver target: simulated override reports done

Source: Resolver target: simulated override reports done

FIXTURE-BASED BEHAVIORAL VALIDATION; NOT LIVE.
target fm-crew-state.test.sh

TEST: test_terminal_passed

FIXTURE AXI INPUT:
run:
  id: "01RUN"
  branch: fm/feat-d
  status: completed
  head: "34bcbe7ad52b31b3192809b060b07779f8149147"
  pr: "https://github.com/o/r/pull/1"
  findings: none
outcome: passed
PRODUCT OUTPUT (exit 0):
state: done · source: run-step · run passed: PR merged
ok - terminal passed run is authoritative

TEST: test_terminal_passed_with_override

FIXTURE AXI INPUT:
run:
  id: "01RUN"
  branch: fm/feat-override
  status: completed
  head: "344ed3d7ff39cc68a26d2454b0917a825bb81091"
  pr: "https://github.com/o/r/pull/1"
  findings: none
outcome: passed-with-override
ci_override_reason: "live checks not all passed: Lint (fail)"
PRODUCT OUTPUT (exit 0):
state: done · source: run-step · run passed: PR merged
ok - terminal passed-with-override run reads done like a clean pass

TEST: test_terminal_passed_uses_matching_retirement_receipt_without_forge

FIXTURE AXI INPUT:
run:
  id: "01RUN"
  branch: fm/feat-dreceipt
  status: completed
  head: "6883077ce70abe31ade55e67906ecca1b646f327"
  pr: ""
  findings: none
outcome: passed
PRODUCT OUTPUT (exit 0):
state: done · source: run-step · run passed: PR merged
ok - terminal passed run uses matching retirement receipt without forge
Evidence: Cleanup target: simulated override completes successfully

Source: Cleanup target: simulated override completes successfully

FIXTURE-BASED BEHAVIORAL VALIDATION; NOT LIVE.
target fm-teardown.test.sh

TEST: test_parked_own_run_is_aborted_before_teardown

FIXTURE AXI INPUT:
run:
  id: "01RUN"
  branch: fm/task-x1
  status: awaiting_approval
  awaiting_agent: parked 2m10s
  head: "11cd9009a8266e3adf33e5d9d36d91c49f4d2865"
  pr: ""
  findings: none
gate: review
FIXTURE STATUS AFTER ABORT:
outcome: cancelled
PRODUCT EXIT: 0
PRODUCT STDOUT:
~/.no-mistakes/worktrees/acf4a767348a/01M34NDX8QZN4VKXAMPETHR74Q/.nm4522-targeted-mrxvemmx/fm-teardown-tests.G3kDhd/parked-run-abort/project: already current
teardown task-x1 complete (window firstmate:fm-task-x1, worktree ~/.no-mistakes/worktrees/acf4a767348a/01M34NDX8QZN4VKXAMPETHR74Q/.nm4522-targeted-mrxvemmx/fm-teardown-tests.G3kDhd/parked-run-abort/wt)
Backlog: task-x1 just finished (this home keeps no markdown backlog at ~/.no-mistakes/worktrees/acf4a767348a/01M34NDX8QZN4VKXAMPETHR74Q/.nm4522-targeted-mrxvemmx/fm-teardown-tests.G3kDhd/parked-run-abort/data/backlog.md). Update ~/.no-mistakes/worktrees/acf4a767348a/01M34NDX8QZN4VKXAMPETHR74Q/.nm4522-targeted-mrxvemmx/fm-teardown-tests.G3kDhd/parked-run-abort/data/backlog.md - move task-x1 to Done, keep Done to the 10 most recent, then re-scan Queued and dispatch only work whose blockers are gone and date is due.
PRODUCT STDERR:
●━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
●  WATCHER DOWN - SUPERVISION IS OFF
●  1 task(s) in flight, but no live watcher process holds this home lock (last beat: 14s ago).
●  Trust the emitted supervision protocol for this harness; do not use shell & for watcher repair.
●  This is a supervision warning only; the guarded operation WILL still run.
●  repair missing watcher supervision according to the session-start block for this harness; do not use shell &.
●━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
teardown: no-mistakes run for task-x1 is parked at a gate; aborting before the worker is removed
FAKE NO-MISTAKES CALL LOG:
abort --run 01RUN
ok - a task's own parked no-mistakes run is aborted, not orphaned, before the worker is removed

TEST: test_parked_own_run_concludes_on_passed_with_override_after_abort

FIXTURE AXI INPUT:
run:
  id: "01RUN"
  branch: fm/task-x1
  status: awaiting_approval
  awaiting_agent: parked 2m10s
  head: "52fb806a2fceade40e1c3d6a1d0dfeb0ceeead18"
  pr: ""
  findings: none
gate: review
FIXTURE STATUS AFTER ABORT:
run:
  id: "01RUN"
  outcome: passed-with-override
ci_override_reason: "live checks not all passed: Lint (fail)"
PRODUCT EXIT: 0
PRODUCT STDOUT:
~/.no-mistakes/worktrees/acf4a767348a/01M34NDX8QZN4VKXAMPETHR74Q/.nm4522-targeted-mrxvemmx/fm-teardown-tests.G3kDhd/parked-run-abort-passed-with-override/project: already current
teardown task-x1 complete (window firstmate:fm-task-x1, worktree ~/.no-mistakes/worktrees/acf4a767348a/01M34NDX8QZN4VKXAMPETHR74Q/.nm4522-targeted-mrxvemmx/fm-teardown-tests.G3kDhd/parked-run-abort-passed-with-override/wt)
Backlog: task-x1 just finished (this home keeps no markdown backlog at ~/.no-mistakes/worktrees/acf4a767348a/01M34NDX8QZN4VKXAMPETHR74Q/.nm4522-targeted-mrxvemmx/fm-teardown-tests.G3kDhd/parked-run-abort-passed-with-override/data/backlog.md). Update ~/.no-mistakes/worktrees/acf4a767348a/01M34NDX8QZN4VKXAMPETHR74Q/.nm4522-targeted-mrxvemmx/fm-teardown-tests.G3kDhd/parked-run-abort-passed-with-override/data/backlog.md - move task-x1 to Done, keep Done to the 10 most recent, then re-scan Queued and dispatch only work whose blockers are gone and date is due.
PRODUCT STDERR:
●━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
●  WATCHER DOWN - SUPERVISION IS OFF
●  1 task(s) in flight, but no live watcher process holds this home lock (last beat: 12s ago).
●  Trust the emitted supervision protocol for this harness; do not use shell & for watcher repair.
●  This is a supervision warning only; the guarded operation WILL still run.
●  repair missing watcher supervision according to the session-start block for this harness; do not use shell &.
●━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
teardown: no-mistakes run for task-x1 is parked at a gate; aborting before the worker is removed
FAKE NO-MISTAKES CALL LOG:
abort --run 01RUN
ok - a run that lands on passed-with-override after abort is still recognized as terminal

TEST: test_parked_run_advanced_past_unfetched_head_is_still_aborted

FIXTURE AXI INPUT:
run:
  id: "01RUN"
  branch: fm/task-x1
  status: awaiting_approval
  awaiting_agent: parked 2m10s
  head: "e474330"
  pr: ""
  findings: none
gate: review
FIXTURE STATUS AFTER ABORT:
outcome: cancelled
PRODUCT EXIT: 0
PRODUCT STDOUT:
~/.no-mistakes/worktrees/acf4a767348a/01M34NDX8QZN4VKXAMPETHR74Q/.nm4522-targeted-mrxvemmx/fm-teardown-tests.G3kDhd/parked-run-pipeline-advanced-unfetched/project: already current
teardown task-x1 complete (window firstmate:fm-task-x1, worktree ~/.no-mistakes/worktrees/acf4a767348a/01M34NDX8QZN4VKXAMPETHR74Q/.nm4522-targeted-mrxvemmx/fm-teardown-tests.G3kDhd/parked-run-pipeline-advanced-unfetched/wt)
Backlog: task-x1 just finished (this home keeps no markdown backlog at ~/.no-mistakes/worktrees/acf4a767348a/01M34NDX8QZN4VKXAMPETHR74Q/.nm4522-targeted-mrxvemmx/fm-teardown-tests.G3kDhd/parked-run-pipeline-advanced-unfetched/data/backlog.md). Update ~/.no-mistakes/worktrees/acf4a767348a/01M34NDX8QZN4VKXAMPETHR74Q/.nm4522-targeted-mrxvemmx/fm-teardown-tests.G3kDhd/parked-run-pipeline-advanced-unfetched/data/backlog.md - move task-x1 to Done, keep Done to the 10 most recent, then re-scan Queued and dispatch only work whose blockers are gone and date is due.
PRODUCT STDERR:
●━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
●  WATCHER DOWN - SUPERVISION IS OFF
●  1 task(s) in flight, but no live watcher process holds this home lock (last beat: 13s ago).
●  Trust the emitted supervision protocol for this harness; do not use shell & for watcher repair.
●  This is a supervision warning only; the guarded operation WILL still run.
●  repair missing watcher supervision according to the session-start block for this harness; do not use shell &.
●━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
teardown: no-mistakes run for task-x1 is parked at a gate; aborting before the worker is removed
FAKE NO-MISTAKES CALL LOG:
abort --run 01RUN
ok - a parked run the pipeline advanced past the task copy is still concluded from the runs ledger, not orphaned
Evidence: Resolver base: regression reproduces unknown

Source: Resolver base: regression reproduces unknown

FIXTURE-BASED BEHAVIORAL VALIDATION; NOT LIVE.
base fm-crew-state.test.sh

TEST: test_terminal_passed_with_override

FIXTURE AXI INPUT:
run:
  id: "01RUN"
  branch: fm/feat-override
  status: completed
  head: "0936943eb8eb4c7c4f5bd5229932dacb3193bcf0"
  pr: "https://github.com/o/r/pull/1"
  findings: none
outcome: passed-with-override
ci_override_reason: "live checks not all passed: Lint (fail)"
PRODUCT OUTPUT (exit 0):
state: unknown · source: run-step · outcome: passed-with-override
not ok - passed-with-override run -> done, not unknown (missing: 'state: done')
--- output ---
state: unknown · source: run-step · outcome: passed-with-override
Evidence: Cleanup base: regression reproduces refusal

Source: Cleanup base: regression reproduces refusal

FIXTURE-BASED BEHAVIORAL VALIDATION; NOT LIVE.
base fm-teardown.test.sh

TEST: test_parked_own_run_concludes_on_passed_with_override_after_abort

FIXTURE AXI INPUT:
run:
  id: "01RUN"
  branch: fm/task-x1
  status: awaiting_approval
  awaiting_agent: parked 2m10s
  head: "f21ea3c11139ffab0acd1ec228f4c0db1a2bdd03"
  pr: ""
  findings: none
gate: review
FIXTURE STATUS AFTER ABORT:
run:
  id: "01RUN"
  outcome: passed-with-override
ci_override_reason: "live checks not all passed: Lint (fail)"
PRODUCT EXIT: 1
PRODUCT STDOUT:
PRODUCT STDERR:
●━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
●  WATCHER DOWN - SUPERVISION IS OFF
●  1 task(s) in flight, but no live watcher process holds this home lock (last beat: 20s ago).
●  Trust the emitted supervision protocol for this harness; do not use shell & for watcher repair.
●  This is a supervision warning only; the guarded operation WILL still run.
●  repair missing watcher supervision according to the session-start block for this harness; do not use shell &.
●━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
teardown: no-mistakes run for task-x1 is parked at a gate; aborting before the worker is removed
REFUSED: no-mistakes run for task-x1 is still parked after axi abort; confirm it stopped (no-mistakes axi status) or abort it manually (no-mistakes axi abort --run <id>) before retrying teardown.
FAKE NO-MISTAKES CALL LOG:
abort --run 01RUN
not ok - parked-run-abort-passed-with-override: teardown should still succeed: expected exit 0, got 1
- Outcome: ⚠️ 2 warnings across 2 runs (46m47s)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

⚠️ **Test** - 2 warnings
  • ⚠️ The Test agent did not finish within its invocation budget. Reported: agent run tests timed out after 30m0s: agent last produced output 1m26s ago (87 observed); agent reported: codex exited: signal: terminated:. This is a budget or provider-slowness cut, not a code failure. Re-running the same request costs another full budget, so no further attempt is made automatically. If this repository's targeted tests or evidence gathering routinely approach the default 30m0s, raise test_agent_timeout in global config. Respond with fix to spend another budget: a repair turn runs only for selected findings other than this budget cut, then validation re-runs. Or abort and retry after raising the budget.
  • 🚨 Approval is refused: the run worktree at ~/.no-mistakes/worktrees/acf4a767348a/01M34NDX8QZN4VKXAMPETHR74Q holds work no Test turn validated, and the steps after Test would commit and publish it. It holds uncommitted changes to .nm4522-validation/, tests/.nm4522-crew-state-focus.sh, tests/.nm4522-teardown-focus.sh (inspect with git -C ~/.no-mistakes/worktrees/acf4a767348a/01M34NDX8QZN4VKXAMPETHR74Q status and git -C ~/.no-mistakes/worktrees/acf4a767348a/01M34NDX8QZN4VKXAMPETHR74Q diff). Respond with fix to validate it, or abort.

🔧 No changes applied.
2 warnings still open:

  • ⚠️ Live end-to-end evidence remains unavailable: the authorized selectors use fake service and terminal backends, while this active Test phase forbids creating, approving, or aborting a real no-mistakes run. A separately authorized isolated run is needed to verify actual fleet alert suppression and the cleanup race. The outer executor must decide whether the targeted regression evidence is sufficient.
  • ⚠️ live validation verdict: inconclusive (0 of 3 scenarios were driven live against the product); untested: Inspect an override-approved completed run and see done instead of unknown., Leave a finished worker awaiting merge without repeated stale alerts., Clean up a worker when abort races an override-approved completion, without a false refusal.
  • Live validation: ⚠️ inconclusive - 0 of 3 scenarios driven live against the product
Scenario Result Live Evidence
Inspect an override-approved completed run and see done instead of unknown. ⏸️ untested no No isolated real override-completed run was supplied, and this phase cannot create one. Provide a real run bound to an authorized lab worktree.
Leave a finished worker awaiting merge without repeated stale alerts. ⏸️ untested no The retry scope permits only the named tests and immediate neighbours. Authorize a separate isolated fleet scenario with an open PR and a completed override run.
Clean up a worker when abort races an override-approved completion, without a false refusal. ⏸️ untested no The regression simulates the abort response. Real pipeline abort and approval are forbidden in this phase; authorize this race in a separate isolated validation run.
  • Removed .nm4522-validation/, tests/.nm4522-crew-state-focus.sh, and tests/.nm4522-teardown-focus.sh.
  • tests/fm-crew-state.test.sh: test_terminal_passed, test_terminal_passed_with_override, test_terminal_passed_uses_matching_retirement_receipt_without_forge.
  • tests/fm-teardown.test.sh: test_parked_own_run_is_aborted_before_teardown, test_parked_own_run_concludes_on_passed_with_override_after_abort, test_parked_run_advanced_past_unfetched_head_is_still_aborted.
  • python3 ~/.no-mistakes/evidence/01M34NDX8QZN4VKXAMPETHR74Q/targeted-validation.py executed only those six unchanged test functions.
  • The same driver with --base ran only the two new regressions against scripts from 6f0f139962eadaea29487cafead418a0eb2ec6e4; both failed with the expected original symptoms.
  • Captured CLI transcripts, removed temporary selectors and fixtures, verified target HEAD, and confirmed empty git --no-optional-locks status --porcelain.
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

no-mistakes' axi status emits outcome: passed-with-override for a run
that finished with an explicitly approved Test or CI exception. Both
bin/fm-crew-state.sh's outcome resolver and bin/fm-teardown.sh's
pre-teardown terminal-run check only matched the literal passed and
checks-passed tokens, so this outcome fell through to unknown/parked
and a finished worker awaiting merge kept getting re-alerted as stale,
while an abort race during teardown could also leave a finished run
misreported as still parked.

Map passed-with-override to the same done/terminal handling as a
clean passed in both places.