- All playbooks
- Slow tests
- Shorten the production waits a slow test reaches through the code it exercises
Shorten the production waits a slow test reaches through the code it exercises
Tests stop spending real seconds on poll intervals, settling intervals and grace periods while the real code paths still run.
Company examples
How OpenClaw used this technique
Read what OpenClaw changed and follow the original sources.
Shorten the production waits a slow test reaches through the code it exercises
Tests stop spending real seconds on poll intervals, settling intervals and grace periods while the real code paths still run.
The full detached-seed matrix went from 558.58 s to 297.99 s under -race, one local macOS run each side. Source
- Use it when
- Slow tests reach production delays such as poll intervals and grace periods through the code under test and spend most of their time waiting on them.
- Before applying it
- Production values stay the same; a fixture that shortens package variables runs serially and restores them with t.Cleanup, and code on testing/synctest's virtual clock uses the standard time primitives it can advance.
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 playbookType-check with a native checker
- 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
- Read OpenClaw’s playbookSelect only the tests and proofs a change can affect