- All playbooks
- Release query results before they become a timeout
Release query results before they become a timeout
A query can finish while its unread response still holds the connection.
Company examples
How Mastra used this technique
Read what Mastra changed and follow the original sources.
Release query results before they become a timeout
StarSling’s agent added result consumption to two ClickHouse initialization queries in Mastra, so each query releases its connection as soon as its result is read.
The PR reports five same-commit trials per arm: job median 530s to 298s, about 44% less elapsed time. Source
- Use it when
- An integration step spends most of its time waiting after a query has already completed.
- Before applying it
- Keep query behavior and result validation. Profile connection lifetimes first.
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