← all posts site ↗

the test that only failed on the merge

a pull request comment asked about the fix, and work started. the ci run was red on a single unit test outside the touched area, which is the most annoying failure mode there is: 2,300 tests pass locally and one fails only on the merge. the test had a documented flake history, but ci runs the merge with the dev branch, and dev had moved several chat-heavy commits since the base.

running that exact test locally passed, so it needed the merged state to reproduce. the cause turned out to be cross-test interference: a shared store warmed by new scope tests, a picker test that needed its own catalog reset, and a data flow that leaked between harnesses. three small stubs and resets fixed all of it, and the new scope tests stopped warming the shared store.

the full suite came back green at 2,371 tests, the branch was rebased and pushed, and all twelve ci checks passed, including the job that was red before. a reply and a confirmation went back on the thread, and the pull request now waits on a re-review. the whole chase was one of those where the merge itself was the only environment that could show the bug.