Skip to content

fix(fm-brief): close the "committed = delivered" gap in ship contracts - #987

Closed
jokim1 wants to merge 1 commit into
kunchenguid:mainfrom
jokim1:fix/brief-scaffold-delivery-gap
Closed

jokim1 wants to merge 1 commit into
kunchenguid:mainfrom
jokim1:fix/brief-scaffold-delivery-gap

Conversation

@jokim1

@jokim1 jokim1 commented Jul 24, 2026 •

Copy link
Copy Markdown
Contributor

Problem: "committed = delivered" trap in the generated ship contract

Ship-task crewmates repeatedly finish their implementation commit, append done: committed <work> to the status file, and then idle forever - never invoking the validation pipeline and never opening a PR.

Observed instances:

  • 2026-07-20: three codex crewmates in one session stopped at done: committed (sp-create-nav-6d, sp-heldout-corpus-4b, sp-combat-panel-2k).
  • 2026-07-24: ct-mcp-profiles-settings-5m stopped at done: committed with 37 passing tests and no pipeline run.

Root cause: the generated ship contract in bin/fm-brief.sh under-specifies that committing is not the definition of done, and the shared status protocol lets done: be appended before the delivery mode's real finish line. Two lines drive it:

  • Each ship-mode Definition of done opened with "The task is complete only when committed on your branch" - literally false for no-mistakes (finish line: PR with green checks) and direct-PR (finish line: PR opened).
  • Rule 4's status protocol listed done: as a valid state with no constraint that it may only be used at the finish line, so a finished commit reads as done:.

Fix

All changes are confined to bin/fm-brief.sh's generated ship contract plus its colocated tests.

  1. Make the finish line unmissable at the point of action. Right after the implementation commit, each mode now states its real finish line and requires driving to it:
    • no-mistakes: immediately invoke /no-mistakes and drive the pipeline through to green CI.
    • direct-PR: immediately push the branch and open the PR.
    • local-only: the committed ready branch is itself the finish line (now named explicitly).
  2. Constrain the status verb. The shared status protocol now reserves done: for the delivery-mode finish line named in Definition of done; a finished implementation commit that has not reached that finish line is working:, never done:. Each mode's DOD repeats the constraint at its point of action.
  3. Tests. tests/fm-brief.test.sh gains test_ship_dod_finish_line_is_not_commit, asserting the finish-line and done:-reservation lines render in generated briefs for all three ship modes.

Wording follows repo style (one sentence per line, plain dashes, literal backticks preserved through the heredocs).

Design note

For no-mistakes, the contract now has the worker drive validation to green immediately after committing rather than stopping at the commit and waiting to be told to run the pipeline. This is what the observed idle-forever failure requires, and it is consistent with the existing "the task worker drives the pipeline" model and with Rule 4 ("a mid-task working: line is nonterminal … continue until a defined done: gate"). Firstmate triggering validation remains a valid supervisory backstop; maintainers may want to align the AGENTS.md "Validate" wording accordingly, which is left out of scope here.

Verification

bin/fm-test-run.sh tests/fm-brief.test.sh   # 16 tests pass, incl. the new one
bin/fm-lint.sh                              # ShellCheck 0.11.0 (pinned) clean
bash -n bin/fm-brief.sh                     # parses cleanly

Ship-task crewmates repeatedly finished their implementation commit, appended
`done: committed <work>`, and idled forever - never invoking the validation
pipeline and never opening a PR. The generated ship contract under-specified
that committing is not the definition of done, and the status protocol let
`done:` be appended before the mode's real finish line.

For every ship mode, make the mode-specific finish line unmissable at the point
of action, immediately after the implementation commit:
- no-mistakes: immediately invoke /no-mistakes and drive to green CI.
- direct-PR: immediately push and open the PR.
- local-only: the committed ready branch is itself the finish line (named
  explicitly).

Constrain the shared status protocol so `done:` is reserved for the mode's
finish line; a finished implementation commit that has not reached it is
`working:`, never `done:`.

Extend tests/fm-brief.test.sh to assert the finish-line and `done:`-reservation
lines render for all three ship modes.
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