Repository navigation
feat(stage): list AI attribution lines before publishing - #140
Merged
Merged
Conversation
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
force-pushed
the
gate/06-ai-trailers
branch
from
October 19, 2026 17:26
b8ebf93 to
4947761
Compare
cabljac
marked this pull request as ready for review
October 19, 2026 17:29
cabljac
added this pull request to stack #142
October 19, 2026 17:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 awherefield.Hits are listed with a warning before the confirm, and both
--dry-runand a real stage report them asaiAttributionin the--jsonresult. Nothing is rewritten; a person decides.Tests, red first: AI attribution cases in
tests/integration/stage.test.tsandtests/unit/ai-attribution.test.ts.bun run verifyexits 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.