docs: RFC for Firecracker snapshots (instant bazel-diff starts)#376
Open
tinder-maxwellelliott wants to merge 1 commit into
Open
docs: RFC for Firecracker snapshots (instant bazel-diff starts)#376tinder-maxwellelliott wants to merge 1 commit into
tinder-maxwellelliott wants to merge 1 commit into
Conversation
Design doc for capturing a warm Bazel server in a Firecracker microVM snapshot so PR-time bazel-diff runs restore in ~sub-second instead of paying full server warmup + external-repo fetch on every cold start. Scope: CLI hooks (warmup, fingerprint) + a Go orchestration tool, full warm-server snapshots, self-hosted CI. Centers the correctness story (fingerprint cache key + fail-safe fall-back-to-cold) since an incorrect affected set is worse than none. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a design RFC (
docs/firecracker-snapshots.md) for using Firecracker microVM snapshots to give instant starts of bazel-diff.The win: bazel-diff's own JVM CLI starts in <1s — the cost is the
bazel query deps(//...)it shells out to, which pays full Bazel server warmup + external-repo/bzlmod resolution + Skyframe graph load on every cold start (minutes on a large monorepo). A snapshot captures that warm state once and restores it in ~sub-second, so the PR-time path only re-analyzes changed packages.Decided scope
warmup,fingerprint) + a Go orchestration tool (tools/firecracker/)What the RFC covers
warmup(record entrypoint, clean exit = "safe to snapshot") andfingerprint(cache key); consume reuses existinggenerate-hashes+get-impacted-targetsMODULE.bazel.lock/.bazelrc/ bazel-diff version / flag set, a fail-safe fall-back-to-cold on any mismatch, the fact thatSourceFileHasheralready makes content correctness independent of server incrementality, and a CI canaryThis PR is docs-only
No code changes. Intended as the review artifact before implementation. Phase 1 (the
fingerprint+warmupsubcommands) would follow in a separate PR.🤖 Generated with Claude Code