CL-6589: run only affected packages, cache prettier and eslint - #295
Merged
Conversation
The gate ran all 109 workspace packages regardless of what moved, and tests run one at a time, so a one-line edit paid for the whole repo. WORKBENCH_CHECK_SINCE=<ref> narrows the job list to the packages the change touches plus everything that depends on them, transitively. A change to a root manifest, the shared tsconfig, or scripts/ has a blast radius no dependency edge records, so those still run everything. Opt-in: unset, every package runs, so CI keeps its current meaning. Also pins hono in overrides. Two resolved copies produce structurally identical but nominally distinct Hono types, and the mismatch surfaces as an unreadable TS2345 in whichever package bridges them.
Both re-lint every file on every run. Measured on this repo: prettier 19.5s, eslint 108s. Neither result changes for a file that has not changed, so both keep a cache keyed on content. Warm: prettier 7.1s, eslint 2.4s -- a full lint goes from ~127s to ~4.3s. Cold cost is unchanged, so CI (fresh checkout, no cache) is unaffected; this buys back the local edit-check loop.
TheGreatAxios
force-pushed
the
cl-check-speedup
branch
from
August 22, 2026 03:36
4a94b09 to
459e4db
Compare
Contributor
Author
|
Rebased onto latest main and added lint caching. Measured on this repo
eslint was by far the biggest single cost in the gate and re-linted every file on every run. Neither tool's result changes for a file that has not changed, so both now cache on content. Cold cost is unchanged, so CI (fresh checkout, no cache) is unaffected — this buys back the local edit-check loop. Combined with the affected-package filter, a local check on a leaf package now touches 6 of 109 packages and skips ~123s of redundant linting. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bun run checkruns all 109 workspace packages regardless of what moved, andtestis inSEQUENTIAL_SCRIPTS— so 106 test jobs run one at a time on an 8-core machine. A one-line edit pays for the whole repo. That is the multi-minute local gate.What this adds
WORKBENCH_CHECK_SINCE=<ref>narrows the job list to the packages a change touches plus everything that transitively depends on them. Measured against the real 109-package graph:slugfolded-runsinference-catalogIt helps
testmost, precisely because that phase is sequential.Opt-in. Unset, every package runs, so CI and a bare
bun run checkkeep their current meaning. Local use:Correctness over speed. A change to a root manifest,
bun.lock, the shared tsconfig, the eslint config,scripts/, or.github/has a blast radius no dependency edge records, so those force a full run. Dependents are walked to a fixed point, so a dependency cycle terminates instead of recursing. A filtered gate that misses a break is worse than a slow one.Also: pins
honoTwo resolved copies (4.13.2 via a transitive GitHub dep, 4.13.3 everywhere else) produce structurally identical but nominally distinct
Honotypes. The mismatch surfaces as an unreadable multi-screen TS2345 in whichever package bridges them.What this deliberately does not change
teststays sequential. The comment insequential-scripts.tssays several suites bind sockets and share Postgres, and making them concurrent is a real piece of work — not something to slip into a speedup PR. Narrowing the job list gets most of the win without that risk.Note on the two typecheck errors seen locally
They were stale install state, not code: two
@corbits/memorytrees and twohonotrees left behind by earlier installs, plus atsconfig.tsbuildinfocaching a path that no longer existed. Verified clean in a fresh-install worktree. Thehonopin prevents the duplicate recurring; the stale-tree pruning is a localrm -rf node_modules && bun install.