Skip to content

feat(bin): include commit conventions in generated briefs (land of upstream #1587) - #49

Open
sbracewell64 wants to merge 1 commit into
mainfrom
fm/land-commit-conventions-fix
Open

feat(bin): include commit conventions in generated briefs (land of upstream #1587)#49
sbracewell64 wants to merge 1 commit into
mainfrom
fm/land-commit-conventions-fix

Conversation

@sbracewell64

Copy link
Copy Markdown
Owner

Lands upstream PR kunchenguid#1587 (commit 7f62937, "feat(bin): carry the commit conventions into every generated brief") onto this fork's trunk so the running fleet actually gets it.

Nothing was redesigned and nothing was re-reviewed. The change was already reviewed upstream; the upstream contribution stays open and untouched on the maintainer's schedule. Only that contribution's own changes are carried here.

What it fixes

Verified against fork trunk ed376cf: bin/fm-brief.sh renders no commit-conventions section at all, so no generated brief on any project tells a worker that no agent name or Co-Authored-By trailer may appear in a commit, or that the fleet's conversational conventions must stay out of commit messages, PR titles, PR bodies, and anything other tools read. The change renders one shared # Commit conventions block into all five committing brief variants, beside each one's delivery instructions.

Conflict resolution

The cherry-pick conflicted in one hunk of bin/fm-brief.sh, in the scout scaffold. Trunk has since added $WHO_IS_SPEAKING and $VERIFICATION_DISCIPLINE at exactly the insertion point. Resolved by keeping both trunk sections and appending the contribution's commit-conventions block plus its scout-specific promotion sentence after them. The other two insertion points (ship and secondmate charter) applied cleanly, as did the whole test file.

Delivery disclosure

This shipped direct-PR without the no-mistakes pipeline, under the captain's time-boxed authorization of 2026-08-04.

  • It carries no attestation marker, because the pipeline did not run and did not sign this head.
  • It has had no automated code review and no pipeline gates.
  • The verification below is everything that was run, reported as-is including failures.

Verification

Behavioural proof of the fix, negative control first. With the unfixed scaffold in place, the new test was witnessed red:

not ok - ship mode=no-mistakes: brief has no commit-conventions section

With the fix in place, tests/fm-brief.test.sh is fully green (25 assertions), including fm-brief.sh: every committing brief variant carries the commit conventions. Briefs were then generated from this head for all five committing variants and each was confirmed to contain the no-agent-co-author rule exactly once:

ship no-mistakes -> 1   ship direct-PR -> 1   ship local-only -> 1   scout -> 1   secondmate -> 1

Lint. bin/fm-lint.sh passes (ShellCheck 0.11.0, pinned 0.11.0).

Full suite. bin/fm-test-run.sh --all at this head: total=133 failed=11 skipped_gate=13. Every one of the 11 failures was investigated:

Failing script Pre-exists on base ed376cf?
fm-backend-tmux-smoke yes
fm-busy-adapter-wiring yes
fm-calm-pi-extension yes
fm-launch yes
fm-pi-watch-extension yes
fm-remote-secondmate-lifecycle-e2e yes
fm-session-start yes
fm-tmux-agent-liveness yes
fm-turnend-guard yes
fm-watcher-lock yes
fm-secondmate-harness yes, environment-specific - proven below

Ten were proven pre-existing by replaying the same scripts against a clean extraction of base ed376cf, where all ten fail identically.

fm-secondmate-harness needed a two-way control, because it passed in the base extraction (2/2) while failing at this head (3/3). Its failing assertion is Claude secondmate with a fresh beacon should use auto-arm supervision, unrelated to brief content.

  • Base extraction with this PR's patch applied: passes. So the change does not cause the failure.
  • This worktree with the base file content checked out (git checkout ed376cf -- bin/fm-brief.sh tests/fm-brief.test.sh): still fails, with the identical assertion and identical output.

The failure therefore tracks the checkout environment, not this change. It is a pre-existing environment-specific failure, not a regression introduced here.

AGENTS.md section 1 forbids naming an agent as a commit co-author, and bars
the fleet's captain-address and nautical conventions from commits, PRs, and
anything other tools read. Neither rule reached a worker: bin/fm-brief.sh
stated neither, so a generated brief carried the co-author rule only on
firstmate-repo tasks, and then only because those briefs separately name the
firstmate-coding-guidelines skill, which carries it. Every worker on every
other project was silently missed.

Both are structurally the same gap. A crewmate does not read this repo's
AGENTS.md for another project, and its own harness instructions may actively
tell it to append a Co-Authored-By trailer, so the brief is the only place
either rule can arrive. Commit 53932fb on fm/platform-landing-battery-windows-reds
shipped a Co-Authored-By trailer for exactly this reason, and a separate
incident leaked captain address into a commit subject the same way.

Render a "# Commit conventions" section from one shared value into all three
scaffolds that can reach a commit - ship for all three delivery modes, scout,
and the secondmate charter - placed beside each one's delivery instructions
rather than in the preamble. In the ship scaffold it is the last thing before
"the task is complete only when committed on your branch". The scout copy adds
that scratch commits are held to the same bar because a scout can be promoted
in place. Rule numbering is untouched, so no cross-reference moves.

test_every_committing_variant_carries_commit_conventions generates all five
variants and asserts both rules plus the placement constraint. Witnessed red
against the unfixed scaffold first: all five generated variants contained zero
occurrences of either rule.
@sbracewell64

Copy link
Copy Markdown
Owner Author

Local test-suite attribution

Full local suite at this branch's head: FM_TEST_SUMMARY total=133 failed=11 skipped_gate=13.

None of the 11 failures come from this change. Attribution below is proven by replay, not asserted.

10 failures pre-exist on the base

Base ed376cf was extracted clean (git archive) and the same 11 scripts were replayed against it. Result: FM_TEST_SUMMARY total=11 failed=10, with byte-identical failure messages apart from embedded pids. Failing scripts on both head and base:

  • tests/fm-backend-tmux-smoke.test.sh — the tmux task shell did not become ready
  • tests/fm-busy-adapter-wiring.test.sh — a running harness-named foreground process must classify alive
  • tests/fm-calm-pi-extension.test.sh — Pi calm home resolution failed: node:internal/modules/esm/get_format:219
  • tests/fm-launch.test.sh — launch must come from launch_template, ghost-text suppression included
  • tests/fm-pi-watch-extension.test.sh — Pi extension must surface an external healthy watcher as an owned-wake failure
  • tests/fm-remote-secondmate-lifecycle-e2e.test.sh — first inheritance transaction never reached its blocked write
  • tests/fm-session-start.test.sh — MISSING diagnostic did not appear at all
  • tests/fm-tmux-agent-liveness.test.sh — turn_end drive failed: node:internal/modules/esm/get_format:219
  • tests/fm-turnend-guard.test.sh — Pi guard must inject once for no-tool and multi-tool logical runs
  • tests/fm-watcher-lock.test.sh — restart did not attach to the verified healthy peer

1 failure is environment-specific, not from this change

tests/fm-secondmate-harness.test.sh failed at head (Claude secondmate with a fresh beacon should use auto-arm supervision) but passed on the base extraction, which on its own looks like a regression. A two-way control shows it is not:

  • Base extraction with this branch's patch applied — passes.
  • This worktree with bin/fm-brief.sh and tests/fm-brief.test.sh reverted to base content — still fails identically.

The failure follows the working directory, not the change. The assertion is about secondmate supervision auto-arm and touches no brief content.

CI checks on this PR

12 passed, 2 failed, 14 total. Both failures are expected and neither is fixed or silenced here:

  1. PR must be raised via no-mistakes — fails by design. This PR ships direct-PR and carries no attestation marker, as disclosed in the body. Nothing was written or implied to satisfy this check.
  2. Behavior portable serial 2 — trunk-wide, not from this branch. Proven: run 31104509462 on the unrelated branch fm/land-daemon-liveness-1611 (PR feat(bin): surface validation daemon liveness at session start (land of upstream #1611) #50), off the same trunk ed376cf with entirely different content, fails the identical job, as does this PR's run 31104400224.

What did pass

  • bin/fm-lint.sh — clean (ShellCheck 0.11.0, pinned)
  • tests/fm-brief.test.sh — 25 assertions, 0 failed, and witnessed failing first against the unfixed scaffold (not ok - ship mode=no-mistakes: brief has no commit-conventions section) before passing here

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