Repository navigation
Done
Labels
priority:must-haveMust be done. Applied by the inbox-route classifier or a human.release:0.8.0Must be done for the 0.8.0 release. Pair with priority:must-have.
Description
Situation
The box store records a state format in sessions/index.json (format_version, which INDEX_FORMAT_VERSION = 1 writes, crates/boxes/src/store.rs:1107). A minimald that meets a newer format refuses it (read_index, store.rs:1155). Three things keep that refusal from doing its job, and gominimal/inbox#1330 (0.7 to 0.8 upgrade, must-have for 0.8.0) needs all three fixed: "A 0.8 binary that meets provider state it cannot use stops with a message that names the version mismatch and the next step, and changes nothing."
- It changes the state before it refuses.
DiskLoader::new(store.rs:1433) creates the sessions directory and runstighten_store_modes(BOX-232) before it readsindex.json(store.rs:1435-1453). On a refused store, the modes are already changed. - The message names no next step. Today it reads: "
<path>has format version N. This minimald reads format version 1 or older. A newer minimald wrote this file." - In the VM, nobody sees it.
- The guest's store error ends at
crates/minimald/src/main.rs:461("microVM init failed; shutting the VM down"), and the guest shuts down. - The host gets no beacon and prints only "the detached supervisor exited during startup" (
crates/minvmd/src/cmd/run.rs:371, thencrates/minimal/src/autospawn.rs). That is the silent failure of diag: Downgrade from 0.8.0-dev to 0.7.3-rc1: the old guest minimald cannot parse the newer box store index #3060. - A data-volume mount failure already reaches the host with its reason, as the
MOUNT_FAILEDbeacon (guest::emit_mount_failed_marker,crates/minimald/src/guest.rs:258; host sideBootBeaconincrates/minvmd/src/cmd/mod.rs:448andrun.rs:3675).
- The guest's store error ends at
Work
- Read before any write.
DiskLoader::newreads and checks the format version before it creates a directory, tightens a mode, heals, reconciles or flushes anything. A store whoseindex.jsonhas a newer format is refused with the tree byte-identical, modes and mtimes included. - The refusal names the mismatch and the next step. Exact text, pinned in the test:
The box state in <state dir> was written by a newer release of Minimal (state format <N>). This release reads state format 1 or older, so it stopped and changed nothing. Install the release that wrote this state, or restore the copy of this directory that you made before you upgraded.
<state dir>is the directory that holdssessions/. On the VM host it is the guest path, followed by the host's data volume path, which minvmd adds. - In the VM, the guest sends the reason to the host.
- A refused store emits a new beacon,
STATE_REFUSED\n<one-line reason>\n, and parks as theMOUNT_FAILEDpath does. It never sends READY. It uses the same 512-byte cap and one-line flattening asmount_failed_beacon. - minvmd reads it as a new
BootBeacon::StateRefused { reason }. - minvmd fails the boot with the guest's reason, plus one sentence naming the data volume path. It does not remove or touch the volume.
- A refused store emits a new beacon,
minprints it. On autospawn, and on any command that starts the host,minprints the refusal text as the command's error and exits non-zero. It replaces the "detached supervisor exited during startup" text for this cause, and adds no retry advice. It does the same for a native Linuxminimaldthat refuses at startup.- Out of scope: a format bump, the installer archive and downgrade check (inbox#1330 open questions 1 and 2), and 0.7.x.
Tests
boxes:store_refuses_a_newer_format_and_changes_nothingbuilds a store withformat_version = 2, some wide modes and a record.DiskLoader::newmust return the refusal, and the tree must be byte-identical with the same modes.boxes: the refusal's text, pinned.minimald: theSTATE_REFUSEDbeacon is two lines, flattened and capped, asmount_failed_beacon_is_two_lines_flattened_and_capped.minvmd:read_ready_beaconparsesSTATE_REFUSEDwith and without a reason line.minimal: the autospawn boot-failure error for a state refusal carries the refusal text and no retry advice.
Metadata
Metadata
Assignees
Labels
priority:must-haveMust be done. Applied by the inbox-route classifier or a human.release:0.8.0Must be done for the 0.8.0 release. Pair with priority:must-have.
Activity
agent-137 commentedon Nov 27, 2026
Fixed by #3850 (D3842, task #3843), merged as 82e17fb.