Repository navigation
fix(ci): keep Periphery scope checks off shared API quota - #106090
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dc40b8d921
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| BASE_SHA: ${{ github.event.pull_request.base.sha }} | ||
| EVENT_NAME: ${{ github.event_name }} | ||
| PR_DRAFT: ${{ github.event.pull_request.draft && 'true' || 'false' }} | ||
| run: | |
There was a problem hiding this comment.
Update the iOS Periphery scope tests
When the existing workflow tests run for this changed workflow, test/scripts/ios-periphery-comment-workflow.test.ts still finds the id: scope step and reads step.with.script; this step is now a Bash run step, so scopeScript() throws missing iOS Periphery scope script and the scope-output cases around that helper fail. Since scripts/test-projects.test-support.mjs maps .github/workflows/ios-periphery.yml changes to that test, please update or replace the test coverage along with this workflow change.
Useful? React with 👍 / 👎.
dc40b8d to
6c1b0fe
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6c1b0fe55e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - name: Ensure base commit | ||
| if: github.event_name == 'pull_request' && github.event.pull_request.draft == false | ||
| uses: ./.github/actions/ensure-base-commit |
There was a problem hiding this comment.
Keep scope fetch logic out of PR-controlled local actions
For pull_request runs, the preceding checkout materializes the PR merge commit, so this local uses: ./.github/actions/ensure-base-commit step loads action.yml from the contributor-controlled workspace. If a PR changes .github/actions/ensure-base-commit/action.yml, that action can reset or rewrite the workspace before the following git diff, causing even iOS/macOS/shared Swift changes to report should-scan=false and bypass these Periphery checks; the same new pattern appears in the macOS and shared Periphery workflows.
Useful? React with 👍 / 👎.
6c1b0fe to
1d76ad6
Compare
|
Codex review: found issues before merge. Reviewed July 13, 2026, 4:42 AM ET / 08:42 UTC. Summary PR surface: Tests +27, Config +48. Total +75 across 5 files. Reproducibility: yes. The supplied workflow runs reproduce the original quota-zero HTTP 403 failure, and the prior API call is directly visible in the replaced workflow logic. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Keep local git-based scope detection, but perform the bounded base fetch using inline workflow code or a separately checked-out trusted-base helper, then add an adversarial regression check proving a pull request cannot alter the pre-scope executable path. Do we have a high-confidence way to reproduce the issue? Yes. The supplied workflow runs reproduce the original quota-zero HTTP 403 failure, and the prior API call is directly visible in the replaced workflow logic. Is this the best way to solve the issue? No, not yet. A local git diff is the right direction, but the base-fetch bootstrap must not execute contributor-controlled repository code before deciding whether required scans run. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0d177c9b4d45. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Tests +27, Config +48. Total +75 across 5 files. View PR surface stats
Security concerns:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
1d76ad6 to
10592ee
Compare
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(ci): keep Periphery scope checks off shared API quota This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
10592ee to
7950c54
Compare
|
Land-ready proof for exact head
Best-fix judgment: yes. Scope is derived locally from the checked-out Git graph, removing three quota-sensitive |
|
Merged via squash.
|
|
Autoreview proof correction: The earlier land-ready note claimed a clean autoreview without retaining a validated successful helper exit. I reran the exact landed commit
The helper completed with exit code 0, |
…06090) * fix(ci): avoid API quota in Periphery scope checks * fix(ci): preserve Periphery scope contracts
What Problem This Solves
Fixes an issue where unrelated pull requests could receive three red Periphery checks when the shared GitHub Actions installation exhausted its core API quota. Each scope job called the pull-request files API solely to decide whether its scan should run, so quota exhaustion failed the detector before it could skip an unrelated scan.
Why This Change Was Made
The three scope jobs now use a credential-free shallow checkout, the existing bounded base-commit fetch action, and a local fail-closed
git diffover the same path sets. Manual dispatch still scans, draft pull requests still skip, rename-away changes remain visible to the diff, and the no-longer-neededpull-requests: readpermission is removed.User Impact
No product behavior changes. Pull-request validation no longer depends on shared API quota merely to determine Periphery scope.
Evidence
29226761911,29226761962, and29226761901all failed at the same files-list request with HTTP 403 andx-ratelimit-remaining: 0.actionlintpassed for all three changed workflows.git diff --checkpassed.README.mdpath.