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
Conversation
… 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
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.
Summary
pr-management-code-review'sCOMMENTfooter always claimed an<PROJECT>maintainer confirmed the review, butCOMMENTis the onedisposition 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_CHANGESare unaffected: GitHub itself refuses thosemutations without write access, so their existing wording is always
accurate.
COMMENTnow renders one of two verbatim footers, chosen from thecollaborator-permission result
prerequisites.md§ 1 already computes,instead of always asserting maintainer confirmation.
Type of change
skills/pr-management-code-review/): eval fixtures updated belowtools/<system>/*.md)tools/*/withpyproject.toml)docs/,README.md,CONTRIBUTING.md)projects/_template/)prek, workflows, validators)Test plan
prek run --all-filespasses (not run as a single command; see Notes)uv run pytest/ruff check/mypypasses(
step-7b-review-body-attribution/fixtures/case-4-footer-role-neutral-comment)uv run --project tools/skill-and-tool-validator --group dev skill-and-tool-validate(0 hard failures repo-wide),npx markdownlint-cli2andtyposon all 8 changed files (clean),lycheelink check (0 broken links),tools/dev/add-license-headers.pyon all 8 changed files (no changes needed)RFC-AI-0004 compliance
<PROJECT>,<tracker>,<upstream>,<security-list>) used in all skill / tool prose (thecheck-placeholdersprek hook is the mechanical gate)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 fullprek run --all-files, since installingprekitself was not practical in thisenvironment; I did not find a diff against any of these tools' output. The
eval runner (
skill_evals.runner, print mode) confirms the newstep-7b-review-body-attributioncase renders a schema-valid prompt againstthe updated
system-prompt.md, but I do not have a compatible model CLIhere to run the automated
--clijudge pass, so the case is unverifiedagainst an actual model response. Also unverified: a live end-to-end post
from a second GitHub identity without write access to this repo.