Repository navigation
Conversation
The Build job typechecked all 39 workspace packages on every pull request, in dependency order, even when ci-changes.cjs had already found a smaller affected set. Fork pull requests cannot read the shared task cache, so each of those checks ran cold. Pass the affected set to the typecheck step, as the Test job already does, and run it with check:changed's command, which drops dependency ordering that tsc --noEmit does not need. Pushes to main and changes that reach every package still typecheck everything. Add two reads the server's typecheck and tests make without a declared dependency, so the set stays complete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — CI typechecks only affected packages and their dependents, aligning with the existing local check command. Full-run fallbacks and full checks on main remain intact, with no product behavior or diagnostic-suppression changes. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Determine and expose affected packages .github/scripts/ci-changes.cjs, .github/scripts/ci-changes.d.cts, .github/actions/ci-changes/action.yml, scripts/check-changed.test.ts |
The change detector updates package ownership and dependency rules, returns affected package names as typecheck_packages, and tests package selection for changed packages, server-read files, shared inputs, and full runs. |
Pass package selection to typechecking .github/workflows/ci.yml |
The changes job exposes typecheck_packages. The build job runs typechecks with a filter for each listed package, or uses -r when the list is empty. It runs the command through vp run --cache --parallel --concurrency-limit 4. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Other
Sequence Diagram(s)
sequenceDiagram
participant decide as decide
participant detect as detect step
participant changes as changes job
participant build as build job
participant vp as vp
detect->>decide: calculate affected package names
decide-->>detect: return typecheck_packages
detect-->>changes: expose typecheck_packages
changes-->>build: pass package list
build->>vp: run filtered typechecks or -r
Suggested reviewers: t3dotgg, juliusmarminge
Merge Risk: 
Minimal · up to 6103c
-
Affected packages are typechecked on pull requests, with full checks for global changes. No merge-blocking issue was established.
Pre-merge checks: 
4
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
- Mode: Continue automatically
- Reviewed files: 5
- Charged: $1.25
- View usage details
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.
Problem
CI's Build job typechecks all 39 workspace packages on every pull request, even when
changeshas already worked out that only one or two can be affected. Fork pull requests can't read the shared task cache (setup-ci-depsturns it on only for same-repo branches), so each of those typechecks runs cold. 95 of the last 100 PR CI runs came from forks. Five recent fork runs each loggedvp run: 0/39 cache hit (0%)for changes that affected 1 or 2 packages. When the desktop build is skipped, that typecheck is the job's critical path (17–19 s in those runs).Change
ci-changes.cjsgets atypecheck_packagesoutput: the affected packages, or empty when every package is affected. This is the same conventiontest_packagesuses. The Start typecheck step turns it into--filterarguments, as the Test job already does. With nothing listed, it typechecks every package (-r).The step now runs
check:changed's typecheck command,vp run --cache --parallel --concurrency-limit 4 … typecheck.tsc --noEmitwrites nothing another package reads, so dependency ordering only made dependents wait.Pushes to main still pass
--full. A failed diff still falls back to every job. A manifest, lockfile, root-file or shared-setup change still selects every package. Ifchangesproduces no output, the list is empty, which means a full typecheck.To make sure the selected set is complete, I compared every file vp recorded as a typecheck input against the packages
decide()selects for a change to that file. Two reads were missing, and both now go through the existing tables:apps/servertypechecks the rootvite.config.ts, which importsinfra/task-cache/src/remoteCache.ts(EXTRA_OWNERS).packages/client-runtime/src/state/orchestrationV2Projection.tsby relative path (TEST_ONLY_DEPS).Because
ci-changes.cjshas one affected set, a client-runtime change now also runs the server tests that import it, which main skips today. AremoteCache.tschange now also runs the server's build and tests.Scope and approval
No issue or discussion. This is CI scheduling maintenance with no product behavior change. The selection logic already exists: #19587 built the affected graph, and
check:changedalready applies it to local typechecks. This PR points the CI typecheck at the same set and the same command. Main keeps its full run as the backstop, and release workflows are unchanged (release.ymlstill runsvp run typecheck).For maintainers to confirm: a PR now typechecks only what
ci-changes.cjssays it can affect. Any read the graph misses is caught by main's full run, not by the PR. The same is already true of the Test job and ofcheck:changed.Verification
vp test run scripts/check-changed.test.ts: 9/9 pass. The new case fails on main and covers a leaf, dependents, both added graph rows, shared inputs, diff failure and--full.vp run check:changed 3fd2b855c5c6b9169cdfe3733b34011c1c5ed4b7: format, lint, knip, all 39 typechecks and both test files pass.The recorded-input audit covers 38 cached tasks plus the scripts compiler's files. Its four remaining reported gaps are directory reads and an absent resolution probe.
Shell simulations ran 1, 10 and 39 tasks for leaf, provider-grok and lockfile changes; all passed.
Cold timings on one 32-core machine, concurrency 4, cache disabled, three interleaved runs:
With a warm local cache, full and leaf runs took about 0.7 s and 0.2 s.
Not checked:
.github/changes select the full graph. Historical CI timings use the old command; new-command timings are local.Prior PRs
check:changed, whose typecheck command and--parallelmeasurement this reuses.Generated with Claude Opus 5.5 and GPT-6.1 Terra and GPT-6.1 Sol in T3 Code Nightly