Repository navigation
Restore pre-activation search gate permissions - #77563
Conversation
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Specification Reviewer completed successfully!
|
|
✅ PR Code Quality Reviewer completed the code quality review. PR Code Quality ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
There was a problem hiding this comment.
Reviewed the changed compiler and regression coverage. The permission additions are scoped to configured search gates, preserve explicit permissions via Merge, and the generated lock updates are consistent with the change. No actionable correctness or maintainability issues found.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.5K
Comment /review to run again
There was a problem hiding this comment.
Reviewed head a0744dabc855d36185de59ac3537f87467f9251f against specs/security-architecture-spec.md v1.1.10 (PM-10a–PM-10c, §7.6.1) and specs/compiler-threat-detection-spec.md v1.0.101.
Blocking finding: the generated lock changes remove permissions instead of adding the permissions required by the new search-gate branch. For example, ab-testing-advisor.md contains an imported skip-if-match, but ab-testing-advisor.lock.yml still gives pre_activation only contents: read; the same mismatch is present in unbloat-docs.lock.yml and other affected locks. Regenerate the affected lock files from this compiler revision and verify each search-gate variant emits issues: read and pull-requests: read while preserving explicit permissions. No specification update is proposed because this is a generated-contract regression, not an intentional contract change.
Coverage: static review only; no tests or conformance scripts were run per review policy.
Generated by PR Specification Reviewer for #77563 · copilot · gpt50 · ~3 AIC · ⌖ ~2 AIC · ⊞ 1.6K
Comment /review-specs to run again
| perms.Set(PermissionPullRequests, PermissionRead) | ||
| } | ||
| // Search gates need read access to issues and pull requests in private/internal repositories. | ||
| if data.SkipIfMatch != nil || data.SkipIfNoMatch != nil { |
There was a problem hiding this comment.
The generated lock updates do not reflect this new branch. For example, .github/workflows/ab-testing-advisor.md has an imported skip-if-match, and its lock still emits pre_activation.permissions: contents: read only (lock lines 2606-2608); the same omission appears in unbloat-docs.lock.yml and other affected locks. This leaves the search step without issues: read/pull-requests: read at runtime, so please regenerate the affected locks from this compiler revision and verify the emitted permissions.
There was a problem hiding this comment.
The locks were already regenerated in a0744da. ab-testing-advisor.lock.yml now emits contents: read, issues: read and pull-requests: read for pre_activation. main currently fails to build at pkg/workflow/imports.go:585 (undefined: topRawSafeOutputs), unrelated to this PR, so I couldn't run a recompile after merging it. The locks may need a make recompile once main builds again.
Comment MemoryPeek at saved memory (review-history)History |
Comment MemoryPeek at saved memory (spec-review-history)History |
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /tdd and /diagnosing-bugs. The fix is correct and the regression coverage is solid. Approving, with one minor naming suggestion inline.
📋 Verification
What was checked
- Root cause:
buildPreActivationPermissionsnow grantsissues: readandpull-requests: readwhen eitherskip-if-matchorskip-if-no-matchis set. The grant is scoped to read and does not add write access. - Regression test:
TestPreActivationSearchPermissionscovers each gate alone and both together. I confirmed it fails (3 subtests) when the grant is removed, so it guards the fix. - Lock files: all 31 PR lock files recompile byte-for-byte to the committed HEAD output, so they are in sync with the compiler.
- Preserved behaviour: explicit
on.permissionsstill merges on top, andTestBuildPreActivationPermissionspasses. - Formatting:
gofmtis clean.
Notes
- Thirteen gated workflows get their scopes through the shared
skip-if-issue-open.mdimport rather than a direct gate in their own.md. The compiler handles this correctly. - Locally, the working tree has uncommitted lock-file edits that remove these grants. They are not part of this PR head (
a0744da), so they do not affect the review.
@copilot please address the review comment above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~5 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again
| `skip-if-no-match: "is:pr is:open"`, | ||
| "skip-if-match: \"is:issue is:open\"\n skip-if-no-match: \"is:pr is:open\"", | ||
| } { | ||
| t.Run(gate, func(t *testing.T) { |
There was a problem hiding this comment.
[/tdd] Subtest names are the raw gate YAML, including the query string, which is hard to read in go test -v output and does not state the expected behaviour. Give each case an explicit name such as skip-if-match grants issues and pull-requests read and keep the gate YAML as a separate field. The assertions stay the same.
@copilot please address this.
There was a problem hiding this comment.
Done: subtests now use explicit names (e.g. "skip-if-match grants issues and pull-requests read") with the gate YAML as a separate field; test passes. Pushed with the latest main merge.
There was a problem hiding this comment.
🔵 Needs a closer look
Changing token permissions across all skip-if workflows needs live validation of the private/internal-repository search fix and maintainer rollout judgment, since workflow_call callers lacking issues/pull-requests read permissions could fail at startup.
No open issues 🎉
What changed in this PR
Restores search-gate permissions in the gh-aw compiler to address #77519, preventing permission-related failures on private and internal repositories without restoring blanket write access.
Changes:
- Grants issue and pull request read access for either pre-activation search gate.
- Adds regression coverage for individual and combined gates and preservation of explicit write permissions.
- Refreshes 31 generated workflow lock files with the required read scopes.
| File | Description |
|---|---|
pkg/workflow/compiler_pre_activation_job.go |
Infers read permissions for search gates. |
pkg/workflow/compiler_pre_activation_job_test.go |
Tests emitted scopes and explicit permission preservation. |
.github/workflows/windows-grower.lock.yml |
Adds search-gate read scopes. |
.github/workflows/weekly-otel-reference.lock.yml |
Adds search-gate read scopes. |
.github/workflows/update-astro.lock.yml |
Adds search-gate read scopes. |
.github/workflows/unbloat-docs.lock.yml |
Adds the missing issue read scope. |
.github/workflows/ubuntu-image-analyzer.lock.yml |
Adds search-gate read scopes. |
.github/workflows/spec-librarian.lock.yml |
Adds search-gate read scopes. |
.github/workflows/slide-deck-maintainer.lock.yml |
Adds search-gate read scopes. |
.github/workflows/refactoring-cadence.lock.yml |
Adds search-gate read scopes. |
.github/workflows/purelock.lock.yml |
Adds search-gate read scopes. |
.github/workflows/pr-sous-chef.lock.yml |
Adds the missing issue read scope. |
.github/workflows/feature-grower.lock.yml |
Adds search-gate read scopes. |
.github/workflows/deployment-incident-monitor.lock.yml |
Adds search-gate read scopes. |
.github/workflows/dead-code-remover.lock.yml |
Adds search-gate read scopes. |
.github/workflows/daily-yamllint-fixer.lock.yml |
Adds search-gate read scopes. |
.github/workflows/daily-windows-defender-scan.lock.yml |
Adds search-gate read scopes. |
.github/workflows/daily-trajectory-grader-implementer.lock.yml |
Adds search-gate read scopes. |
.github/workflows/daily-testify-uber-super-expert.lock.yml |
Adds search-gate read scopes. |
.github/workflows/daily-safe-output-optimizer.lock.yml |
Adds search-gate read scopes. |
.github/workflows/daily-rendering-scripts-verifier.lock.yml |
Adds search-gate read scopes. |
.github/workflows/daily-harness-experiment-proposer.lock.yml |
Adds search-gate read scopes. |
.github/workflows/daily-go-test-stubs-aider.lock.yml |
Adds search-gate read scopes. |
.github/workflows/daily-go-test-parallelizer.lock.yml |
Adds search-gate read scopes. |
.github/workflows/daily-file-diet.lock.yml |
Adds search-gate read scopes. |
.github/workflows/daily-ecosystem-explorer.lock.yml |
Adds search-gate read scopes. |
.github/workflows/daily-agent-of-the-day-blog-writer.lock.yml |
Adds search-gate read scopes. |
.github/workflows/code-simplifier.lock.yml |
Adds search-gate read scopes. |
.github/workflows/code-scanning-fixer.lock.yml |
Adds search-gate read scopes. |
.github/workflows/breaking-change-checker.lock.yml |
Adds search-gate read scopes. |
.github/workflows/architecture-guardian.lock.yml |
Adds search-gate read scopes. |
.github/workflows/actions-aw-linter-factory.lock.yml |
Adds search-gate read scopes. |
.github/workflows/ab-testing-advisor.lock.yml |
Adds search-gate read scopes. |
Review effort: Max (dynamic)
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "a0744dabc855d36185de59ac3537f87467f9251f",
"kind": "requested",
"schema_version": "1",
"state": "42e6de2c198094f05b974ad59c19ef896282784fdb69d23174ec97f625bbece3",
"work": [
"3d1083f061d62ea474475a5b4c24227520ff1244551b2fde3ad36e3e37b04ad1",
"5e40d91f883f5343e18bcf51941ada029000278856e187636f999a512f88ea7e"
],
"workflow": "pr-sous-chef"
}
|
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…ation-permissions Co-authored-by: copilot-swe-agent[bot] <[email protected]>
|
@copilot merge main and recompile |
…ation-permissions Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Merged the latest |
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "5142363d99d55e1d666e036be0bca8c2e696f35b",
"kind": "requested",
"schema_version": "1",
"state": "aa5473b74d8e6b54419a295e16d9d65f63d5c83448e347b07964da49306b32f3",
"work": [
"8acb61a077717e3a460018aacdfde96fd489f77606cd36169e2328d9079b75bb"
],
"workflow": "pr-sous-chef"
}
|
…ation-permissions Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Merged the latest |
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "6e45379b8f67b9abac221dcf829b8d19d2594d83",
"kind": "requested",
"schema_version": "1",
"state": "daf4444306316e9b9b2fd5550f815bcad6b94f9583197a206c18d2caf18f1dd6",
"work": [
"42e5d572d9d75b7168fe7d0aeda0717cc07e65ed240f6d299e6fec661214f1ac"
],
"workflow": "pr-sous-chef"
}
|
|
🎉 This pull request is included in a new release. Release: |
The v1.x compiler omitted
pre_activationpermissions for search gates, leavingGITHUB_TOKENmetadata-only under top-levelpermissions: {}. Searches on private/internal repositories could then fail with HTTP 422 before the agent started.issues: readandpull-requests: readwhen eitherskip-if-matchorskip-if-no-matchis configured. Preserve expliciton.permissionswithout restoring blanket write access.