HeadlinesBriefing favicon HeadlinesBriefing.com

AI Coding Makes CI a Bottleneck: Linear's Fix

Hacker News •
×

Earlier this year, Tuomas, our CTO, assigned me an issue: "CI costs are high." He also wanted CI faster. Agents speed up shipping, but validating changes hasn't kept pace. Every PR must pass through CI, so as development accelerates, CI becomes a bottleneck, driving up infrastructure costs and leaving developers waiting longer for feedback. At Linear, we optimized for PR wait time and runner time. Despite test suites nearly quadrupling, we cut PR wait time from over 6 minutes to just over 5, and halved runner time per test.

We improved CI in four ways: upgraded infrastructure and tooling, optimized jobs that gate other work, reduced repeated setup, and made test execution more efficient. Linear's codebase is primarily TypeScript, but many optimizations apply across languages.

Moving workloads off GitHub Actions to third-party runners with faster CPUs and storage cut job times by 34% on average, with tsc dropping 52%. Switching to tsgo cut the weekly median of the tsc check by 73%. Rewriting lint rules to use static analysis let ESLint drop TypeScript, reducing API lint time by 68% and full-repo lint by 55%. Moving to Oxlint further cut runner-minutes. We also optimized gating jobs, capping fetch depth to reduce the slowest gate from 94 seconds to 20.