Skip to content

feat(stage): list AI attribution lines before publishing - #140

Merged
cabljac merged 1 commit into
gate/05-force-bypassfrom
gate/06-ai-trailers
Oct 19, 2026
Merged

cabljac merged 1 commit into
gate/05-force-bypassfrom
gate/06-ai-trailers

Conversation

@cabljac

@cabljac cabljac commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Agent-written commits often carry lines such as Co-authored-by: Claude <noreply@anthropic.com> or "Generated with ...". A vendor may not want those to reach the client, but venfork published them without comment. Stage now scans what it will publish: each commit author and committer, the trailer block of each message, and "Generated/Written/Created with/by/using " lines. A trailer counts when its key names a tool or its identity is a known tool, so "Claude Monet" and "Fix: the db cursor" do not. With the PR step it also scans the published PR title and redacted body. Each hit has a where field.

Hits are listed with a warning before the confirm, and both --dry-run and a real stage report them as aiAttribution in the --json result. Nothing is rewritten; a person decides.

Tests, red first: AI attribution cases in tests/integration/stage.test.ts and tests/unit/ai-attribution.test.ts. bun run verify exits 0. Counts: unit 1285 to 1315, integration 519 to 523.

Not verified: e2e tiers and live GitHub. Detection is a fixed list of tool names, so a tool not on the list is not reported.

Stage scans what it will publish for lines that credit an AI tool: each
commit author and committer, the trailer block (the last paragraph of a
message when every line there is `Key: value`) of each commit message,
and "Generated/Written/Created with/by/using <tool>" lines. A trailer
counts when its key names a tool (`Claude-Session`, `Generated-by`) or
its name or email is a known tool identity, so "Claude Monet" and
"Fix: the db cursor" do not. With the PR step it also scans the
published PR title and redacted body. Each hit has a `where` field.

It lists them in the Staging Details note with a warning before the
confirm. Both --dry-run and a real stage report them in the --json
result as aiAttribution. Nothing is rewritten; a person decides whether
to rewrite the commits.
@cabljac
cabljac force-pushed the gate/06-ai-trailers branch from b8ebf93 to 4947761 Compare October 19, 2026 17:26
@cabljac
cabljac marked this pull request as ready for review October 19, 2026 17:29
@cabljac
cabljac added this pull request to stack #142 October 19, 2026 17:29
@cabljac
cabljac merged commit 5e76768 into main Oct 19, 2026
4 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