RC RANDOM CHAOS

Linear rebuilt its CI pipeline to survive the pace of AI-assisted coding

· via Hacker News

Original source

AI coding has made CI a bottleneck, so we reworked ours to keep up

Hacker News →

As AI agents let developers ship code far faster, the validation step hasn’t scaled with them, turning CI into a bottleneck that inflates infrastructure costs and slows feedback for humans and agents alike. Facing exactly this problem, Linear’s team overhauled its pipeline and managed to trim pull-request wait times from over six minutes to just above five while roughly halving runner time per test — even as its test suites nearly quadrupled over the year.

The biggest wins came from unglamorous infrastructure changes rather than clever CI logic. Moving workloads off GitHub Actions onto faster third-party runners cut job times by about a third, and swapping in the native TypeScript compiler (tsgo) reduced the median typecheck by 73%. The team also decoupled linting from the type checker by rewriting custom rules to work purely over the syntax tree, slashing lint times and easing a later migration to Oxlint. Further gains came from optimizing the small gating jobs on the critical path — capping git fetch depth, replacing flaky checkouts with a retrying composite action, and moving cache-marker writes off the merge path.

The recurring lesson is that per-job setup overhead dominates when work is sharded: booting runners, installing packages, and provisioning dependencies can turn seconds of useful work into minutes of billed time. Linear addressed this by baking dependencies into a base image, installing only the specific monorepo package each job needs, loading schema snapshots instead of replaying migrations, and dropping node_modules caching where a filtered install was simply faster. Notably, the team found that caching isn’t always a win — a cache hit that takes 28 seconds to restore loses to a 7.5-second rebuild — a useful counterpoint to CI cargo-culting.

Read the full article

Continue reading at Hacker News →

This is an AI-generated summary. Read the original for the full story.