- All playbooks
- Slow tests
- Retain idle database workers across command cases
Retain idle database workers across command cases
Keep idle database workers alive between test cases, so each case skips restarting workers that hold loaded code.
Company examples
How OpenClaw used this technique
Read what OpenClaw changed and follow the original sources.
Retain idle database workers across command cases
Keeping safe idle workers avoids repeated process startup between test cases.
One local before-and-after pair on a busy macOS arm64 host measured Codex command case execution falling from 174.152 seconds to 97.131 seconds. Source
- Use it when
- A test file closes the whole database runtime after each case, restarting workers that could keep their loaded code.
- Before applying it
- Each case still gets a fresh state directory and database, and a final hook must close the retained workers. Peak memory can rise slightly while worker counts stay bounded.
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