Skip to content

feat(provenance): label fleet PRs and drop Claude's co-author trailer - #45

Merged
Bre77 merged 2 commits into
mainfrom
fm/fm-provenance-conventions
Jul 29, 2026
Merged

Bre77 merged 2 commits into
mainfrom
fm/fm-provenance-conventions

Conversation

@Bre77

@Bre77 Bre77 commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Intent

  • Convention: the captain now commits under one identity (AGENTS.md section 1) on every repo, no separate machine account - so fleet-opened work needs metadata-based provenance instead of identity-based provenance.
  • PR label: bin/fm-pr-check.sh now applies a configurable label (config/pr-label, default fm) to a GitHub PR right after it records pr= and arms the merge poll - the one point every delivery mode that opens a PR (no-mistakes, direct-PR, fork-only) already converges on, so one call site covers all three instead of three separate integrations.
    • Best-effort by design: the label is created if the repo doesn't have it yet, and a missing gh, a repo that refuses label creation, or a failed apply all degrade to a stderr warning rather than aborting - losing a PR to a labelling hiccup would be worse than an unlabelled one.
    • GitHub only for now; GitLab merge requests are left unlabelled because there's no verified glab label syntax to fall back to.
  • Co-author trailer: AGENTS.md already said "never add an agent name as a commit co-author," but Claude Code injects its own Co-Authored-By: Claude ... <[email protected]> trailer regardless (measured: 37 occurrences in the api repo in three days) - a real risk, since a co-author with an unsigned email is exactly what a CLA bot rejects on an upstream project.
    • Fixed structurally instead of by instruction: bin/fm-spawn.sh now scopes --settings '{"attribution":{"commit":""}}' to every claude crewmate/secondmate launch, the same per-launch pattern already used for the prompt-suggestion suppression - never touches the captain's global ~/.claude/settings.json.
    • Verified empirically, not just from the setting's name: a fresh crewmate-shaped launch (claude --dangerously-skip-permissions "<prompt>", no dictated commit message) carried the trailer without the flag and dropped it with the flag.
    • Checked the other verified harnesses too: codex-cli 0.145.0 has a dead Co-authored-by: Codex string tied to a removed/false feature flag (confirmed inert even forced on) and opencode's only such logic lives in its separate github-bot subcommand, never the plain interactive launch firstmate uses - no config added for either. pi, grok, and kimi weren't installed in this environment to check, so nothing is claimed about them either way.

Testing

  • bin/fm-lint.sh (clean, pinned ShellCheck) and bin/fm-doc-audience-check.sh (clean).
  • tests/fm-pr-check.test.sh: 5 new cases for the label feature (default name, config/pr-label override, a failed create still applying the label, a total labelling failure warning but never failing the task, and a no-op on a GitLab merge request).
  • tests/fm-pr-check-security.test.sh: 1 new unit case for fm_pr_label_name's default/trim/comment-skip behavior; full suite (40 cases) still green.
  • tests/fm-crew-memory-cap.test.sh, tests/fm-spawn-dispatch-profile.test.sh, tests/fm-secondmate-harness.test.sh, tests/fm-kimi-harness.test.sh: updated exact-launch-string assertions for the new --settings flag; all green.
  • tests/fm-backend-orca.test.sh, tests/fm-grok-harness.test.sh: spot-checked for collateral impact on the shared fm-spawn.sh launch path; green.

Bre77 added 2 commits July 29, 2026 20:51
The captain's commits now carry a single identity everywhere, so fleet
work needs metadata-based provenance instead: an "fm" PR label (name
configurable via config/pr-label) applied once fm-pr-check.sh records
pr=, covering every delivery mode that opens a PR (no-mistakes,
direct-PR, fork-only) from one call site, degrading to a stderr
warning rather than ever losing a PR.

Claude Code injects its own Co-Authored-By trailer regardless of
AGENTS.md's no-agent-co-author rule; fm-spawn.sh now scopes
--settings '{"attribution":{"commit":""}}' to every claude
crewmate/secondmate launch, verified empirically against a real
self-drafted commit. Codex and opencode were checked and do not
inject an equivalent trailer in firstmate's actual launch shape; pi,
grok, and kimi were unavailable to check and are left unverified
rather than guessed at.
Committed as mode 100644 by #42/#44, so bin/fm-fork-deliver.sh's local
gate (which execs each tests/*.test.sh directly) hits Permission
denied; real CI is unaffected since bin/fm-test-run.sh invokes tests
via `bash "$script"`.
@Bre77
Bre77 merged commit 3826063 into main Jul 29, 2026
9 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