Every CI system tests each pull request alone against the base branch. That is a problem when several agents are working in parallel.
Here is what happens:
- Agent A opens a PR that changes
login()to take an options object. - Agent B opens a PR that calls
login(email, password)— the old form. - CI tests A against main. Green.
- CI tests B against main. Green.
- A merges. Main still works.
- B merges. Main is broken.
Git merged cleanly because the two PRs touched different files. CI never tested them together. The type error only exists in the combination.
The gap
CI is designed to test one change at a time. It answers: "does this PR break main as it is right now?" It does not answer: "does this PR break main after the other three open PRs merge too?"
Merge queues (GitHub's, Mergify, Graphite) help: they test PRs in order, so B would be tested on top of A's merge. But they only work at merge time. If B sits in review for a day while A merges, B's tests still pass in the queue — the type error only appears when both are compiled together.
The deeper issue: merge queues test order, not combination. They run B after A, but they don't ask "does B's new code work with A's changed signature?" They test B's build, and if B's build doesn't import the changed module, the queue passes it.
What actually catches it
You need something that compares PRs against each other, not just against main:
1. In-memory merge of every open PR pair. Take A's diff and B's diff and merge them into the base. If git reports a conflict, that's a text collision (R4 in Lanekeeper's rules). Most tools stop here.
2. Code-level comparison. Parse both diffs as code, not text. A changes a function's signature; B adds a call in the old form. That's a signature break (R2). It won't show up in git's merge because it's a semantic conflict, not a textual one.
3. Combined build and test. For the riskiest pairs, merge both into a temporary branch and run the build. If A passes alone and B passes alone but A+B fails, that's R10 — a combined failure that no single-PR CI run would ever catch.
How Lanekeeper's GitHub Action does this
The Lanekeeper Action runs on every PR event and:
- Compares each PR against all other open PRs into the same branch.
- Posts one comment that it keeps editing in place, listing the clashes and suggesting a merge order.
- Adds a check with annotations at the clashing lines.
- Fails the job on high-severity clashes.
- Given build and test commands, it builds the risky pairs together and reports R10 combined failures.
It also sizes each PR's blast radius: which APIs it changes that other code uses, plus migrations, routes, env vars and dependency changes. Each PR gets a tier — contained, coordinated, or needs-a-human — so reviewers know which ones need attention before merge. See lanekeeper.dev/docs/triage.
What you can do today
- Install Lanekeeper (
npm i -g lanekeeper && lk init) to catch conflicts while agents work, before PRs are even opened. - Add the Action to your repo to catch conflicts between PRs in CI.
- If you're not ready for a tool: when an agent changes an exported function's signature, have it search the codebase for existing callers first. It's manual, but it covers the most common case.
Lanekeeper is free and open source. It runs locally and never sends your code anywhere. The 10 detection rules are measured on 187 scenarios, 33 from real open-source projects.
Originally published at lanekeeper.dev.


