Repository navigation
🏗️🔧:refuse a sign-off that names a tool - #67
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (2)
Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. 📝 WalkthroughWalkthroughCommit trailer guidance and validation now distinguish agent and bot identities from human identities. Tool identities are rejected in both ChangesCommit trailer validation
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~15 minutes Change: Bug fix 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
f3b3e21 to
4393aef
Compare
This repository carries its own copy of the commit message rules, so a hole in them is a hole in two places. Ported from OpenINF/.github. `Co-authored-by:` was taught to refuse a tool. The other trailer that names a person was left to `checkSignOff`, which asks one question: does the sign-off match the commit's author. That catches a tool signing on somebody else's behalf and nothing else. An agent committing under its own git identity is the author, and `-s` copies that identity into the trailer, so the two agree and the Developer Certificate of Origin is certified by a program. So the pattern that already refuses a tool as a co-author refuses one as a signer too, whoever the author is. The two together leave an agent-authored commit no spelling that lands: sign off as itself and the trailer names a tool, sign off as anybody else and it is not the author. `[bot]` is read where an account name ends — before the `@` of an address, or at the end of the value, with or without an angle-bracketed address after it — rather than anywhere in the value. GitHub reserves the suffix so that no account can be named with it, but a trailer is free text and not an account name, so matching it anywhere also found one sitting inside a person's: `Ada [bot] Smith <ada@example.com>`. That cost little while only `Co-authored-by:` was read this way, and costs more now that a sign-off is: a miscredited co-author can be dropped from the message and the commit still lands, while a false positive on a sign-off leaves a contributor with nothing to write. `CONTRIBUTING.md` had said an assistant signs nothing and left the rest to be inferred. It now says the author has to be a person as well, which is the sentence whose absence the hole was made of. Signed-off-by: Derek Lewis <DerekNonGeneric@inf.is> Assisted-by: Claude-Code:claude-opus-5
4393aef to
4052636
Compare
Requested by DerekNonGeneric
Before: this repository carries its own copy of
build/shared/commit-message.mtsrather than importing it, so the hole fixed in OpenINF/.github#924 was open here
too. An agent committing under its own git identity is the author of what it
commits,
-scopies that identity into the sign-off, andcheckSignOff— whichonly asks whether the sign-off matches the author — found the two in agreement.
pnpm run lint:commitspassed a commit whose Developer Certificate of Originhad been certified by a program.
After: a
Signed-off-by:naming an assistant or a bot account is refusedwhoever the author is, by the same pattern that already refuses one as a
co-author. An agent-authored commit now has no spelling that lands: sign off as
itself and the trailer names a tool, sign off as anybody else and it is not the
author.
How: a straight port of OpenINF/.github#924.
TOOL_COAUTHORbecomesTOOL_IDENTITYand is applied toSigned-off-byas well asCo-authored-by,in
checkTrailersrather than incheckSignOff, so the rule also covers themessage the commit queue validates before landing.
[bot]is read where anaccount name ends, so it cannot match inside a person's name — a false positive
there would block a sign-off, which unlike a co-author credit cannot be dropped.
The same seven tests come with it.
CONTRIBUTING.mdgains the sentence the holewas made of — the author of a commit has to be a person, and an agent committing
on somebody's behalf commits as them.
All three repositories — this one,
OpenINF/.githubandOpenINF/openinf.github.io— carry a byte-identical copy of this file, andnothing syncs them. They are identical again, which is worth keeping in mind
when any of them is next touched. OpenINF/openinf.github.io#1907 is the third.
Verified with
node --test build/shared/*.test.mts(94 pass),pnpm run lint:format,lint:md,lint:spelling,lint:typesandlint:commitson this branch.Summary by CodeRabbit
Documentation
Assisted-by:,Signed-off-by:, andCo-authored-by:trailers.Bug Fixes
Assisted-by:.Tests