- All playbooks
- Prove a new test is stable before it joins the blocking suite
Prove a new test is stable before it joins the blocking suite
Run each new end-to-end test many times in a dedicated pipeline, and admit it to the blocking checks only if it stays under a failure threshold.
How Shopify used this technique
Read what Shopify changed and follow the original sources.
Prove a new test is stable before it joins the blocking suite
Shopify's mobile app end-to-end suite had become so flaky that it was pulled from pull request checks entirely. Shopify rebuilt the framework around a strict API in which every step carries an assertion, then promoted it back into blocking CI at 98% test stability, up from 50% using the old API, measured as individual test successes divided by total runs. Shopify also built a pre-promotion flakiness gate: a dedicated pipeline runs a new test multiple times and rejects it if it fails above a set threshold. The OPT48 recipe reads a job's failure rate; here the rate is measured per test before the test blocks anyone.
2026: Test stability went from 50% on the old API to 98% on the rebuilt framework, measured as individual test successes divided by total runs. Source
- Use it when
- A suite blocks merges, new tests are added continuously, and a flaky one would stop good pull requests.
- Before applying it
- The promotion runs cost runner minutes before a test is admitted, so choose the number of runs and the threshold from the suite's own history.
Company Playbooks
- Read Anthropic’s playbookRun only affected tests
- Read DoorDash’s playbookRun build and test in parallel, sharded across CI agents
- Read Linear’s playbookBenchmark the same job on faster hardware
- Read Mastra’s playbookStarSling runners for the slowest test workflow
- Read OpenAI’s playbookRank CI fixes by the minutes they save
- Read Ramp’s playbookMove a CPU-bound test suite to a faster CPU
- Read Shopify’s playbookLet an agent iterate against one CI metric
- Read Spotify’s playbookBuild arm64 on native arm64 runners
- Read Stripe’s playbookRun only the tests a change can reach
- Read Uber’s playbookBuild the merge-queue speculations most likely to be needed