Lint and type checks
The team moved to the native compiler tsgo, and weekly median tsc time fell 73%. It rewrote type-aware ESLint rules as syntax only AST analysis. API lint time fell 68%.
An issue from the CTO said CI costs were high and CI was slow. AI coding raised test volume, and the test suites nearly quadrupled in 2026. The team tracked PR wait time and runner time.
A PR starts gating jobs that run change detection and cache checks. Eight API test shards wait for those jobs. Each shard sets up a base image, installs packages, prepares the database, and runs Vitest files.
Cache markers are written after the shards, in a job that gates nothing. Third party runners with faster CPUs and storage run all jobs.
The team moved to the native compiler tsgo, and weekly median tsc time fell 73%. It rewrote type-aware ESLint rules as syntax only AST analysis. API lint time fell 68%.
Change detection capped fetch depth, and the slowest gate fell from 94 to 20 seconds. A custom checkout action retries with backoff and aborts stalled connections after about 30 seconds.
A shared base image preinstalls Node and the Postgres client. A filtered pnpm install cut install time from 44-73 to 16-18 seconds. With an unchanged schema, containers load a schema snapshot, and database setup fell from 12 to 2 seconds.
Vitest splits work by file, so the team split large files. An opt-in Vitest project with isolate false lets safe files share a module registry. Files with fake timers stay isolated.
| No. | Chose | Instead of | Why |
|---|---|---|---|
| D1 | Cut setup cost before adding shards | Four shards with 110 to 140 seconds of setup each | Doubling shards doubles setup, but with setup near 40 seconds eight shards use less setup than four did. |
| D2 | Remove the node_modules cache | A cache keyed on the lockfile | A hit took 28 seconds, while a filtered install took about 7.5. |
| Shard | One slice of a test suite that runs on its own runner. |
|---|