Merge pull request 'ci(pre-commit): refuse a plugins/ directory and agent co-author trailers' (#365) from ci/272-refuse-plugins-and-agent-trailers into main
Images / image (0.1, Dockerfile, ubuntu:24.04@sha256:9c7f200c07e3d4a03e7249d2c16bf66a51120fb876aa2242cf31451412543289, molecule-ubuntu2404, images/molecule-ubuntu2404) (push) Successful in 12s
Images / image (0.1, Dockerfile, ubuntu:26.04@sha256:d66b366dac61b575bee2aef07e9c26e8070096fbe84a3d4d3eb0da069b5d76db, molecule-ubuntu2604, images/molecule-ubuntu2604) (push) Successful in 13s
Images / image (0.2, images/ci/Dockerfile, ubuntu:26.04@sha256:d66b366dac61b575bee2aef07e9c26e8070096fbe84a3d4d3eb0da069b5d76db, ci, ) (push) Successful in 6m26s
Images / image (0.1, Dockerfile, ubuntu:24.04@sha256:9c7f200c07e3d4a03e7249d2c16bf66a51120fb876aa2242cf31451412543289, molecule-ubuntu2404, images/molecule-ubuntu2404) (push) Successful in 12s
Images / image (0.1, Dockerfile, ubuntu:26.04@sha256:d66b366dac61b575bee2aef07e9c26e8070096fbe84a3d4d3eb0da069b5d76db, molecule-ubuntu2604, images/molecule-ubuntu2604) (push) Successful in 13s
Images / image (0.2, images/ci/Dockerfile, ubuntu:26.04@sha256:d66b366dac61b575bee2aef07e9c26e8070096fbe84a3d4d3eb0da069b5d76db, ci, ) (push) Successful in 6m26s
Reviewed-on: #365 Reviewed-by: Defame1297 <[email protected]>
This commit was merged in pull request #365.
This commit is contained in:
commit
4ec685b4f6
3 files changed
+25
-4
No files matched your search
@@ -114,6 +114,16 @@ repos:
|
|||||||
require_serial: true
|
require_serial: true
|
||||||
stages: ['pre-push']
|
stages: ['pre-push']
|
||||||
|
|
||||||
|
# SECURITY.md's accepted risks rest on the Collection shipping roles only. It sits before
|
||||||
|
# ansible-lint, whose fail_fast would otherwise hide this message.
|
||||||
|
- id: refuse-plugins
|
||||||
|
name: Refuse a plugins/ directory
|
||||||
|
description: refuse any file under plugins/
|
||||||
|
entry: the Collection holds roles only; a plugin needs an ADR in docs/adr/ first, and that ADR's pull request removes this hook
|
||||||
|
language: fail
|
||||||
|
files: ^plugins/
|
||||||
|
stages: ['pre-commit']
|
||||||
|
|
||||||
- id: ansible-lint
|
- id: ansible-lint
|
||||||
name: ansible-lint
|
name: ansible-lint
|
||||||
description: ansible-lint production profile, offline
|
description: ansible-lint production profile, offline
|
||||||
@@ -136,6 +146,17 @@ repos:
|
|||||||
files: (?i)(^|/)(\.claude/)?claude(\.local)?\.md$
|
files: (?i)(^|/)(\.claude/)?claude(\.local)?\.md$
|
||||||
stages: ['pre-commit']
|
stages: ['pre-commit']
|
||||||
|
|
||||||
|
# Agent tools write these trailers by default. pygrep prints only the hook's name and the
|
||||||
|
# matching line, so the name carries the rule. Claude is also a person's name, so it matches
|
||||||
|
# only as a trailer's whole name ("Claude <"); a human Co-Authored-By: stays allowed.
|
||||||
|
- id: refuse-agent-trailers
|
||||||
|
name: "Agent work carries Assisted-by: <tool>[:<model>], never an agent Co-Authored-By: or a session link (docs/contributing/ai-assistance.md)"
|
||||||
|
description: refuse Claude-Session and Co-Authored-By lines naming a known agent identity
|
||||||
|
entry: '^(claude-session:|co-authored-by:\s*claude\s*<|co-authored-by:.*(noreply@anthropic\.com|\b(copilot|cursor|gemini|codex)\b))'
|
||||||
|
language: pygrep
|
||||||
|
args: [--ignore-case]
|
||||||
|
stages: [commit-msg]
|
||||||
|
|
||||||
- repo: meta
|
- repo: meta
|
||||||
hooks:
|
hooks:
|
||||||
- id: check-hooks-apply
|
- id: check-hooks-apply
|
||||||
|
|||||||
@@ -46,8 +46,8 @@ held: by a control (a named hook or check), by review, or aspirational (checked
|
|||||||
`Co-Authored-By:` for an agent, a session link or any other AI trailer**
|
`Co-Authored-By:` for an agent, a session link or any other AI trailer**
|
||||||
([ai-assistance.md](docs/contributing/ai-assistance.md)).
|
([ai-assistance.md](docs/contributing/ai-assistance.md)).
|
||||||
*Reason:* AI assistance is disclosed (principle 7), and an agent is not an author (principle 1).
|
*Reason:* AI assistance is disclosed (principle 7), and an agent is not an author (principle 1).
|
||||||
*Held by:* review; the exclusion becomes a control when the commit-msg hook that refuses these
|
*Held by:* control in part: the `refuse-agent-trailers` commit-msg hook refuses `Claude-Session:`
|
||||||
trailers lands (#272).
|
and a `Co-Authored-By:` naming a known agent; review for the rest and for `Assisted-by:`.
|
||||||
- **On conflict with a shared rule delivered by apm, this repository's `AGENTS.md` wins.**
|
- **On conflict with a shared rule delivered by apm, this repository's `AGENTS.md` wins.**
|
||||||
*Reason:* this repository's rules are reviewed here, for this repository.
|
*Reason:* this repository's rules are reviewed here, for this repository.
|
||||||
*Held by:* aspirational.
|
*Held by:* aspirational.
|
||||||
|
|||||||
@@ -33,8 +33,8 @@ contributor docs are held by review until an offline link check exists. Terms su
|
|||||||
History is not rewritten.
|
History is not rewritten.
|
||||||
*Reason:* a co-author trailer makes the tool an author, and a session link is private and points
|
*Reason:* a co-author trailer makes the tool an author, and a session link is private and points
|
||||||
outside this repository.
|
outside this repository.
|
||||||
*Held by:* review until the commit-msg hook that refuses these trailers lands (issue #272); then
|
*Held by:* control in part: the `refuse-agent-trailers` commit-msg hook refuses `Claude-Session:`
|
||||||
control.
|
and a `Co-Authored-By:` naming a known agent; review for the rest.
|
||||||
|
|
||||||
## What agents may do
|
## What agents may do
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user