Repository navigation
Require a signed interactive review record - #610
Merged
Merged
Conversation
The interactive-review check waited for a maintainer's label and failed on fork pull requests, and only the pre-push hook enforced the review, so a contributor without the hooks reached a green check. The hook now signs a record of the completed review with the contributor's SSH key and pushes it with the branch as a git note. The check runs the base's checker on a bare fetch of the head, measures the change and, over the thresholds, verifies the record against the GitHub keys of the opener and the commit authors. A code owner's own work and Dependabot's are exempt, an outage is told apart from missing setup, and --publish-review sends the record for a branch already pushed. Change-Id: I27c8fdd0a9da5bab38f02afe8daa37fd347b50c7
Contributors and maintainers read the large-change rules in several places, which had drifted from what the hook and the check enforce and still promised the removed label and the approver's one-passage question. docs/large-change-explanation.md now owns the thresholds, the exemptions, the record and a fix for each refusal; CONTRIBUTING.md keeps the one-time key setup and links to it, as do the skills, and development.md lists the admin setup. The one-passage question is withdrawn until it can be enforced, with a FIXME where maintainers and the checker discuss it. Change-Id: I6ceead0d9d0d62dcb1f515b1f75985ee9745f931
From December 2, 2026, GitHub blocks pull_request_target in public repositories unless an Actions event policy allows it, and the interactive-review check would stop running. The trigger stays, since it keeps a pull request from editing its own check; record the one policy, scoped to this workflow and its two events, that an admin creates to keep it, and note in the workflow that renaming the file needs the policy changed with it. Change-Id: I4b5d325011648485751cbaeeac5079072da6f60a
This was referenced Nov 7, 2026
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.
Problem and behavior
The
interactive-reviewcheck could not tell whether a contributor ran theinteractive review. It waited for the
explainedlabel, and on fork pullrequests it failed outright (run 42251304697). Only the pre-push hook enforced
the review, so a contributor without the hooks, or pushing past them, reached a
green check.
After this change, the pre-push hook signs a review record on the author's
machine and pushes it with the branch as the git note
refs/notes/codetrial-review. The signature covers a fingerprint of theproject, head, base, diff hash and answer digest; the note carries none of the
answers. The check measures the diff. Below the thresholds it passes. Above
them it verifies the record against the author's public SSH keys on GitHub. The
PR description and labels play no part.
Exemptions:
CODEOWNERS;
Every failure names its fix:
sh scripts/git-pre-push.sh --publish-review <fork-remote> [<branch>].Approach
pull_request_target, so a pull request cannot edit thecheck that judges it.
file from the pull request is on disk.
scoped to
pr-description.ymlnow allows it (created as id 11911).docs/large-change-explanation.mdowns the rules and every recovery path.CONTRIBUTING and the skills link to it.
enforced; a FIXME in
docs/development.mdand one in the checker track it.check passed on its own head (the ruleset requires it).
check-queue-review.pydrops its--guard,--branchand--repooptions,which nothing calls any more.
to another base is measured again. The token is unset before anything reads
the pull request's data.
Validation
scripts/run-python-tests.pyon the review-hook and hashchain tests: 104pass. Mutations of the base-ancestor check, the commit-list match, the
push-URL lookup and the record restore after the notes merge each fail a
test.
./scripts/test.sh portable: passes excepttest-gate-tests, which needscryptographyin the local Python and does not touch this change.scripts/check-skill-refs.py: passes.scripts/hashchain.py verify: passes.make indent: clean.Not checked: a real notes push and signature check from a fork pull request. A
contributor's next large-change run after merge is the first live test.