Skip to content

fix(bin): reject internal voice in commits before the first push - #3844

Closed
mremond wants to merge 25 commits into
kunchenguid:mainfrom
mremond:fm/fm-prepush-internal-voice-guard
Closed

mremond wants to merge 25 commits into
kunchenguid:mainfrom
mremond:fm/fm-prepush-internal-voice-guard

Conversation

@mremond

@mremond mremond commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Intent

Stop firstmate's internal voice from leaking into published artifacts before the first push can carry it out of reach. A commit message, pull request title, or pull request description must never carry direct address to the human owner of the fleet, an account of how the work was produced, or a link to the session that produced it. Deliver this as bin/fm-prepush-voice-guard.sh, which reads back every commit message not yet on the default branch and refuses a match, wired into the canonical lint owner bin/fm-lint.sh so it runs last before the gate's first push, plus a .github/workflows/internal-voice-guard.yml backstop that reports matching pull request title or description text after GitHub has received it. The gap between those two is deliberate and documented rather than an oversight: commits created after that first push, including by the CI step, are not covered, and docs/architecture.md owns that declared gap. This revision adds one thing only: the branch has been brought up to date with the current default branch by merging it in, resolving three conflicts. Those resolutions are deliberate decisions, not accidents of merging. First, the AGENTS.md rule stating the publication boundary is worded exactly as the repository's human owner approved it, word for word, after an explicit arbitration between two competing versions of that same rule: it deliberately states the contract once with a single artifact list rather than twice, it deliberately names who to report to when a tool asks to add a trailer automatically, and it must not be reworded, retitled, tidied, split, shortened, or expanded - raise any concern about it as a finding rather than editing it, because approval was given for that exact wording and does not carry to a revision of it. Second, bin/fm-lint.sh deliberately keeps both the backend-purity check that arrived on the default branch and this delivery's voice guard, each dispatched exactly once, with the purity and workflow dispatch moved ahead of the telemetry block so that every check result is recorded in the telemetry exit code rather than written after it - an existing test pins that telemetry exit to the real exit code. Third, nothing beyond this delivery and that merge is in scope; no tidying, generalization, or adjacent improvement belongs in this branch.

What Changed

  • Add bin/fm-prepush-voice-guard.sh to scan commit messages in origin/main..HEAD, reject known internal-address, handoff, session-pointer, and private-document patterns, and refuse incomplete scans.
  • Run the guard last in default lint, preserve backend-purity and workflow checks, record the final result in telemetry, and fetch full history in CI. Add scanner and lint integration regression coverage.
  • Add PR title/description checks using the base branch’s scanner. Update publication guidance and document detection after disclosure, the missing-scanner skip, and the coverage gap for commits created after the first push.

Risk Assessment

✅ Low: The scoped changes preserve the accepted publication limits and merge resolutions, with no material source defects identified.

Testing

Targeted scanner tests, live CLI scenarios, the submitted-branch scan and supplemental workflow checks passed. Captured refusal transcripts and generated warning output; no UI surface required screenshots. Lint integration and actual GitHub execution remain untested. No source changes remain.

  • Live validation: ⚠️ inconclusive - 8 of 10 scenarios driven live against the product
Scenario Result Live Evidence
Run the guard on the submitted branch; its 23 commits outside origin/main pass. ✅ pass live Submitted branch scan
Commit legitimate repository terminology and public URLs; the guard accepts them and excludes published default-branch history. ✅ pass live Live CLI transcript
Place addresses, production narration, session links and private paths in earlier commits beneath a clean tip; refusal identifies the commits, rules and remedies. ✅ pass live Live CLI transcript
Merge newer default-branch history and store the feature branch remotely; unpublished feature leaks remain refused. ✅ pass live Live CLI transcript
Try contaminated local main and an environment override; neither hides leaks, and missing origin/main exits 3 with recovery instructions. ✅ pass live Live CLI transcript
Supply explicit publication bounds or commit selectors; the guard scans the designated history, including authorized local-main bounds. ✅ pass live Live CLI transcript
Submit backticked machine paths and legitimate web or fixture paths; private paths refuse and accepted paths pass. ✅ pass live Live CLI transcript; backtick counterfactual section
Scan PR text through stdin and files; leaking text refuses, clean shell examples remain literal, and unavailable scan storage exits 3. ✅ pass live Live CLI transcript
Run canonical lint after the merge; backend purity and voice checks dispatch once and telemetry matches the final exit. ⏸️ untested no This phase explicitly prohibits running linters. The relevant integration test invokes fm-lint.sh and was excluded. The outer executor must exercise it in an authorized phase.
Open, edit, synchronize or reopen a GitHub PR; the backstop uses trusted base code and reports leaks or an explicit bootstrap skip. ⏸️ untested no Actual GitHub PR/CI execution belongs to the outer executor. Local workflow semantic and shell tests passed, but did not exercise GitHub event delivery or actions/checkout.
Evidence: Live CLI transcript

Source: Live CLI transcript


$ git -c core.hooksPath=/dev/null -c commit.gpgsign=false init -b main ~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/.voice-guard-live-check/manual/publication
cwd: .voice-guard-live-check/manual
Initialized empty Git repository in ~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/.voice-guard-live-check/manual/publication/.git/
[exit 0; expected 0]

$ git -c core.hooksPath=/dev/null -c commit.gpgsign=false commit --allow-empty -F -
cwd: .voice-guard-live-check/manual/publication
stdin:
fix: Captain, historical default-branch message
[main (root-commit) fbc2905] fix: Captain, historical default-branch message
[exit 0; expected 0]

$ git -c core.hooksPath=/dev/null -c commit.gpgsign=false rev-parse HEAD
cwd: .voice-guard-live-check/manual/publication
fbc290590d2793a5c1aba63fbc70155abaf918fa
[exit 0; expected 0]

$ git -c core.hooksPath=/dev/null -c commit.gpgsign=false commit --allow-empty -F -
cwd: .voice-guard-live-check/manual/publication
stdin:
docs: describe the supported configuration
[main 49bbaf7] docs: describe the supported configuration
[exit 0; expected 0]

$ git -c core.hooksPath=/dev/null -c commit.gpgsign=false rev-parse HEAD
cwd: .voice-guard-live-check/manual/publication
49bbaf705056ff4d42f622805e168219a425c442
[exit 0; expected 0]

$ git -c core.hooksPath=/dev/null -c commit.gpgsign=false clone --no-local ~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/.voice-guard-live-check/manual/publication ~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/.voice-guard-live-check/manual/branch
cwd: .voice-guard-live-check/manual
Cloning into '~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/.voice-guard-live-check/manual/branch'...
[exit 0; expected 0]

$ git -c core.hooksPath=/dev/null -c commit.gpgsign=false checkout -b feature
cwd: .voice-guard-live-check/manual/branch
Switched to a new branch 'feature'
[exit 0; expected 0]

$ git -c core.hooksPath=/dev/null -c commit.gpgsign=false commit --allow-empty -F -
cwd: .voice-guard-live-check/manual/branch
stdin:
fix(holds): keep captain-held tasks pending

A session-scoped negative cache keeps the conclusion.
Describe captain intent, the /ahoy skill, and shipshape acknowledgements.
docs: touch tests/data/fixtures/x.txt
docs: update data/backlog.md
docs: see `https://example.com/data/api/schema.json` in the guide
[feature 2fa6a74] fix(holds): keep captain-held tasks pending
[exit 0; expected 0]

$ git -c core.hooksPath=/dev/null -c commit.gpgsign=false rev-parse HEAD
cwd: .voice-guard-live-check/manual/branch
2fa6a74b14e477dbd8bbf3ecea5b6a6421b1a9a6
[exit 0; expected 0]

## Clean technical commits pass and published default-branch leaks stay excluded
$ ~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/bin/fm-prepush-voice-guard.sh
cwd: .voice-guard-live-check/manual/branch
[exit 0; expected 0]

$ git -c core.hooksPath=/dev/null -c commit.gpgsign=false commit --allow-empty -F -
cwd: .voice-guard-live-check/manual/branch
stdin:
fix(ci): Captain, bound the scan

Changes remain uncommitted for the outer executor
[feature 0db104b] fix(ci): Captain, bound the scan
[exit 0; expected 0]

$ git -c core.hooksPath=/dev/null -c commit.gpgsign=false rev-parse HEAD
cwd: .voice-guard-live-check/manual/branch
0db104b91b3e1c0d465e05a949dd6c7d82194f32
[exit 0; expected 0]

$ git -c core.hooksPath=/dev/null -c commit.gpgsign=false commit --allow-empty -F -
cwd: .voice-guard-live-check/manual/branch
stdin:
fix: retain the result

Claude-Session: https://claude.ai/code/session_0123456789abcdef
[feature 023b55e] fix: retain the result
[exit 0; expected 0]

$ git -c core.hooksPath=/dev/null -c commit.gpgsign=false rev-parse HEAD
cwd: .voice-guard-live-check/manual/branch
023b55ebb503292af0f8c8aa3f988a2594ca5f9e
[exit 0; expected 0]

$ git -c core.hooksPath=/dev/null -c commit.gpgsign=false commit --allow-empty -F -
cwd: .voice-guard-live-check/manual/branch
stdin:
docs: retire `~/firstmate/data/task/report.md` now

Review .lavish/board/summary.html
[feature ee25cf1] docs: retire `~/firstmate/data/task/report.md` now
[exit 0; expected 0]

$ git -c core.hooksPath=/dev/null -c commit.gpgsign=false rev-parse HEAD
cwd: .voice-guard-live-check/manual/branch
ee25cf1364c2dd6130a3f75a17b605823dfc0767
[exit 0; expected 0]

$ git -c core.hooksPath=/dev/null -c commit.gpgsign=false commit --allow-empty -F -
cwd: .voice-guard-live-check/manual/branch
stdin:
fix: keep the feature tip clean
[feature 5f88e7f] fix: keep the feature tip clean
[exit 0; expected 0]

$ git -c core.hooksPath=/dev/null -c commit.gpgsign=false rev-parse HEAD
cwd: .voice-guard-live-check/manual/branch
5f88e7fb0965b4dc566e57301feab87d1b96b574
[exit 0; expected 0]

## A clean tip cannot hide forbidden text in earlier commit subjects and bodies
$ ~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/bin/fm-prepush-voice-guard.sh
cwd: .voice-guard-live-check/manual/branch
fm-prepush-voice-guard.sh: REFUSING - firstmate internal voice found in the commits not yet on the default branch.
This text would become permanent public history under the repository owner's name.

  commit ee25cf1364c2 - docs: retire `~/firstmate/data/task/report.md` now
    line 1 matched private-task-work-document
      in:      docs: retire `~/firstmate/data/task/report.md` now
      matched: `~/firstmate/data/task/report.md
      fix:     Published history must not reference a private per-task work document. Remove the data/<id>/<file> path and describe the durable outcome.
    line 3 matched private-review-artifact
      in:      Review .lavish/board/summary.html
      matched:  .lavish/board/summary.html
      fix:     Published history must not reference a local review artifact. Remove the .lavish/<file> path and describe the durable outcome.

  commit 023b55ebb503 - fix: retain the result
    line 3 matched internal-session-pointer
      in:      Claude-Session: https://claude.ai/code/session_0123456789abcdef
      matched: Claude-Session: https://
      fix:     Published history must not link the working session that produced the change. Delete the trailer.
    line 3 matched internal-session-link
      in:      Claude-Session: https://claude.ai/code/session_0123456789abcdef
      matched: https://claude.ai/code/session_0123456789abcdef
      fix:     Published history must not link the working session that produced the change. Remove the link.

  commit 0db104b91b3e - fix(ci): Captain, bound the scan
    line 1 matched captain-address-opening
      in:      fix(ci): Captain, bound the scan
      matched: : Captain,
      fix:     A commit message describes a change to the repository; it never addresses a person. Drop the address and state the change.
    line 3 matched delivery-machinery-handoff
      in:      Changes remain uncommitted for the outer executor
      matched:  outer executor
      fix:     Published history must not narrate how the change was validated or which agent finishes it. State what the change does.

  How to clear this refusal:
    Reword the message so it states what the change does, then re-run this check:
      git commit --amend        for the tip commit
      git rebase -i <base>      then mark the named commits "reword"
    Inside a no-mistakes run, respond to the gate and let the pipeline reword; do not push around this check.
    Inspect the full rule table with: bin/fm-prepush-voice-guard.sh --list-patterns
[exit 1; expected 1]

$ git -c core.hooksPath=/dev/null -c commit.gpgsign=false commit --allow-empty -F -
cwd: .voice-guard-live-check/manual/publication
stdin:
fix: Captain, newly published history remains outside the scan
[main 904fa1d] fix: Captain, newly published history remains outside the scan
[exit 0; expected 0]

$ git -c core.hooksPath=/dev/null -c commit.gpgsign=false rev-parse HEAD
cwd: .voice-guard-live-check/manual/publication
904fa1ddcef97a1b6f53bd26ced02249a7836a55
[exit 0; expected 0]

$ git -c core.hooksPath=/dev/null -c commit.gpgsign=false fetch origin main
cwd: .voice

... [30798 bytes truncated] ...

h/board/summary.html
      matched:  .lavish/board/summary.html
      fix:     Published history must not reference a local review artifact. Remove the .lavish/<file> path and describe the durable outcome.

  How to clear this refusal:
    Reword the text above, then re-run this check.
    Inspect the full rule table with: bin/fm-prepush-voice-guard.sh --list-patterns
[exit 1; expected 1]

## Text acceptance 1: docs: see `https://example.com/data/api/schema.json` in the guide
$ ~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/bin/fm-prepush-voice-guard.sh --text -
cwd: .voice-guard-live-check/manual/branch
stdin:
docs: see `https://example.com/data/api/schema.json` in the guide
[exit 0; expected 0]

## Text acceptance 2: docs: describe /data/api/schema.json
$ ~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/bin/fm-prepush-voice-guard.sh --text -
cwd: .voice-guard-live-check/manual/branch
stdin:
docs: describe /data/api/schema.json
[exit 0; expected 0]

## Text acceptance 3: docs: point at https://example.com/data/api/schema.json for the schema
$ ~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/bin/fm-prepush-voice-guard.sh --text -
cwd: .voice-guard-live-check/manual/branch
stdin:
docs: point at https://example.com/data/api/schema.json for the schema
[exit 0; expected 0]

## Text acceptance 4: docs: see https://gitlab.com/org/repo/-/blob/main/data/alpha/report.md
$ ~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/bin/fm-prepush-voice-guard.sh --text -
cwd: .voice-guard-live-check/manual/branch
stdin:
docs: see https://gitlab.com/org/repo/-/blob/main/data/alpha/report.md
[exit 0; expected 0]

## Text acceptance 5: docs: see https://github.com/kunchenguid/firstmate/pull/3837
$ ~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/bin/fm-prepush-voice-guard.sh --text -
cwd: .voice-guard-live-check/manual/branch
stdin:
docs: see https://github.com/kunchenguid/firstmate/pull/3837
[exit 0; expected 0]

## Text acceptance 6: docs: touch tests/data/fixtures/x.txt
$ ~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/bin/fm-prepush-voice-guard.sh --text -
cwd: .voice-guard-live-check/manual/branch
stdin:
docs: touch tests/data/fixtures/x.txt
[exit 0; expected 0]

## Text acceptance 7: docs: update data/backlog.md
$ ~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/bin/fm-prepush-voice-guard.sh --text -
cwd: .voice-guard-live-check/manual/branch
stdin:
docs: update data/backlog.md
[exit 0; expected 0]

## Text acceptance 8: docs: captain.md now records the fleet owner
$ ~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/bin/fm-prepush-voice-guard.sh --text -
cwd: .voice-guard-live-check/manual/branch
stdin:
docs: captain.md now records the fleet owner
[exit 0; expected 0]

## Text acceptance 9: fix: the pane still reaches the captain - once per window
$ ~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/bin/fm-prepush-voice-guard.sh --text -
cwd: .voice-guard-live-check/manual/branch
stdin:
fix: the pane still reaches the captain - once per window
[exit 0; expected 0]

## Text acceptance 10: Thread-Safety-Docs: https://example.com/session/architecture.html
$ ~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/bin/fm-prepush-voice-guard.sh --text -
cwd: .voice-guard-live-check/manual/branch
stdin:
Thread-Safety-Docs: https://example.com/session/architecture.html
[exit 0; expected 0]

## A saved clean PR description is read as data without shell execution
$ ~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/bin/fm-prepush-voice-guard.sh --text ~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/.voice-guard-live-check/manual/description.md
cwd: .voice-guard-live-check/manual/branch
[exit 0; expected 0]

## A saved PR description refuses a body-only address
$ ~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/bin/fm-prepush-voice-guard.sh --text ~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/.voice-guard-live-check/manual/description.md
cwd: .voice-guard-live-check/manual/branch
fm-prepush-voice-guard.sh: REFUSING - firstmate internal voice found in the supplied text.
This text would become permanent public history under the repository owner's name.

  text
    line 3 matched captain-address-line
      in:      Captain, this PR rewrites the throttle.
      matched: Captain,
      fix:     A commit message describes a change to the repository; it never addresses a person. Drop the address and state the change.

  How to clear this refusal:
    Reword the text above, then re-run this check.
    Inspect the full rule table with: bin/fm-prepush-voice-guard.sh --list-patterns
[exit 1; expected 1]

## An unavailable temporary-storage directory reports an incomplete scan
$ ~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/bin/fm-prepush-voice-guard.sh --text -
cwd: .voice-guard-live-check/manual/branch
stdin:
fix: clean text
mktemp: mkdtemp failed on ~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/.voice-guard-live-check/manual/missing-temp-dir/fm-prepush-voice-guard.Yat1Mw: No such file or directory
fm-prepush-voice-guard.sh: cannot create temporary scan storage. The scan did not complete.
[exit 3; expected 3]

## An unknown option is an explicit usage error
$ ~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/bin/fm-prepush-voice-guard.sh --nope
cwd: .voice-guard-live-check/manual/branch
fm-prepush-voice-guard.sh: unknown argument: --nope
[exit 2; expected 2]

## A missing text file is an explicit usage error
$ ~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/bin/fm-prepush-voice-guard.sh --text ~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/.voice-guard-live-check/manual/missing-description.md
cwd: .voice-guard-live-check/manual/branch
fm-prepush-voice-guard.sh: no such text file: ~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/.voice-guard-live-check/manual/missing-description.md
[exit 2; expected 2]

$ bash ~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/.voice-guard-live-check/manual/without-backtick/fm-prepush-voice-guard.sh --text -
cwd: .voice-guard-live-check/manual/branch
stdin:
docs: retire `~/firstmate/data/task/report.md` now
[exit 0; expected 0]
COUNTERFACTUAL: removing the backtick delimiter makes the required refusal assertion fail (exit 0 instead of 1).

$ bash ~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/.voice-guard-live-check/manual/without-backtick/fm-prepush-voice-guard.sh --text -
cwd: .voice-guard-live-check/manual/branch
stdin:
docs: retire `~/firstmate/data/alpha/report.md` now
[exit 0; expected 0]
COUNTERFACTUAL: removing the backtick delimiter makes the required refusal assertion fail (exit 0 instead of 1).

$ bash ~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/.voice-guard-live-check/manual/without-backtick/fm-prepush-voice-guard.sh --text -
cwd: .voice-guard-live-check/manual/branch
stdin:
docs: retire data/alpha/report.md after completion
fm-prepush-voice-guard.sh: REFUSING - firstmate internal voice found in the supplied text.
This text would become permanent public history under the repository owner's name.

  text
    line 1 matched private-task-work-document
      in:      docs: retire data/alpha/report.md after completion
      matched:  data/alpha/report.md
      fix:     Published history must not reference a private per-task work document. Remove the data/<id>/<file> path and describe the durable outcome.

  How to clear this refusal:
    Reword the text above, then re-run this check.
    Inspect the full rule table with: bin/fm-prepush-voice-guard.sh --list-patterns
[exit 1; expected 1]
COUNTERFACTUAL CONTROL: the same mutant still refuses the bare relative path.
Evidence: Submitted branch scan

Source: Submitted branch scan

$ git rev-parse HEAD origin/main
34a95724ec9e9375fd90ccd35b017d5b59c39465
aa921774fb1361fe4d61027a3acf6aa68ec17e14
[exit 0]

$ git rev-list --count HEAD --not origin/main
23
[exit 0]

$ bin/fm-prepush-voice-guard.sh
[exit 0]
Evidence: Local workflow shell transcript

Source: Local workflow shell transcript

Local supplemental execution of the workflow run step. GitHub event routing and actions/checkout were NOT executed.
Normalized semantic checks: PR events, target branch, read-only permission, trusted base checkout, environment inputs, and canonical lint pin agree with the contract.

## clean
PR_TITLE: fix: bound the scan
PR_BODY: Describe captain intent and session-scoped caching.
[exit 0; expected 0]

## title-leak
PR_TITLE: Captain, this is ready
PR_BODY: Describe the result.
fm-prepush-voice-guard.sh: REFUSING - firstmate internal voice found in the supplied text.
This text would become permanent public history under the repository owner's name.

  text
    line 1 matched captain-address-line
      in:      Captain, this is ready
      matched: Captain,
      fix:     A commit message describes a change to the repository; it never addresses a person. Drop the address and state the change.

  How to clear this refusal:
    Reword the text above, then re-run this check.
    Inspect the full rule table with: bin/fm-prepush-voice-guard.sh --list-patterns
[exit 1; expected 1]

## body-leak
PR_TITLE: fix: bound the scan
PR_BODY: See https://claude.ai/code/session_0123456789abcdef
fm-prepush-voice-guard.sh: REFUSING - firstmate internal voice found in the supplied text.
This text would become permanent public history under the repository owner's name.

  text
    line 2 matched internal-session-link
      in:      See https://claude.ai/code/session_0123456789abcdef
      matched: https://claude.ai/code/session_0123456789abcdef
      fix:     Published history must not link the working session that produced the change. Remove the link.

  How to clear this refusal:
    Reword the text above, then re-run this check.
    Inspect the full rule table with: bin/fm-prepush-voice-guard.sh --list-patterns
[exit 1; expected 1]

## literal-input
PR_TITLE: fix: document shell syntax
PR_BODY: Literal $(touch ~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/.voice-guard-live-check/workflow/injection-marker) and `touch ~/.no-mistakes/worktrees/acf4a767348a/01M2HV450TTYZ7HY9HBZA00GYK/.voice-guard-live-check/workflow/injection-marker`
[exit 0; expected 0]

## trusted scanner absent
::warning title=Voice guard did not scan this pull request::bin/fm-prepush-voice-guard.sh is not on the base branch, so this pull request's title and description were NOT scanned. This check becomes effective once the scanner is on the base branch.
Voice guard: NOT APPLIED. bin/fm-prepush-voice-guard.sh is not on the base branch, so this pull request's title and description were NOT scanned. This check becomes effective once the scanner is on the base branch.
[exit 0; expected 0 with explicit NOT APPLIED notice]
Evidence: Generated bootstrap warning

Source: Generated bootstrap warning

Voice guard: **NOT APPLIED**. bin/fm-prepush-voice-guard.sh is not on the base branch, so this pull request's title and description were NOT scanned. This check becomes effective once the scanner is on the base branch.
- Outcome: ⚠️ 2 warnings across 1 run (7m41s)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

⏭️ **Rebase** - skipped
  • ⚠️ AGENTS.md - merge conflict rebasing onto origin/main
  • ⚠️ CONTRIBUTING.md - merge conflict rebasing onto origin/main
  • ⚠️ bin/fm-lint.sh - merge conflict rebasing onto origin/main
✅ **Review** - passed

✅ No issues found.

⚠️ **Test** - 2 warnings
  • ⚠️ The complete publication-boundary intent remains unproven: this phase forbids executing the canonical lint owner and cannot initiate GitHub validation. The outer executor must supply the merge-specific dispatch/telemetry and GitHub execution evidence before treating that intent as fully validated.
  • ⚠️ live validation verdict: inconclusive (8 of 10 scenarios were driven live against the product); untested: Run canonical lint after the merge; backend purity and voice checks dispatch once and telemetry matches the final exit., Open, edit, synchronize or reopen a GitHub PR; the backstop uses trusted base code and reports leaks or an explicit bootstrap skip.
  • Live validation: ⚠️ inconclusive - 8 of 10 scenarios driven live against the product
Scenario Result Live Evidence
Run the guard on the submitted branch; its 23 commits outside origin/main pass. ✅ pass live Submitted branch scan
Commit legitimate repository terminology and public URLs; the guard accepts them and excludes published default-branch history. ✅ pass live Live CLI transcript
Place addresses, production narration, session links and private paths in earlier commits beneath a clean tip; refusal identifies the commits, rules and remedies. ✅ pass live Live CLI transcript
Merge newer default-branch history and store the feature branch remotely; unpublished feature leaks remain refused. ✅ pass live Live CLI transcript
Try contaminated local main and an environment override; neither hides leaks, and missing origin/main exits 3 with recovery instructions. ✅ pass live Live CLI transcript
Supply explicit publication bounds or commit selectors; the guard scans the designated history, including authorized local-main bounds. ✅ pass live Live CLI transcript
Submit backticked machine paths and legitimate web or fixture paths; private paths refuse and accepted paths pass. ✅ pass live Live CLI transcript; backtick counterfactual section
Scan PR text through stdin and files; leaking text refuses, clean shell examples remain literal, and unavailable scan storage exits 3. ✅ pass live Live CLI transcript
Run canonical lint after the merge; backend purity and voice checks dispatch once and telemetry matches the final exit. ⏸️ untested no This phase explicitly prohibits running linters. The relevant integration test invokes fm-lint.sh and was excluded. The outer executor must exercise it in an authorized phase.
Open, edit, synchronize or reopen a GitHub PR; the backstop uses trusted base code and reports leaks or an explicit bootstrap skip. ⏸️ untested no Actual GitHub PR/CI execution belongs to the outer executor. Local workflow semantic and shell tests passed, but did not exercise GitHub event delivery or actions/checkout.
  • TMPDIR=&#34;$PWD/.voice-guard-live-check&#34; bin/fm-test-run.sh --jobs 1 tests/.voice-guard-scanner-only.test.sh — existing scanner assertions, with only the lint integration invocation excluded.
  • python3 ~/.no-mistakes/evidence/01M2HV450TTYZ7HY9HBZA00GYK/drive-voice-guard.py — real CLI and isolated Git histories, plus a non-live backtick mutation counterfactual.
  • bin/fm-prepush-voice-guard.sh — scanned the submitted branch against its resolved origin/main.
  • python3 ~/.no-mistakes/evidence/01M2HV450TTYZ7HY9HBZA00GYK/check-workflow-shell.py — normalized workflow semantics and supplemental local shell cases.
  • Removed temporary test adapters and isolated repositories; git status --short confirmed no remaining changes.
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@greptile-apps

greptile-apps Bot commented Sep 6, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains within the accepted enforcement boundary.

No blocking failure remains.

Reviews (3): Last reviewed commit: "fix(document): Clarify voice-guard cover..." | Re-trigger Greptile

@mremond
mremond force-pushed the fm/fm-prepush-internal-voice-guard branch from 3d669e5 to ad1dbee Compare September 7, 2026 17:07
AGENTS.md tells every agent to address the user as captain in every response.
An agent working inside this repo reads that as an ordinary repo file and applies it to commit messages, which it treats as responses.
The messages that leaked came from the no-mistakes pipeline's own fix agents rather than from a briefed worker, so no brief could have prevented them, and an instruction-level guard against adopting that identity was already active while it happened anyway.

bin/fm-voice-guard.sh reads back every commit message not yet on the default branch and refuses an address to the repository owner or an account of how the change was produced.
bin/fm-lint.sh runs it on its default path, which .no-mistakes.yaml pins as commands.lint and the gate runs after its review, test, and document steps, so it is the last step that sees every message about to leave.
The guard bounds itself to unpublished commits and fails closed when it cannot resolve a default-branch ref, so the CI lint job now checks out full history.
A pull request title and description have no pre-push moment, so a small workflow reads them on open, edit, synchronize, and reopen.

The rule set keys on the syntactic position of an address rather than on vocabulary, because this repo's own subject matter is the fleet.
Selected against the merged history, it matches 222 leaking lines and none of the 301 legitimate lines that mention the same words, so captain holds, captain intent, the ahoy skill, and shipshape all keep shipping.
A refusal names the rule, the exact text that matched, and the reword command; there is no bypass flag because rewording always clears it.
The refusal resolved its default-branch refs with a rev-parse spelling the rest
of the repository does not use, and let a failing rev-list fall through as exit
1, which is the code that means text was found.
Both now report an unknown range instead, since neither knows whether anything
leaked.

The ref probe matches bin/fm-lint.sh's own, so a checkout that script can read
is a checkout the refusal can read.
The lint suite's git double answers the range query as a checkout with nothing
unpushed, keeping those tests about file selection.
The rule that refuses a subject ending in a bare comma and the word captain
would also refuse a comma list whose last item is that word.
No such line exists in the history the rules were selected against, and the six
lines only this rule caught existed only in the address shape, so the header now
states the trade-off instead of leaving a future reader to rediscover it.
The loop variable holding one grep hit was left global, so it outlived each
scan.
Nothing depended on that, but the surrounding function declares every other
local.
The script sat in the bin/fm-voice-* namespace, which is the audio voice relay
(fm-voice-relay.py, fm-voice-client.py and their records and frame modules), so
a reader would reasonably expect it to guard that feature.
It is now bin/fm-prepush-voice-guard.sh, named for the moment it runs, with the
test, lint wiring, workflow, and documentation pointers moved with it.

Two rules join it, because a link to the working session that produced a change
is internal material leaving the machine in the same artifact at the same
moment as an address is.
Three such trailers are already in merged history, so this is a recurring leak
rather than a hypothetical one.
The rules refuse the pointer shape, a trailer key carrying a URL or an opaque
id and a session path inside a link, never the word, so the 333 merged lines
using "session" in its ordinary technical sense still pass.
The address rules admitted a spaced ASCII dash after "captain" but not an em or
en dash, so the same vocative in the same syntactic slot reached published
history through a rule that already refused its plain-dash twin.
Both dashes are now admitted, spaced or unspaced, since an em dash is
conventionally set without spaces.

The work-document rule excluded a slash before "data" so that a relative path
such as tests/data/fixtures/x.txt would keep passing.
That exclusion also skipped the shape the leak usually takes, an absolute or
home-rooted path ending in the same data/<id>/<file> tail.
A second alternative admits that shape at any depth while still requiring a
non-word character before the leading slash, which is what keeps the relative
path passing.

Both expressions were measured against origin/main's 16,485 merged message
lines and changed no count: the address total and the work-document total are
identical before and after, so each closes a reachable shape without widening
what the rules already refuse.
The header's measured counts are restated for the larger corpus.

Each regression was run against the previous expressions first and exited
clean, so neither test passes vacuously alongside the correction it pins.
The guard's header, the architecture section, and the lint pin each claimed
lint was the last step able to read every commit the branch would contribute.
That is wrong by one step. It holds for the review, test, and document steps,
which precede lint, but not for the CI step: it runs after the first push and
its fix agent commits on top, so this scan never reads those messages. A
subject opening with an address to a person reached a public branch that way.

Correct all three copies to say what the scan actually covers, and declare the
uncovered step rather than leaving it implied. The pull request workflow does
not close it either, since it scans only the title and description. Coverage
for that step is tracked separately and is not attempted here.
@mremond
mremond force-pushed the fm/fm-prepush-internal-voice-guard branch from ad1dbee to bf86906 Compare September 8, 2026 07:38
@mremond mremond changed the title feat(bin): refuse internal voice before the first push feat(bin): block internal voice before publication Sep 8, 2026
@mremond

mremond commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

The red Behavior portable serial 4 check on this pull request was cancelled at the 20-minute job timeout, not failed by a test assertion.

Measured cause: the portable serial lanes are packed from a hand-maintained per-script duration table that was last refreshed 2026-09-01. It now under-predicts, so one shard carries more work than the others and reaches the job bound. The lane is also cancelled on main itself, independently of any branch.

A repair is open as #4006 — it refreshes the duration table and moves from 5 shards to 6. On its two most recent runs, 14 jobs completed with 0 cancellations.

We cannot re-run the cancelled lane ourselves: our access to this repository is pull-only, and re-running requires admin.

Resolve three conflicts against b182d0f.

AGENTS.md: state the publication boundary as one rule with one artifact
list, taking the trunk sentence and folding in the prohibitions on
accounts of how work was produced and on session links, followed by the
automatic-trailer clause and the guard pointer.

CONTRIBUTING.md: keep the trunk sentence listing what bin/fm-lint.sh
owns, including the backend-purity check, and keep the pointer to the
architecture guide's internal-voice refusal section.

bin/fm-lint.sh: keep both the backend-purity and the voice-guard checks,
each dispatched exactly once, and move the purity and workflow dispatch
into the pre-telemetry sequence so every check result is recorded in the
telemetry exit rather than written after it.
@mremond mremond changed the title feat(bin): block internal voice before publication fix(bin): reject internal voice in commits before the first push Sep 15, 2026
…ng backend fixture and detecting awk errors across platforms. Confirmed the regression fails before the fixture fix and passes afterward. All 16 workflow tests, targeted canonical lint, Bash syntax validation, and git diff --check pass. Full CI shard was not rerun
@mremond

mremond commented Sep 25, 2026

Copy link
Copy Markdown
Contributor Author

Closing in favour of #4822, which covers the same goal with a pre-publication check.

@mremond mremond closed this Sep 25, 2026
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