fix: harden no-mistakes validation contract#97
Merged
Conversation
…f-fix duplication Rewrite the no-mistakes validation block scaffolded into every ship brief so a crewmate knows the right move at each gate: the pipeline owns every fix (including the fix for a real bug review finds in the crewmate's own code); respond, never self-implement/abort/re-run; the ask-user loop end to end (feed the decision back via axi respond, do not hand-fix); process every return (backgrounding ok, never idle-wait for auto-advance); avoid --yes (it auto-resolves ask-user with zero escalation); and review findings always gate (review auto-fix is disabled). Add the supervisor heuristic in AGENTS.md: firstmate keys off the no-mistakes run step status - running/fixing/ci means working, awaiting_approval/fix_review means parked (surfaced as awaiting_agent: parked <duration> on axi status) - not shell liveness, plus a self-fix-duplication red flag (hand-commits/abort/re-run mid-validation). Resolves the gate-park-deadlock and self-fix-duplication failure modes.
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
Harden firstmate's no-mistakes validation contract to stop two related crewmate failure modes when driving the no-mistakes pipeline: (A) the gate-park deadlock - idle-waiting at a parked gate expecting it to auto-advance - and (B) self-fix duplication - a crewmate aborting an active run and hand-implementing fixes, including fixes for real bugs review found in its OWN code, instead of letting the pipeline apply them via 'axi respond'. Both stem from the contract saying what NOT to do without naming the right move at the gate.
This is a wording/contract change only: no bin/ script logic beyond the brief text, and no changes to the no-mistakes tool itself (separate repo).
Changes:
Deliberate decisions a reviewer reading only the diff would not know: I intentionally steered the contract AWAY from --yes even though an earlier internal design investigation recommended --yes as a robust deadlock-proof default, because --yes bypasses the ask-user human-escalation contract and the captain wants the human in the loop on genuine product/intent decisions. The wording is grounded in an internal run-model investigation of the no-mistakes axi run/respond/gate behavior (return-vs-block semantics, --yes resolving ask-user findings, the unbounded approval-gate wait) and uses the actual merged field name 'awaiting_agent: parked '. This resolves the queued gate-park-deadlock item and the self-fix-duplication failure mode.
What Changed
Risk Assessment
✅ Low: Captain, the change is a narrow instruction-only update with no substantiated merge-blocking risks found in the changed contract text.
Testing
Exercised the existing brief-generation regression test and an evidence-producing end-to-end brief scaffold; the generated markdown and supervisor contract show the intended gate-driving behavior, with no UI surface involved.
Evidence: Generated no-mistakes ship brief
Evidence: Brief contract and supervisor heuristic evidence
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-tangle-guard.test.shGenerated a real no-mistakes-mode ship brief withFM_HOME=/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KW2TARPF8J51M5T5VY2B6VPF/fm-brief-contract-home bin/fm-brief.sh gate-contract-e2e alphaand asserted the new validation contract text with focusedgrepchecks.CheckedAGENTS.mdwith focusedgrepassertions forrunning/fixing/ci,awaiting_approval/fix_review,awaiting_agent: parked <duration>, andRed flag - self-fix duplication, plus absence of the oldnever backgrounding or idle-waitingcontradiction.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.