fix(bin): start no-mistakes validation from worker after commit - #3
Open
BohnBawerick wants to merge 2 commits into
Open
fix(bin): start no-mistakes validation from worker after commit#3BohnBawerick wants to merge 2 commits into
BohnBawerick wants to merge 2 commits into
Conversation
…chenguid#2570) * fix(bin): report remote secondmate delivery and state truthfully A steer to a remote secondmate crosses fm-on.sh to a host-local fm-send leg whose unconfirmed submit read-back (verdict=pending, typically a busy mate whose harness queues the steer) was flattened into exit 1, so the parent printed "error: text not submitted" / "error: text not sent" and discarded the pending-reply expectation for a steer that had actually landed. fm-send now carries the verdict across the ssh boundary as a documented delivered-unconfirmed exit 3: the parent reports the steer as delivered with confirmation pending, exits 0, keeps the expectation armed (awaiting_report), and closes --resolve-key decisions, while transport loss (ssh 255) and real remote failures keep failing loudly with the remote leg's stderr attached. A local unconfirmed submit now also exits 3 with an honest non-error message and still never closes a decision key. fm-crew-state.sh and fm-peek.sh no longer read a remote mate's endpoint through local probes (which misreported a healthy mate as "worktree gone" / "can't find session: remote"): both now use the true remote source over fm-on.sh, and an unreachable or unreadable remote reads as unknown-remote, never as gone or dead. * no-mistakes(document): Document remote delivery and state truth * no-mistakes: apply CI fixes
Remove the intermediate pre-PR done: handoff. The implementation worker starts its own no-mistakes CLI run immediately after the commit, reports working: when that run starts, and reports done: only with a PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Remove the intermediate validation handoff from firstmate's task lifecycle, so a worker starts its own validation run the moment its implementation is committed and only reports done when there is a PR. This is option (b) from fm-brief-no-mistakes-cli, approved by the captain on 2026-08-18.
Change AGENTS.md section 7 and the generated brief text in bin/fm-brief.sh that mirrors that handoff. Keep the change to the handoff itself. Do not reopen the option (a) wording that shipped separately in fm-brief-no-mistakes-cli, and do not redesign the status protocol.
Firstmate must still learn when validation starts and when it fails, without the handoff line: a nonterminal working: append at the moment the run starts, and a failed: or blocked: if the run dies mid-pipeline.
The gate contract is unchanged: the worker still stops at an ask-user finding, prints every finding verbatim, waits for one instruction naming the finding ids, never calls no-mistakes axi respond on a finding it was not told to answer, and never passes --yes. Phrase worker-facing text in terms of what the worker must do, never in terms of what firstmate will do for it.
The working path is the no-mistakes CLI (no-mistakes axi run --intent "..."); /no-mistakes is a firstmate skill and is absent in a crewmate worktree.
Cover the generated brief's new contract with a test that goes RED if the handoff text comes back or the start-your-own-run instruction disappears, and prove both directions. Keep bin/ shellcheck-clean. Report any sabotage that stays green.
Push to fork and validate against the PR there, where CI is real. Leave any upstream PR against origin alone. There is no direct-PR fallback. If the fork's main is stale as a PR base, report that as evidence, not a failure of this task.
What Changed
AGENTS.mdandbin/fm-brief.shto remove the intermediate firstmate handoff, instructing workers to start theno-mistakesCLI validation pipeline immediately after committing implementation changes.working:status line when validation begins, reportfailed:orblocked:on errors, and require a green PR before appendingdone:./no-mistakesskill references with directno-mistakesCLI invocations across generated briefs and added contract tests intests/fm-brief.test.shto verify self-started validation.Risk Assessment
✅ Low: The change cleanly removes the intermediate validation handoff in AGENTS.md and bin/fm-brief.sh in favor of worker self-start via the no-mistakes CLI, accompanied by comprehensive contract tests for the generated brief.
Testing
Exercised end-to-end brief generation across ship (no-mistakes, direct-PR, local-only), scout, and secondmate modes, verified that no-mistakes briefs instruct the worker to start its own validation immediately via the no-mistakes CLI without intermediate pre-PR done: handoffs, verified mid-pipeline failure reporting via blocked:/failed:, confirmed absence of /no-mistakes skill references, and proved test sensitivity in both directions via mutation testing.
Evidence: Validation Report
Source: Validation Report
Evidence: Generated Brief - no-mistakes Mode
Source: Generated Brief - no-mistakes Mode
Evidence: Generated Brief - direct-PR Mode
Source: Generated Brief - direct-PR Mode
Evidence: Generated Brief - local-only Mode
Source: Generated Brief - local-only Mode
Evidence: Test Suite Passing Output
Source: Test Suite Passing Output
Evidence: Sabotage Direction 1 RED Output (Handoff Restored)
Source: Sabotage Direction 1 RED Output (Handoff Restored)
Evidence: Sabotage Direction 2 RED Output (Self-Start Missing)
Source: Sabotage Direction 2 RED Output (Self-Start Missing)
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
./tests/fm-brief.test.shbash tests/fm-ask-user-authority.test.shbash tests/fm-gate-refuse.test.shbash tests/fm-task-delivery.test.shbash tests/fm-ensure-agents-md.test.sh./bin/fm-brief.sh test-nomistakes demo-project --mode no-mistakes./bin/fm-brief.sh test-directpr demo-project --mode direct-PR./bin/fm-brief.sh test-localonly demo-project --mode local-only./bin/fm-brief.sh test-scout demo-project --scoutFM_SECONDMATE_CHARTER='...' ./bin/fm-brief.sh test-secondmate --secondmate --no-projectsDual-direction mutation testing againstbin/fm-brief.shto prove RED when restoring legacy handoff text or removing self-start instructions✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.