Repository navigation
Conversation
|
Intent: Remove the desktop matrix’s avoidable pull-request-files API read while preserving its platform-routing behavior. |
First Principles Review (Opus 5.5, fork) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing to check. Not justified as shipped
What this change shipsInventory (6 items) — 5 justifiedIntent: make the PR desktop-platform decision without spending the shared installation REST quota (#12920). This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] 7040619 Description read[DESCRIPTION-READ] 5abc8638233f88e38252711098868d3136b5879a26a6557cd58366d555b7a679 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Check that this PR's own [DESIGN-REVIEWED] 7040619 Description read[DESCRIPTION-READ] c2d378370ac20e3b3775798893d7a4b22242514934d574a57beb5b6da9bbc047 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 |
GPT 5.6 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed |
2621156 to
18deea6
Compare
18deea6 to
d396f98
Compare
|
PR triage (2026-10-05): DISTINCT — needs a rebase I compared the diff from merge base
Recommendation: REBASE, then keep it. |
The PR-only fetch-depth: 0 checkout in desktop-matrix had no timeout, so a hung full-history fetch could hold every desktop leg for the 6-hour default. Use the same 15-minute budget as ci.yml's changes job and pin it with a contract test.
d396f98 to
7040619
Compare
|
@bolichen97 Thanks for the triage. Rebased onto current
The |
UX Review (Opus 5.5, fork) — ⏭️ skippedRevision |
The desktop-matrix job already decides its matrix from a local git diff (dorny/paths-filter with an empty token), so it no longer reads the pull-request files API. Drop the now-unused pull-requests: read permission, pin the contents: read floor with a contract test, and note it in the CI docs. Ported from #13024 (commit f198ced); the rest of that change (local-diff mode, PR-only base fetch) is already on main. Co-authored-by: NB3025 <NB3025@users.noreply.github.com>
|
Thanks @NB3025 for this work. Main has since moved to local-diff mode for the desktop matrix in a different shape (an empty The one piece main still lacked was dropping the unused |
Problem / Motivation
Goal: Pull-request builds choose the affected desktop platforms without spending pull-request-files REST quota or needing
pull-requests: read.The desktop matrix uses
dorny/paths-filterwith its GitHub token on pull requests, so deciding whether to include macOS consumes the pull-request-files REST API and requirespull-requests: read.Why it matters
The repository's installation REST budget is shared by every workflow. This avoidable read contributes to rate-limit exhaustion that can prevent fork review lanes from starting even though the matrix decision is available from git history already checked out by the job.
Not a goal
What changed (motivation → approach → change)
Pull-request builds now keep the same affected-platform desktop matrix without spending pull-request-files API quota or granting
pull-requests: read. To achieve that, the desktop matrix in.github/workflows/build.ymlchecks out full history only for pull-request events and passes an empty token todorny/paths-filter, selecting its local-git diff mode instead of the pull-request-files API. The job no longer requestspull-requests: read. Push and other non-PR runs skip the checkout and retain the existing all-platform matrix behavior. Contract tests pin the PR-only checkout, credential handling, local-diff mode, permission floor, and existing platform routing; the CI documentation records the new source of the matrix decision.Backwards compatibility
Compatible: the same path patterns and matrix outputs are preserved; only the read source changes from GitHub's PR-files API to the checked-out git diff.
Tests
git diff --checkpassed.Manual verification
N/A — workflow shape and event routing are fully pinned by executable YAML contract tests.
Related Issues
Related to #12920. This PR reduces request volume but intentionally does not close the incident before post-deployment telemetry.
Pattern harvest
Rule candidate: review-prompt
Pattern: prefer a checked-out local git diff over the pull-request-files API when the workflow needs only path classification.
Checklist
feat|fix|docs|refactor|perf|test|chore|ci|build|revert: ...)