Request PR read access for no-fallback branch pushes - #59739
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The regression test assertion is currently too broad to guarantee the GitHub App token requests permission-pull-requests: read, and the large lockfile/model-list churn appears out of scope for the stated fix and should be clarified or reverted.
Pull request overview
This PR fixes a permissions regression in the push-to-pull-request-branch safe-output handler by ensuring the generated GitHub App token can read Pull Request metadata even when fallback PR creation is disabled.
Changes:
- Add
pull-requests: readto the computed permissions whenfallback-as-pull-request: false. - Update Go unit tests to assert the new permission behavior.
- Regenerate multiple workflow lockfiles (includes unrelated embedded firewall model allowlist updates).
File summaries
| File | Description |
|---|---|
| pkg/workflow/safe_output_handlers.go | Adds pull-requests: read when PR fallback is disabled. |
| pkg/workflow/safe_outputs_permissions_test.go | Updates expected computed permissions for the fallback-disabled case. |
| pkg/workflow/push_to_pull_request_branch_test.go | Adds/adjusts compilation-based regression assertions for PR permissions. |
| .github/workflows/windows.lock.yml | Regenerated lockfile; embedded firewall config blob changed (model allowlist). |
| .github/workflows/windows-grower.lock.yml | Regenerated lockfile; embedded firewall config blob changed (model allowlist). |
| .github/workflows/semantic-function-refactor.lock.yml | Regenerated lockfile; embedded firewall config blob changed (model allowlist). |
| .github/workflows/notion-issue-summary.lock.yml | Regenerated lockfile; embedded firewall config blob changed (model allowlist). |
| .github/workflows/hippo-embed.lock.yml | Regenerated lockfile; embedded firewall config blob changed (model allowlist). |
| .github/workflows/firewall.lock.yml | Regenerated lockfile; embedded firewall config blob changed (model allowlist). |
| .github/workflows/example-permissions-warning.lock.yml | Regenerated lockfile; embedded firewall config blob changed (model allowlist). |
| .github/workflows/daily-max-ai-credits-test.lock.yml | Regenerated lockfile; embedded firewall config blob changed (model allowlist). |
| .github/workflows/daily-harness-experiment-proposer.lock.yml | Regenerated lockfile; embedded firewall config blob changed (model allowlist). |
| .github/workflows/daily-credit-limit-test.lock.yml | Regenerated lockfile; embedded firewall config blob changed (model allowlist). |
| .github/workflows/codex-github-remote-mcp-test.lock.yml | Regenerated lockfile; embedded firewall config blob changed (model allowlist). |
| .github/workflows/agentic-token-optimizer.lock.yml | Regenerated lockfile; embedded firewall config blob changed (model allowlist). |
Review details
- Files reviewed: 30/301 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
@copilot this PR is merge-conflicting and still has failing checks. Please run Current failing checks:
Run: https://github.com/github/gh-aw/actions/runs/34363077615 Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "github.com"See Network Configuration for more information.
|
…ull-request-permissions # Conflicts: # .github/workflows/daily-go-test-parallelizer.lock.yml Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
This reverts commit 5d0930a. Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Resolved the main conflict and restored the unrelated generated lockfiles to |
push-to-pull-request-branchreads PR metadata before pushing. With fallback disabled, generated GitHub App tokens omitted pull-request access, causing the lookup to fail with 403.Permission generation
pull-requests: readwithcontents: writewhenfallback-as-pull-request: false.pull-requests: writewhen fallback remains enabled.Regression coverage