Repository navigation
feat(sandbox): make reset the image-upgrade path - #211
Merged
Merged
Conversation
Each sandbox records the image it was provisioned from (image.json beside its data). vz reset now re-resolves the manifest: marker match keeps the fast pristine-disk re-clone, mismatch re-provisions from the current image — previously the only upgrade was delete + re-create, since reset deliberately never re-resolved. WSL create rebuilds a registered distro whose marker is stale (an import cannot overlay an existing distribution), and bwrap create skips the unpack when the rootfs is intact and current. Verified: vz e2e still green (health/path/broker OK); new tests cover the marker round-trip, vz reset-as-upgrade with a download counter, and the WSL stale-marker rebuild via an import counter in the fake wsl.exe. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
quickbeard
force-pushed
the
feat/sandbox-image-upgrade
branch
from
August 13, 2026 04:08
6091e8d to
ad7a827
Compare
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.
Phase 4b, item 2 — closes the gap found in the macOS in-app e2e: vz
resetdeliberately re-cloned the pristine disk without ever re-resolving the manifest, so publishing a new image reached nobody without Delete + re-Add.Design
Each sandbox records the asset it was provisioned from (
image.jsonin its data dir — url/sha256/bytes, unreadable ⇒ treated as unknown ⇒ re-provision, the safe direction). Then per backend:resetre-resolves the manifest. Marker match → the fast path is unchanged (re-clone the pristine disk, no network beyond the manifest fetch). Mismatch → full re-provision (stage → unpack → verify → fresh clone) and marker update.createskips the unpack when current.create/prepareon a registered distro with a stale marker terminates, unregisters, and re-imports from the current rootfs — an import cannot overlay an existing distribution. (resetwas already discard+prepare and picked up new images.)resetalready re-provisioned by construction (the rootfs is the guest state);createnow skips the unpack when the rootfs is intact and the marker current.Net effect: Reset in the UI is now also "Update" — pristine sandbox on whatever image the manifest currently points at — with no new UI, IPC, or state plumbing. A visible "update available" indicator can come later on top of the same markers.
Tests
image.test.tshealth / path api / brokerall OK)CHANGELOG entry added. Fork-only files, no DIVERGENCES change.
🤖 Generated with Claude Code