AI Coding Made CI a Bottleneck

Linear reworked CI to cut PR wait time from 6+ minutes to 5 minutes.

Sep 21, 2026

15 cards · 2m · tap to begin

From · · 2m

AI Coding Made CI a Bottleneck

Linear reworked CI to cut PR wait time from 6+ minutes to 5 minutes.

In brief

Linear reworked CI to cut PR wait time from 6+ minutes to 5 minutes. Linear reduced CI wait time from over 6 minutes to just over 5 minutes by optimizing test execution and infrastructure. Originally reported by Linear.

AI coding made CI a bottleneck

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

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

PR wait time dropped from 6+ minutes

PR wait time dropped from more than 6 minutes to just over 5 minutes.

“PR wait time dropped from more than 6 minutes to just over 5 minutes”

Runner time cut in half

Runner time cut in half

Runner time per test cut roughly in half.

“runner time per test cut roughly in half”

Test suite performance improved

Test suite performance indexed to first week of January with white line tracking machine time per test.

“Test suite performance indexed to first week of January with white line tracking machine time per test”

Four key CI improvements

Upgraded infrastructure and tooling, optimized jobs that gate other work, reduced repeated setup, made test execution more efficient.

“Upgraded infrastructure and tooling, optimized jobs that gate other work, reduced repeated setup, made test execution more efficient”

Upgraded infrastructure and tooling

Before and after comparison of CI/CD pipeline batching optimization, showing test workflow steps with execution times and dependencies, with all tasks marked as

Moving workloads off GitHub Actions to third-party runners with faster CPUs and storage cut jobs by 34% on average.

“Moving workloads off GitHub Actions to third-party runners with faster CPUs and storage cut jobs by 34% on average”

Switched to tsgo

Switching to tsgo, the native TypeScript compiler, cut weekly median tsc check by 73%.

“Switching to tsgo, the native TypeScript compiler, cut weekly median tsc check by 73%”

Lint without type checker

Rewrote lint rules to use static analysis over abstract syntax tree, reducing API lint time by 68%.

“Rewrote lint rules to use static analysis over abstract syntax tree, reducing API lint time by 68%”

Optimized jobs that gate other work

Small jobs that gate other work were critical path items, causing disproportionate delays.

“Small jobs that gate other work were critical path items, causing disproportionate delays”

Fetch only what each job needs

Capped fetch depth to reduce change-detection job time from 94 seconds to 20 seconds.

“Capped fetch depth to reduce change-detection job time from 94 seconds to 20 seconds”

Make checkout more resilient

Replaced actions/checkout with composite action to retry with backoff and use checkout cache.

“Replaced actions/checkout with composite action to retry with backoff and use checkout cache”

Minimize critical path

Moved cache marker write to job after test shards finish, shaving 42 seconds from merge path.

“Moved cache marker write to job after test shards finish, shaving 42 seconds from merge path”

Reduce repeated setup

Preinstalled shared dependencies in CI image to cut API test shard setup time by 44%.

“Preinstalled shared dependencies in CI image to cut API test shard setup time by 44%”

Make test execution more efficient

Split large test files into smaller focused files to improve shard performance by 19%.

“Split large test files into smaller focused files to improve shard performance by 19%”

Share module state with isolation

Module state caching optimization: Before (individual state per file) versus After (single shared state), reducing redundant rebuilds across worker processes

Introduced vitest project with isolate: false to share module state, cutting shard time from 300-379 seconds to 195 seconds.

“Introduced vitest project with isolate: false to share module state, cutting shard time from 300-379 seconds to 195 seconds”

The headline

Linear reduced CI wait time from over 6 minutes to just over 5 minutes by optimizing test execution and infrastructure.

Read the original on Linear

React

Sign in to react and comment.

Comments (0)

Life is short. Keep it sweet. Respect others' opinions and be kind!

    Recommended next

    More decks on linear and related topics.