Skip to content

feat(brief): add standing test-selection contract to ship and scout scaffolds - #13

Merged
pruge merged 1 commit into
mainfrom
fm/test-selection-contract
Aug 25, 2026
Merged

feat(brief): add standing test-selection contract to ship and scout scaffolds#13
pruge merged 1 commit into
mainfrom
fm/test-selection-contract

Conversation

@pruge

@pruge pruge commented Aug 25, 2026

Copy link
Copy Markdown
Owner

What

Adds a standing Test selection contract section to the ship and scout brief scaffolds in bin/fm-brief.sh, so every firstmate-spawned worker verifies efficiently instead of running the full local suite by default.

The contract carries all four required points:

  1. Full local suite runs are forbidden as a first verification step.
  2. Changed-first selection: on firstmate use bin/fm-test-run.sh --changed (add --base <ref> when the working base is not origin/main); on other projects use the runner's native changed/related feature (e.g. vitest --changed).
  3. On failure, re-run only the failed family/script (--family <name> or the single script), never the whole suite.
  4. For PR-based deliveries GitHub CI owns the final merge verdict; local runs are a fast pre-check, not the authority. Never pipe test output through tail (or any filter) that discards per-test result lines - keep full output in a file so failures are identifiable without rerunning.

The section is built once as a shared variable and rendered into both scaffolds; secondmate charters do not carry it, matching the CodeGraph contract's scope. The script header documents the new standing contract.

Out of scope (per task)

No changes to bin/fm-test-run.sh, CI workflows, or per-project runners.

Verification

  • bin/fm-lint.sh: clean (pinned ShellCheck 0.11.0, actionlint 1.7.12).
  • tests/fm-brief.test.sh: 22/22 ok, including new test_test_selection_contract_in_ship_and_scout_briefs asserting all four points in both ship and scout briefs and their absence from secondmate charters.
  • bin/fm-test-run.sh --changed --base origin/main: full changed selection (32 scripts) exit=0 failed=0, confirmed twice consecutively. One transient failure appeared on the very first pass and did not reproduce across two full reruns.

…caffolds

Every spawned worker now verifies efficiently instead of defaulting to the
full local suite: no full-suite first run, changed-first selection
(fm-test-run.sh --changed here, the project runner's native equivalent
elsewhere), failed-family-only reruns, GitHub CI as the PR merge verdict,
and full output kept in a file so failures need no rerun.
@pruge
pruge merged commit bdefdee into main Aug 25, 2026
16 of 17 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