Skip to content
Source
Sign inSign up
pingdotgg/t3code

perf(ci): workflow-only PRs stop running every package job #28753

Closedonly21mil(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/28753/headopened View on GitHub

Problem

A PR that only edits a workflow such as mobile-eas-production.yml or pr-size.yml runs the full CI suite: build, typecheck, every test job, all 8 server shards, Rust and release smoke. The change classifier (ci-changes.cjs) treats every path under .github/workflows/ as unknown, and unknown paths run everything. Package tests do not read those files, so each run is wasted.

Change

Add the 21 workflows that no test reads to the classifier's inert list, by name. A PR touching only those files now runs Changes, Lint and Check, and the server shards stop after checkout, the same as a docs-only PR.

These keep running everything:

  • ci.yml, because it defines the jobs.
  • release.yml and web-preview.yml, because tests read them (notify-discord-release.test.ts, relay-state-output.test.cjs, vercel-deployment-output.test.cjs).
  • Any workflow not on the list, so a new workflow fails open until someone adds it.
  • The classifier, its action and the other .github/ files (setup-ci-deps, triage/PLAYBOOK.md and the rest).

A PR that changes a workflow and source code still selects the source's packages. Pushes to main still run every job, and the required Check job is unchanged. check:changed uses the same mapping, so local runs match.

Scope and approval

This is an internal CI cost fix with no product behavior change. It extends the path gating from #19587, the same way #28273 handled a doc that a test reads. I'd like maintainers to confirm the choice to list workflows by name rather than mark the whole folder inert. A name list keeps new workflows on the safe path, but each new workflow needs a one-line addition to benefit.

Verification

  • vp test run scripts/check-changed.test.ts: 9 passed. The new case checks that a listed workflow affects no packages and turns every job output off. A listed workflow plus a web source file selects only @t3tools/scripts and @t3tools/web. ci.yml, release.yml, web-preview.yml, an unlisted workflow, ci-changes.cjs and the ci-changes action each still select every package. On the base commit the new case fails, with every package selected for pr-size.yml.
  • vp run check:changed 1d626d02d9: format, lint, knip, typecheck (39 packages) and tests all pass.
  • I checked each workflow file against the classifier: 21 of 24 are inert, and ci.yml, release.yml and web-preview.yml are not.
  • Savings, measured from GitHub job timings. Seven recent workflow-only PRs (#27292, #27285, #26779, #26755, #26596, #26458, #22628) used 20 to 35 runner-minutes per CI run. Docs-only PRs (#28310, #21678, #25424), which take the gated path this change enables, used 2.3 to 2.5. These samples suggest savings of about 18 to 33 runner-minutes per eligible CI run; actual savings depend on job duration. Replaying the new classifier over main since June, 18 of the 46 workflow-only PRs would have taken the gated path.

Not checked:

  • A live CI run of a workflow-only PR with this change. This PR edits the classifier, so its own CI runs every job.
  • Workflow files under other names (.yaml, subfolders) are not listed and still run everything.

Prior PRs

  • #19587 by maria-rcks added the path-gated CI this builds on.
  • #28273 by only21mil kept a test-read doc on the path of the test that reads it. This change keeps that.

Generated with Claude Opus 5.5 and GPT-6.1 Sol in T3 Code Nightly

    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    2. Approvability

      Verdict: Needs Human Approval

      Macroscope's review found this PR requires human approval — Allowlisted workflow-only PRs will skip package builds, tests, and typechecks while retaining lint. The expanded typecheck exclusion requires human review before adopting the reduced checking scope.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    3. Review in Change Stack →

      No actionable comments were generated in the recent review.

      Recent review info
      Run configuration
      Commits

      Reviewing files that changed from the base of the PR and between 3fd2b855c5c6b9169cdfe3733b34011c1c5ed4b7 and 93fa7c4ba6d4d718abe442a32b1bdc5710e6a16a.

      Files selected for processing: 2
      • .github/scripts/ci-changes.cjs
      • scripts/check-changed.test.ts

      Limit details: You’ve used all 10 included reviews currently available.

      Walkthrough

      The CI change checker now treats 22 named workflow files as inert. Tests verify how these workflow changes and related CI changes affect package selection.

      Changes: Workflow classification

      Layer / File(s)Summary
      Inert workflow handling and package selection
      .github/scripts/ci-changes.cjs, scripts/check-changed.test.ts
      The checker classifies 22 named workflow paths as inert. Tests verify package selection for a listed workflow alone, alongside a web source change, and for other CI-related changes.

      Estimated code review effort: 2 (Simple) | ~10 minutes

      Change: Other

      Suggested reviewers: juliusmarminge, macroscopeapp

      Merge Risk: Minimal · up to 93fa7

      Listed workflow-only changes skip package jobs. No merge-blocking risk was identified.

      Pre-merge checks: Passed 4
      Check nameStatusExplanation
      Title checkPassedThe title "perf(ci): workflow-only PRs stop running every package job" matches the main change: workflow-only PRs no longer select every package. It uses a conventional commit format and is specific. …
      Description checkPassedThe description follows the repository template. It has Problem, Change, Scope and approval, and Verification sections, plus a prior-PRs section. The Problem section gives the cause and the reproducti…
      Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
      Full details: Title check

      Explanation

      The title "perf(ci): workflow-only PRs stop running every package job" matches the main change: workflow-only PRs no longer select every package. It uses a conventional commit format and is specific. The changeset adds 21-22 named workflows to the inert list in ci-changes.cjs and adds tests in check-changed.test.ts, which fits the title.

      Full details: Description check

      Explanation

      The description follows the repository template. It has Problem, Change, Scope and approval, and Verification sections, plus a prior-PRs section. The Problem section gives the cause and the reproduction context. The Change section explains the named-list approach and which workflows keep running everything. Scope cites the prior PRs and asks maintainers to confirm the naming choice. Verification lists focused test results, the base-commit failure, the replay analysis, and what was not checked. The template asks for an agent model and harness at the end, and the author included a generation line. The description does not state a maintainer approval link or comment for scope, which the template asks for. It also gives no screenshots, but the change has no UI, so that does not apply. The description is mostly complete, so the check passes.

      Finishing Touches
      Generate unit tests (beta)
      • Create a new PR
      • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

      Usage-based review receipt

      Note

      This review was completed with usage-based billing: files reviewed beyond your plan's included limits are billed at $0.25/file. View usage-based billing.

    4. Note

      🤖 Opus 5.5 replying on behalf of Victor.

      Closing this to bring my open PRs down under the new limit. The branch stays on my fork if it is useful.

Sign in to join this conversation.