- All playbooks
- Warm reusable caches while building the image
Warm reusable caches while building the image
Prepare image-local caches before normal CI runs so repeated downloads or cold initialization leave the critical path.
How Ramp used this technique
Read what Ramp changed and follow the original sources.
Run the app and test suite once in the image build to warm its caches
Translated to GitHub Actions
- What Ramp built
- Ramp builds the repository images its background agent's sandboxes start from, and runs the app and test suite once in that build so the cached files they write are already there.
- Your GitHub Actions version
- A prebuilt runner or container image, or a cached setup step, that installs dependencies and runs the app and test suite once so their caches are warm when the job starts.
Ramp tells teams building a background coding agent to move as much as they can into the build step for the repository images its sandboxes start from, and to do everything a complete development environment needs beforehand. That includes running the app and the test suite once, because those runs may write cached files a second run will use. The image build can take as long as it needs, since every session starts from the last built image. The OPT72 recipe moves setup off the long pole; here the image build also warms the caches the app and test suite write.
2026: Ramp's agent sessions start from the last built repository image, so the image build's time stays out of every session. Source
- Use it when
- Jobs spend much of each run installing dependencies and building before any test runs, and they can start from a prebuilt image or a restored cache.
- Before applying it
- The warm caches are as current as the last image build, so rebuild the image on each push to the default branch and keep the job working from a cold start.
- GitHub Actions adaptation
- Compare the source system with your own workflow before applying this translation.
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