Repository navigation
Open
Description
User Story
I maintain OpenShell and review PRs from org members and collaborators every day. I need the repository to enforce its own contribution rules on commits, so reviewers don't have to check signatures and commit trailers by eye.
Description
Two commit rules are documented but not enforced anywhere:
- Cryptographic commit signing.
CONTRIBUTING.md("DCO sign-off is separate from cryptographic commit signing") andCI.md#commit-signingsay org members and collaborators sign their commits. No rule or workflow checks it: none of the repository rulesets (dco,main-integrity,docs-website,main) hasrequired_signatures,mise run pre-commitonly runs format, lint, and license checks, and theDCOcheck covers only theSigned-off-bytrailer. PR #5550 currently carries an unsigned commit (d6d57f0dc), and no check flags it. - No agent attribution.
AGENTS.mdsays never to mention Claude or any AI agent in commits, PR descriptions, or issues (no author attribution, noCo-Authored-By, no "Generated with" footers). Nothing checks this either, and agent harnesses add these footers by default.
Proposed behavior
Add a required PR check, Commit Policy, that fails with a message naming the offending commit and the rule:
- Signing: every commit the PR adds must show GitHub verification
verified: true, when its author is an org member or collaborator with write access or higher. External contributors and bot authors (for example Dependabot) are exempt, matching the existing docs. - Attribution: no commit message, PR title, or PR body may contain a
Co-authored-by:trailer naming an AI agent, or a "Generated with ..." agent footer. Applies to all authors.
Notional output:
Commit Policy: 2 problems
d6d57f0dc not cryptographically signed (author is a collaborator); see CI.md#commit-signing
a1b2c3d4e Co-authored-by trailer names an AI agent; see AGENTS.md
Context
- Related:
CONTRIBUTING.md#dco,CI.md#commit-signing,AGENTS.md(Commits section). - A
required_signaturesrule on themainruleset (managed inai-openshell/infra) is complementary but not sufficient: it cannot exempt external contributors and does not cover attribution. It also acts at merge time, while a PR check gives feedback while the author can still fix the commits. - Open question for maintainers: which agent names and domains the attribution check should recognize. The proposed starting list is Claude, Anthropic, Copilot, Codex, Cursor, Gemini, and
noreplyaddresses of those vendors, kept in one place so it is easy to extend.
Definition of Done
-
Commit Policyruns on pull requests and in the merge queue. - An unsigned commit by an org member or collaborator fails the check.
- An unsigned commit by an external contributor or a bot does not fail the check.
- A
Co-authored-by:trailer or "Generated with" footer naming an agent fails the check, in a commit message or the PR title or body. - Unit tests cover each rule and each exemption.
-
CI.mdandCONTRIBUTING.mddescribe the check and how to fix a failure.
Metadata
Metadata
Assignees
Labels
No labels
Activity