Skip to content

fix: keep greetings out of no-mistakes commit subjects - #66

Merged
peterOC26 merged 4 commits into
mainfrom
fm/fm-nm-commit-subject-address-a1
Nov 15, 2026
Merged

peterOC26 merged 4 commits into
mainfrom
fm/fm-nm-commit-subject-address-a1

Conversation

@peterOC26

@peterOC26 peterOC26 commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Intent

no-mistakes commit subjects address the captain ('Aye, aye, captain')

Resolution recorded by fm-captain-hold.
Decision digest: 5bdc02baef9afb174011b9518ace85ceccc9553f92fc3327f30be8528c439697
Resolution mode: released

Captain decision:
Captain 2026-11-15 (Jobs page note 1794703235-3uxISq): "The 11 firstmate fixes - do all of these". Start now instead of the staggered dates; Grok builds, DeepSeek checks, firstmate repo reviews one at a time (fleet 133), captain merges each.

Found 2026-10-22: pipeline-written commits on PR 180 (2fba8626, 5846727a, 186609c9) and firstmate PR 31 (09fd8d6) start with 'Aye, aye, captain', which AGENTS.md forbids in commit messages. Likely the routine-step agent reads the captain-address rule as applying to commits. Fix where the pipeline prompt or config is owned; existing pushed commits stay unless the captain approves a rewrite.

"The 11 firstmate fixes - do all of these" (2026-11-15)

Captain Q2110 A: ship the partial fix now (document, test and CI paths plus the behaviour test); leave the review-fix path to the tool. Do not change no-mistakes.

What Changed

  • .no-mistakes.yaml now tells the document, test, and CI prompts that the summary field becomes the git commit subject, so it must not greet or address anyone. It adds a ci.instructions block for this, and a header comment explains why no repository setting can reach review-fix subjects.
  • tests/fm-nm-test-contract.test.sh adds test_branch_commit_subjects_do_not_greet. The test reads the commit subjects in origin/main..HEAD and fails on any subject that contains "aye, aye, captain", "aye aye, captain", or "captain,". The match ignores case.
  • AGENTS.md now lists the pipeline summary field that becomes a commit subject among the non-chat artifacts where direct address is forbidden. docs/architecture.md now notes that the .no-mistakes.yaml header owns this boundary.

🤖 Generated with Claude Code

Known limit

Review-fix commit subjects stay inside no-mistakes. The subject is the agent summary field, wrapped by commit.fix_message. No repository file is copied into the review-fix prompt, and this pull request does not change no-mistakes. Closing that path needs a no-mistakes change: copy a repository instruction into the review-fix prompt, or reject a greeting in the summary before it is stored as the commit subject. Document, test, and CI prompts in this repository already carry that boundary. Commit subjects on this branch are checked through git.

Risk Assessment

✅ Low: The change adds a guard sentence to three prompts, sharpens one AGENTS.md sentence and one docs pointer, and adds a git-log subject check. The round-1 case-insensitive fix is correct: it catches 'Aye, aye, captain.', 'aye aye, captain' and 'captain, ...', and it flags none of the 623 subjects in this repository's history.

Testing

I ran the changed contract test against this branch's real commit subjects, and it passed. In a throwaway clone I added greeting commits: the reported "no-mistakes(review): Aye, aye, captain.", "Aye aye, captain - fix lint", a lowercase "captain," subject and an uppercase "CAPTAIN," subject. The test failed with the offending subject each time. Ordinary subjects that mention "captain" ("captain-held task", "captain decision flow") still passed. The base commit's test file did not catch the reported greeting, so the regression check is new. Parsing .no-mistakes.yaml showed the boundary sentence as the last line of the document, ci and test instructions. I did not check whether a live model actually stops writing greetings, because that needs a real no-mistakes pipeline run, which this phase is not allowed to start. Overall result: pass.

  • Live validation: ✅ go - 6 of 7 scenarios driven live against the product
Scenario Result Live Evidence
Run the contract test on this branch's real commit subjects: it passes because none greet ✅ pass live branch-test-run.txt: both checks ok, exit=0 over origin/main..HEAD (4 commits)
Add the reported subject "no-mistakes(review): Aye, aye, captain." in a throwaway clone: the test fails and names it ✅ pass live adversarial-subjects.txt: 'not ok - commit subject greets: no-mistakes(review): Aye, aye, captain.' exit=1
Add greeting variants (no comma between the ayes, lowercase "captain,", uppercase "CAPTAIN,"): the test fails for each ✅ pass live adversarial-subjects.txt: exit=1 for 'Aye aye, captain - fix lint', 'no-mistakes(ci): captain, fixed the shard', 'no-mistakes(document): CAPTAIN, docs updated'
Add ordinary subjects that mention captain without greeting: the test still passes ✅ pass live adversarial-subjects.txt: exit=0 for 'fix: keep captain-held task parked' and 'docs: describe the captain decision flow'
Run the base commit's test on a greeting commit: it passes, so the reported failure went uncaught before this change ✅ pass live prefix-reproduction.txt: only the commands.test check runs, exit=0 even with the greeting subject
Parse .no-mistakes.yaml: document, ci and test instructions all end with the commit-subject boundary sentence ✅ pass live parsed-instruction-fields.txt
A live pipeline agent writes a non-greeting summary when given the new instructions ⏸️ untested no Needs a real no-mistakes pipeline run (axi run or rerun), which this phase may not start. no-mistakes has no command that prints the final prompt without running the pipeline. The instructions this ph…
Evidence: Branch contract test run

Source: Branch contract test run

ok - no-mistakes does not configure commands.test
ok - commit subjects on this branch do not greet
exit=0
Evidence: Adversarial greeting and benign subjects against the test

Source: Adversarial greeting and benign subjects against the test

\### subject: no-mistakes(review): Aye, aye, captain.
ok - no-mistakes does not configure commands.test
not ok - commit subject greets: no-mistakes(review): Aye, aye, captain.
exit=1

\### subject: Aye aye, captain - fix lint
ok - no-mistakes does not configure commands.test
not ok - commit subject greets: Aye aye, captain - fix lint
exit=1

\### subject: no-mistakes(ci): captain, fixed the shard
ok - no-mistakes does not configure commands.test
not ok - commit subject greets: no-mistakes(ci): captain, fixed the shard
exit=1

\### subject: no-mistakes(document): CAPTAIN, docs updated
ok - no-mistakes does not configure commands.test
not ok - commit subject greets: no-mistakes(document): CAPTAIN, docs updated
exit=1

\### subject: fix: keep captain-held task parked
ok - no-mistakes does not configure commands.test
ok - commit subjects on this branch do not greet
exit=0

\### subject: docs: describe the captain decision flow
ok - no-mistakes does not configure commands.test
ok - commit subjects on this branch do not greet
exit=0
Evidence: Base commit test file misses greeting (before fix)

Source: Base commit test file misses greeting (before fix)

\### base-commit test file against greeting subject
ok - no-mistakes does not configure commands.test
exit=0
Evidence: Parsed instruction fields

Source: Parsed instruction fields

document.instructions last line: The summary field is the git commit subject, not a chat message, so it must not greet or address anyone.
ci.instructions last line: The summary field is the git commit subject, not a chat message, so it must not greet or address anyone.
test.instructions last line: The summary field is the git commit subject, not a chat message, so it must not greet or address anyone.
review keys: nil

Pipeline

Updates from git push no-mistakes

✅ **Intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 1 info
  • ⚠️ tests/fm-nm-test-contract.test.sh:38 - The new test only catches two exact, case-sensitive spellings: *"Aye, aye, captain"* and *"Captain,"*. It catches the reported subject "no-mistakes(review): Aye, aye, captain.". It misses close variants a model is just as likely to write, such as "Aye aye, captain - fix lint", "aye, aye, captain" or "no-mistakes(ci): captain, fixed the shard". The rule it relies on (AGENTS.md:14) forbids any direct address in a commit subject, not one spelling. So a greeting commit can still pass this check silently. Remedy: match case-insensitively, for example by lowercasing the subject first or using shopt -s nocasematch inside the function. Also accept an optional comma between the two "aye" words. Keep the comma after "captain" so ordinary subjects like "captain-held task" do not trigger it. No other places in the change need the same fix.
  • ℹ️ tests/fm-nm-test-contract.test.sh:33 - The test exits with a failure whenever origin/main cannot be resolved, for example in a local clone with no origin remote or a fork whose upstream has a different remote name. Every CI test job checks out with fetch-depth 0, and the gate worktree has origin/main, so the places where the suite actually runs are covered. A stale local origin/main only widens the range to squash-merged main commits, which do not greet. This is noted as a tradeoff only.

🔧 Fix applied.
1 info still open:

  • ℹ️ tests/fm-nm-test-contract.test.sh:33 - The test exits with a failure whenever origin/main cannot be resolved, for example in a local clone with no origin remote or a fork whose upstream has a different remote name. Every CI test job checks out with fetch-depth 0, and the gate worktree has origin/main, so the places where the suite actually runs are covered. A stale local origin/main only widens the range to squash-merged main commits, which do not greet. This is noted as a tradeoff only.
✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 6 of 7 scenarios driven live against the product
Scenario Result Live Evidence
Run the contract test on this branch's real commit subjects: it passes because none greet ✅ pass live branch-test-run.txt: both checks ok, exit=0 over origin/main..HEAD (4 commits)
Add the reported subject "no-mistakes(review): Aye, aye, captain." in a throwaway clone: the test fails and names it ✅ pass live adversarial-subjects.txt: 'not ok - commit subject greets: no-mistakes(review): Aye, aye, captain.' exit=1
Add greeting variants (no comma between the ayes, lowercase "captain,", uppercase "CAPTAIN,"): the test fails for each ✅ pass live adversarial-subjects.txt: exit=1 for 'Aye aye, captain - fix lint', 'no-mistakes(ci): captain, fixed the shard', 'no-mistakes(document): CAPTAIN, docs updated'
Add ordinary subjects that mention captain without greeting: the test still passes ✅ pass live adversarial-subjects.txt: exit=0 for 'fix: keep captain-held task parked' and 'docs: describe the captain decision flow'
Run the base commit's test on a greeting commit: it passes, so the reported failure went uncaught before this change ✅ pass live prefix-reproduction.txt: only the commands.test check runs, exit=0 even with the greeting subject
Parse .no-mistakes.yaml: document, ci and test instructions all end with the commit-subject boundary sentence ✅ pass live parsed-instruction-fields.txt
A live pipeline agent writes a non-greeting summary when given the new instructions ⏸️ untested no Needs a real no-mistakes pipeline run (axi run or rerun), which this phase may not start. no-mistakes has no command that prints the final prompt without running the pipeline. The instructions this ph…
  • bash tests/fm-nm-test-contract.test.sh on the run worktree (origin/main..HEAD = 4 branch commits)
  • Disposable clone at 29a94de with an added empty commit for each of six subjects, then bash tests/fm-nm-test-contract.test.sh in each
  • Disposable clone at base 4f53948 with a greeting commit added, running the pre-fix test file to show the regression was not caught before
  • ruby -ryaml parse of .no-mistakes.yaml to read the last line of document/ci/test.instructions and confirm no review section
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

no-mistakes stores the agent summary field as the commit subject and
writes that commit without repository hooks. Document, test, and CI
prompts now carry a boundary that the summary is not a chat message.
The chat-address rule names that summary field as a commit subject.
Commit subjects on this branch are read through git. A subject that greets fails the contract. Review-fix subjects still come from no-mistakes, which this change does not modify.
@peterOC26
peterOC26 force-pushed the fm/fm-nm-commit-subject-address-a1 branch from 8261b2e to 29a94de Compare November 15, 2026 01:58
@peterOC26 peterOC26 changed the title fix: keep pipeline commit subjects free of greetings fix: keep greetings out of no-mistakes commit subjects Nov 15, 2026
@peterOC26
peterOC26 merged commit a3e5044 into main Nov 15, 2026
32 checks passed
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.

1 participant