Repository navigation
fix(ci): stop the scope review lane redding edits to its own workflow - #32423
Conversation
Security Scope Review listed its own workflow file on its scope surface. On pull_request the lane runs the head's copy of that file, so listing it only had an edit judge itself, and an edit that tightens nothing leaves the model no candidate to propose: validate refuses the empty candidate file by design (exit 2), so every such head needed a human override. Take the workflow off the SCOPE-SURFACE array. A diff whose only surface path is this file resolves "nothing to scope" before any credential or model call; every other in-scope diff, and the exit-2 rule, are unchanged. The fork lane extracts the same array. Closes #27322
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks. Listing the workflow on its own scope surface protected nothing, because on Notes
[DESIGN-REVIEWED] afebede Description read[DESCRIPTION-READ] 6dd78c9b90d922303f48f32ed373e57a33a73028c028004d45d1d53bed8d7129 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing to check. What this change shipsInventory (6 items) — 6 justifiedIntent: a maintainer edits the scope-review workflow alone and the PR stops going red with no human override needed (#27322). This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] afebede Description read[DESCRIPTION-READ] 564081aa1e26c28f9f42cf9d9db2002eada9e025aca0b23d7cbcebbb5d81a564 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
|
Hold for human review at The change itself looks correct and I found no defect: on It stays with a human because it narrows a security gate: after this, a PR that edits only — crew-pr-reviewer (r149) |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approved for the on-call. Review lanes pass on afebede, no conflict, no open change request.
Problem / Motivation
Goal: A pull request whose only security-surface change is an edit to
security-scope-review.ymlpasses Security Scope Review without a human override.Security Scope Review lists its own workflow file on its scope surface. A diff that touches only that file tightens nothing, so the model has nothing to propose and can honestly write an empty
candidates.json.scope_candidates.py validaterefuses an empty file by design (exit 2), and the lane fails closed with "produced no verdict". The only same-head exit is/ai-review override scope <sha> <class>: <reason>, keyed to one commit, so every push of such a change needs a fresh human override.Why it matters
Every maintenance edit to this workflow (a runner move, an action bump, a checkout change, or the rollback of one) can cost a writer override per head on a lane
PR Readinesswatches, and the red reads like a broken lane when the model call in fact succeeded, which invites the wrong override class.Not a goal
test_an_untrustworthy_candidate_file_is_exit_2is untouched.scripts/scope_candidates.py,scripts/scope_redact.py,.github/review-prompts/security-scope.md) stay on the surface, unchanged. The lane reads each from the base commit, so an edit to one is judged by the lane as it stands, and edits to them have been reviewed to a verdict (fix(ci): keep credential-shaped literals out of scope-review candidates #23515, feat(ci): scope_redact.py learns GitHub tokens and --redact-env for the reviewer lanes #21795, fix(ci): name an unresolved scope on the fork Security Scope Review #23066).What changed (motivation → approach → change)
An edit to this workflow alone now resolves "nothing to scope" and passes, the same way every pull request off the security surface already does. Before, the workflow named itself in its own
SCOPE-SURFACEarray, so such an edit setin_scope=truefor a diff the classifier has nothing to measure, and the exit-2 rule then refused the honest empty answer.The workflow file comes off that array. The resolver's answer is the one the issue's first option asks for: a diff whose only surface path is this file is skipped before any credential or model call, while a diff that also touches a deny, classifier or lane-input path is in scope exactly as before and still meets the exit-2 rule. Nothing measurable is lost: on
pull_requestthe lane runs the edited copy of this file, so listing it only had an edit judge itself, and the classifier compares two refs whose deny composite is identical, so a self-only edit could never confirm a regression. The fork lane extracts the same array from the base commit, so it scopes the same list.The workflow comment that warned editors about this red is gone, and
docs/ci/ci-and-reviews.mddrops the cost note and says why the workflow is not on the surface.Backwards compatibility
Compatible: only a pull request whose sole surface path is this workflow changes outcome, from a red to the "nothing to scope" pass; every other pull request resolves exactly as before.
Removes nothing: no product surface changes, and the array's one other reader, the fork lane's
Resolve review scopestep, still extracts 11 entries against its floor of 2.Tests
test_no_workflow_file_is_on_the_surfacepins that no workflow file is on theSCOPE-SURFACEarray.TestTheTwoSecurityGatesScopeOneSurface._SCOPE_ONLYdrops the entry (its own test fails on an exclusion whose entry is gone), and the fork-lane extraction test drops its exemption for it.Proof: PROVEN test/test_ai_review_workflows_scope_verdict.py::TestTheScopeSurfaceIsResolvedOnce::test_no_workflow_file_is_on_the_surface, test/test_ai_review_workflows_scope_verdict.py::TestTheTwoSecurityGatesScopeOneSurface::test_the_shared_core_is_identical (head afebede)
Manual verification
This pull request is its own check: its only security-surface path is
security-scope-review.yml, and onpull_requestthe lane runs this edited copy, so its Security Scope Review run resolves "nothing to scope" instead of reachingvalidate.Screenshots / video
N/A — no user-visible frontend surface is touched.
Related Issues
Closes #27322
Sibling sweep
Swept: git grep -n "SCOPE-SURFACE" -- .github/workflows
Sibling: .github/workflows/fork-security-scope-review.yml -- not affected -- it extracts this array from the base commit, so it scopes the same list
Pattern harvest
Not generalizable: the refusal of an empty candidate file exists only in this lane, and the defect was one list entry naming the lane's own workflow.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)