Skip to content

CL-6589: make CI itself fast — cache installs and lint, check only what changed - #299

Merged
TheGreatAxios merged 1 commit into
mainfrom
cl-ci-fast
Aug 22, 2026
Merged

CL-6589: make CI itself fast — cache installs and lint, check only what changed#299
TheGreatAxios merged 1 commit into
mainfrom
cl-ci-fast

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Follow-up to CL-6589. The speedups landed there only ever helped a local run: CI checks out fresh, never set WORKBENCH_CHECK_SINCE, and discarded both lint caches every time. So every PR still paid for all 110 packages and a cold ~108s eslint. That was my miss — I optimized the wrong half.

Changes

  • fetch-depth: 0 on every job so the affected-package filter can resolve a merge base.
  • WORKBENCH_CHECK_SINCE: ${{ github.event.pull_request.base.sha }} on typecheck and test. A PR now checks the packages it can actually break plus their transitive dependents.
  • Bun install cache keyed on bun.lock.
  • eslint + prettier caches restored from the most recent run.

Why main is still fully checked

The env var resolves to empty on a push: main event, and the runner treats unset as "run everything." main is never validated by a subset — only PRs are narrowed. That matters: the filter is a speed optimization on the way in, not a weakening of the branch everything merges into.

Expected effect

Measured locally, the filter takes a leaf-package change from 109 packages to 6, and warm lint from ~127s to ~4.3s. A PR touching one package should now be dominated by install + runner startup rather than by work it didn't cause.

Correctness guardrails are unchanged and were already tested in CL-6589: a change to a root manifest, bun.lock, the shared tsconfig, the eslint config, scripts/, or .github/ forces a full run, and dependents are walked to a fixed point so a cycle terminates. This PR touches .github/, so it will run the full gate on itself — which is the correct self-demonstration.

The affected-package filter and the lint caches from CL-6589 only ever
helped a local run. CI checks out fresh, never set WORKBENCH_CHECK_SINCE,
and threw both caches away every time, so every PR paid for all 110
packages and a cold 108-second eslint.

- fetch-depth: 0 so the filter can resolve a merge base.
- WORKBENCH_CHECK_SINCE is the PR's base commit for typecheck and test.
  A push to main leaves it unset and still checks everything, so main is
  never validated by a subset.
- Bun's install cache is keyed on the lockfile; the eslint and prettier
  caches restore from the most recent run.

A pull request now typechecks and tests the packages it can actually
break instead of the whole workspace.
@TheGreatAxios
TheGreatAxios merged commit 9371cc4 into main Aug 22, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant