[worker:doc-drift] correct minvmd session-state storage note to persistent ext4 volume - #1166
Conversation
…olume The minvmd README Notes section still described session state as living on an ephemeral /run/minimal tmpfs with a persistent data disk as an unbuilt follow-up. That follow-up has shipped (spec 08-spec-vm-ext4-volume): minimald mounts a per-VM writable ext4 data volume at /dev/vdb -> /var/lib/minimal and relocates both state and cache onto it, with no tmpfs fallback. Update the note to match the current implementation. This README is embedded verbatim into docs/internal/minvmd.md via @include, so the fix propagates there. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe minvmd README now states that session state and cache use a per-VM writable ext4 volume at ChangesStorage documentation
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/minvmd/README.md`:
- Around line 238-242: Clarify the README description of the
STATE_VOLUME_MOUNTPOINT sequence by explicitly stating that minimald formats the
ext4 data volume on first boot and then mounts it at /var/lib/minimal. Keep the
existing persistence and /run/minimal behavior unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 226d00cf-81ba-4155-8743-ea85b1e36c32
📒 Files selected for processing (1)
crates/minvmd/README.md
| - Session state and cache persist on a per-VM writable **ext4 data volume** | ||
| (`/dev/vdb`) that minimald format-on-first-boot mounts at `/var/lib/minimal` | ||
| (`STATE_VOLUME_MOUNTPOINT`) and relocates both state and cache onto. The | ||
| `/run/minimal` tmpfs is no longer a fallback — guest session state is user | ||
| data with no host copy. Per spec `08-spec-vm-ext4-volume` (shipped). |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Clarify the formatting and mounting sequence.
Line 239 uses format-on-first-boot as if it were a verb. This makes it unclear whether minimald formats the volume, mounts it, or performs both actions. Use separate verbs.
Proposed wording
- (`/dev/vdb`) that minimald format-on-first-boot mounts at `/var/lib/minimal`
- (`STATE_VOLUME_MOUNTPOINT`) and relocates both state and cache onto.
+ (`/dev/vdb`) that minimald formats on first boot and mounts at
+ `/var/lib/minimal` (`STATE_VOLUME_MOUNTPOINT`), then relocates both state
+ and cache there.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - Session state and cache persist on a per-VM writable **ext4 data volume** | |
| (`/dev/vdb`) that minimald format-on-first-boot mounts at `/var/lib/minimal` | |
| (`STATE_VOLUME_MOUNTPOINT`) and relocates both state and cache onto. The | |
| `/run/minimal` tmpfs is no longer a fallback — guest session state is user | |
| data with no host copy. Per spec `08-spec-vm-ext4-volume` (shipped). | |
| - Session state and cache persist on a per-VM writable **ext4 data volume** | |
| (`/dev/vdb`) that minimald formats on first boot and mounts at | |
| `/var/lib/minimal` (`STATE_VOLUME_MOUNTPOINT`), then relocates both state | |
| and cache there. The `/run/minimal` tmpfs is no longer a fallback — guest | |
| session state is user data with no host copy. Per spec `08-spec-vm-ext4-volume` | |
| (shipped). |
🧰 Tools
🪛 LanguageTool
[grammar] ~239-~239: Ensure spelling is correct
Context: ...ext4 data volume* (/dev/vdb) that minimald format-on-first-boot mounts at `/var/li...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@crates/minvmd/README.md` around lines 238 - 242, Clarify the README
description of the STATE_VOLUME_MOUNTPOINT sequence by explicitly stating that
minimald formats the ext4 data volume on first boot and then mounts it at
/var/lib/minimal. Keep the existing persistence and /run/minimal behavior
unchanged.
Source: Linters/SAST tools
There was a problem hiding this comment.
[worker-iterate:addressed]
Addressed: split format-on-first-boot into explicit verbs — "minimald formats on first boot and mounts at /var/lib/minimal, then relocates both state and cache there".
Generated by Worker iterate agent (side-repo-ops operator)
There was a problem hiding this comment.
Skipped: comment is from another GitHub bot.
Resolves the doc-drift finding in
#1160: theminvmdcrate README "Notes" section — embedded verbatim intodocs/internal/minvmd.mdvia@include— still described guest session state as living on an ephemeral/run/minimaltmpfs, with a persistent data disk called out as an unbuilt follow-up. That follow-up has shipped.What changed
crates/minvmd/README.md— rewrote the drifted "Notes" bullet to describe the current storage model: session state and cache persist on a per-VM writable ext4 data volume (/dev/vdb) thatminimaldformat-on-first-boot mounts at/var/lib/minimal(STATE_VOLUME_MOUNTPOINT), relocating both state and cache onto it, with the/run/minimaltmpfs no longer a fallback. Cites spec08-spec-vm-ext4-volume(shipped). Removed the "persistent data disk ... is a follow-up" language.Ground truth (code)
crates/minimald/src/guest.rs:396—pub const STATE_VOLUME_MOUNTPOINT: &str = "/var/lib/minimal";crates/minimald/src/main.rs:418— data device/dev/vdb; lines 530-541 mount it and relocate the state + cache dirs onto it.08-spec-vm-ext4-volumeisstatus: shipped.Scope is bounded to the single drifted bullet; no other README claims were touched, and no Rust source was modified.
Verification
This is a Markdown-only change to
crates/minvmd/README.md. No.rsfile was touched, and the README is not embedded into Rust viainclude_str!, so compilation is unaffected — there is nothing for acargo build --workspace --all-targetsself-check to exercise and nocargo fmtis needed for a doc-only edit. The non-bypassable host backstop still re-runs the full gate before this PR opens:cargo fmt --all --check,cargo build --workspace --all-targets --locked,cargo clippy --workspace --all-targets --locked -- -D warnings, andcargo test --workspace --all-targets --locked.Closes #1160
Note
Correct minvmd README to document persistent ext4 volume for session-state storage
Updates the Notes section of README.md to reflect that session state and cache persist on a per-VM writable ext4 data volume (
/dev/vdb) mounted at/var/lib/minimal(STATE_VOLUME_MOUNTPOINT), formatted byminimaldon first boot. Removes the outdated claim that session state resides on a tmpfs at/run/minimal, and notes that/run/minimalis no longer a fallback and guest session state has no host copy.Macroscope summarized bf02b29.
Summary by CodeRabbit