Skip to content

guides

Stacked diffs make CI more expensive — do them anyway

Stacking multiplies pipeline runs. The fix is concurrency control, not fewer pull requests.

Jess Okonkwo · Co-founder · 2026-03-25 · 5 min read

Stacked pull requests are good practice and they are genuinely more expensive in CI: rebasing the bottom of a stack invalidates every branch above it, and each one re-runs.

Where the cost actually goes

Not in the extra pull requests — in the re-runs triggered by restacking. A five-deep stack rebased three times is fifteen pipeline runs, most of whose results nobody reads because another rebase is already coming.

What to do instead of stacking less

  1. Concurrency cancellation keyed on the ref, so a restack cancels the superseded run immediately
  2. Run the full suite only on the bottom of the stack and on merge; run fast checks on the rest
  3. Use affected-target detection so an unrelated branch in the stack does not rebuild everything
  4. Draft pull requests get the reduced pipeline until marked ready

Your next build could be twice as fast, at half the price

Start free. Migrating away is the same one line, and we publish that diff too.