Skip to content

fix(skills/pr-management-code-review): stop the AI-attribution footer asserting an unconfirmed maintainer role - #1111

Open
AmirF194 wants to merge 1 commit into
apache:mainfrom
AmirF194:fix/923-ai-attribution-footer-role-neutral
Open

fix(skills/pr-management-code-review): stop the AI-attribution footer asserting an unconfirmed maintainer role#1111
AmirF194 wants to merge 1 commit into
apache:mainfrom
AmirF194:fix/923-ai-attribution-footer-role-neutral

Conversation

@AmirF194

Copy link
Copy Markdown

Summary

  • pr-management-code-review's COMMENT footer always claimed an
    <PROJECT> maintainer confirmed the review, but COMMENT is the one
    disposition GitHub lets any account post regardless of write access, so a
    non-collaborator's comment could carry a false claim (feat(codex): first-class Codex CLI skill runtime #902).
  • APPROVE/REQUEST_CHANGES are unaffected: GitHub itself refuses those
    mutations without write access, so their existing wording is always
    accurate.
  • Fix: COMMENT now renders one of two verbatim footers, chosen from the
    collaborator-permission result prerequisites.md § 1 already computes,
    instead of always asserting maintainer confirmation.

Type of change

  • Skill change (skills/pr-management-code-review/): eval fixtures updated below
  • Tool / bridge contract (tools/<system>/*.md)
  • Python package (tools/*/ with pyproject.toml)
  • Groovy reference impl
  • Cross-cutting (RFC, AGENTS.md, sandbox, privacy-LLM)
  • Documentation (docs/, README.md, CONTRIBUTING.md)
  • Project template (projects/_template/)
  • CI / dev loop (prek, workflows, validators)
  • Other:

Test plan

  • prek run --all-files passes (not run as a single command; see Notes)
  • For Python packages touched: uv run pytest / ruff check / mypy passes
  • For Groovy bridges touched: command-line invocation tested end-to-end
  • For skill changes: eval suite passes for the affected skill (see Notes)
  • For skill behaviour changes: a new eval fixture is included
    (step-7b-review-body-attribution/fixtures/case-4-footer-role-neutral-comment)
  • Other: uv run --project tools/skill-and-tool-validator --group dev skill-and-tool-validate (0 hard failures repo-wide), npx markdownlint-cli2 and typos on all 8 changed files (clean), lychee link check (0 broken links), tools/dev/add-license-headers.py on all 8 changed files (no changes needed)

RFC-AI-0004 compliance

  • HITL: any new mutation is gated on explicit user confirmation
  • Sandbox: no new unrestricted host access; network reach declared in the adapter
  • Vendor neutrality: placeholders (<PROJECT>, <tracker>, <upstream>, <security-list>) used in all skill / tool prose (the check-placeholders prek hook is the mechanical gate)
  • Conversational + correctable: agentic-override path documented if behaviour is adopter-tunable
  • Write-access discipline: no autonomous outbound messages; drafts only, sent on confirmation
  • Privacy LLM: private content does not reach a non-approved LLM; redactor invoked where needed

Linked issues

Fixes #923

Notes for reviewers

I ran the individual hooks the change touches (license headers, markdownlint,
typos, lychee, skill-and-tool-validator) rather than the full prek run --all-files, since installing prek itself was not practical in this
environment; I did not find a diff against any of these tools' output. The
eval runner (skill_evals.runner, print mode) confirms the new
step-7b-review-body-attribution case renders a schema-valid prompt against
the updated system-prompt.md, but I do not have a compatible model CLI
here to run the automated --cli judge pass, so the case is unverified
against an actual model response. Also unverified: a live end-to-end post
from a second GitHub identity without write access to this repo.

… asserting an unconfirmed maintainer role

Why: the footer on every posted review claimed an <PROJECT> maintainer
had confirmed the submission, but nothing checked whether the account
posting it actually held that access. GitHub itself rejects APPROVE
and REQUEST_CHANGES from an account without write access, so those two
footers were always accurate; COMMENT has no such gate, so a non-
collaborator's COMMENT review could carry a false claim (apache#902).

Golden rule 5's COMMENT footer now picks between the existing
maintainer-confirmed wording and a new role-neutral wording based on
the collaborator-permission result prerequisites.md#1 already
computes, so the claim always matches the poster's actual access.
APPROVE and REQUEST_CHANGES are unchanged. Extends the
step-7b-review-body-attribution eval with a case covering the new
variant.

Fixes apache#923
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.

pr-management-code-review: AI-attribution footer claims "confirmed by a Magpie maintainer" without verifying the runner is one

1 participant