docs(arch-vm-ext4-volume): pkg cache on the in-VM ext4 volume (volume-aware) - #674
Conversation
Design the architecture for #583: two-disk RAW topology (/dev/vda RO, /dev/vdb writable ext4), host sparse-raw provisioning, guest first-boot mkfs, shutdown quiesce, crash safety, session persistence, and provider index. Records FFI surface (krun_add_disk3, SyncMode), crate-level interface changes across minvmd/minimald/sessions, and a fully-settled assumption ledger with no needs-spike residue. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughThis PR adds an architecture spec for a per-VM writable ext4 volume on ChangesArchitecture Specification Document
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
This comment has been minimized.
This comment has been minimized.
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 `@docs/specs/08-spec-vm-ext4-volume/architecture.md`:
- Around line 110-116: In the mount_state_volume function, modify the logic that
checks for the ext4 magic word at byte offset 1080. Currently the function calls
mkfs.ext4 when the signature is "absent or corrupt", but this should be narrowed
to only call mkfs.ext4 when the signature is truly absent. If the ext4 signature
is already present (indicating a valid ext4 filesystem), the function should
attempt to mount or repair the volume instead of reformatting it. This prevents
wiping session data on persistent session disks after an unclean shutdown.
🪄 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: 7ca6334b-d1dc-4059-abb2-7e54ca419c53
📒 Files selected for processing (1)
docs/specs/08-spec-vm-ext4-volume/architecture.md
…ture mount_state_volume mkfs'd on "absent or corrupt", which would wipe a persistent session disk after an unclean shutdown. Narrow mkfs to the truly-blank case (no ext4 magic); when a signature is present, mount and let the journal replay, and on mount failure run e2fsck + retry, failing closed rather than reformatting. Note e2fsck in the e2fsprogs closure. Refs #583 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
| Gate | Result |
|---|---|
| 1 — Decision and rationale present | ✅ Pass |
| 2 — Alternatives considered | ✅ Pass |
| 3 — Consistent with existing decisions | ✅ Pass |
| 4 — No implementation detail masquerading as a decision |
No Blockers. No needs-human applied. No lifecycle label move (architecture boundary; lifecycle moves are at the implementation boundary only).
Generated by sdd-validate for issue #674 · ◷
Generated by sdd-validate for issue #674 · ◷
…ning Downgrade `lifecycle-vsock-persistent` from settled to needs-spike: a held-open guest->host lifecycle socket collides with the host->guest SSH bridge under libkrun's concurrent-vsock wedge (#588) — the same failure that red-lit autospawn-e2e on #672. Record the spike under knowledge gaps. Fold #672's empirical mkfs hardening into the guest-boot section: the undersize guard, the trailing margin for libkrun's backing-file trailer shave, and eager inode/journal init that avoids a lazy-init storm. Refs: #583, #588, #672
Architecture for #583: per-VM writable ext4
/dev/vdbvolume.Chosen approach
Two-disk RAW topology:
/dev/vda(base rootfs, read-only, shared, unchanged) and/dev/vdb(per-VM writable ext4, carriesminimal_state_dir = /var/lib/minimal). Host creates a sparse raw file (ensure_sparse_raw); guest formats on first boot viamkfs.ext4keyed on superblock detection (idempotent, platform-portable). Clean shutdown driven byminvmd stopinvoking the Shutdown RPC before SIGTERM; failed volume mount is loud (MOUNT_FAILED marker, no silent fallback).ADR promoted
None — all decisions are feature-scoped (
minvmd/minimald/sessionscrates only).Assumption ledger
All six load-bearing assumptions are
settled; noneeds-spikeresidue. Seedocs/specs/08-spec-vm-ext4-volume/architecture.mdfor the full ledger.Next step
Merging this PR advances tracking issue #583 to the plan phase, where one Unit sub-issue per demoable unit is previewed. Merging closes the architecture sub-issue (
Closes #<architecture-sub-issue>is added to this body bysdd-pr-sanitize).Closes #673
Summary by CodeRabbit