ReviewOS

also looking at this

stacks/drone

test: qualify zero-byte host image write failures

#61
Merged chris wants to merge codex/runtime-host-zero-write into main
5 files +50 -27
docs/adr/0031-full-host-filesystem-fixture.mdmodified+13-4
Changes to docs/adr/0031-full-host-filesystem-fixture.md
@@ -13,17 +13,25 @@ Keep signed repositories and the owned build outside the bounded filesystem.
1313Place the actual protocol store, candidates and slots inside it. Confirm a real
1414release-7 host session, prepare release 9, then publish new signed root/role
1515metadata. At the public slot-selection progress boundary, fill an owned sibling
16file through real writes until ENOSPC and release only 1 MiB of its allocation.
17The larger signed image must make actual partial progress before ENOSPC. Leave
16file through real writes until ENOSPC. Run two independent campaigns: release
17only 1 MiB of its allocation for a partial image write, or leave zero free bytes
18for failure before any image bytes are written. Pin the selected budget in the
19private fixture marker and worker input, and read it back from the filesystem
20before the copy. Require exactly the selected number of retained image bytes,
21including an existing empty image file and its SHA-256 in the zero-byte case. Leave
1822the filesystem full until the trial process has exited, including its attempts
1923to record failure. Never replace filesystem or SQLite methods with faults.
24The existing public inspector reports an empty image as `unavailable` because
25valid protected images must be nonempty. A nonempty partial image is `mismatch`.
26Neither status grants health or installation authority; the campaign separately
27reads the actual retained file to distinguish empty, partial and missing bytes.
2028
2129Inspect retained bytes and public status after removing only the owned filler.
2230Require the previous known-good image and accepted metadata/security floors to
2331survive without a new health confirmation. A pending attempt and selected slot
2432must undergo explicit fresh-process metadata recovery and exact-slot abandonment
2533before an unrestricted fresh trial can confirm a different slot through actual
26new boot/session evidence. Preserve failed partial bytes and the older image.
34new boot/session evidence. Preserve failed partial or empty files and the older image.
2735
2836Copy and hash the full volume before freeing the filler or opening it for
2937inspection, then archive later retained states before unmounting the volatile
@@ -35,6 +43,7 @@ no positive filesystem-exhaustion evidence.
3543Linux documents tmpfs capacity limits and loss of contents on unmount in
3644[tmpfs(5)](https://man7.org/linux/man-pages/man5/tmpfs.5.html). This is real logical
3745filesystem exhaustion on a memory-backed filesystem. It does not qualify storage
38device exhaustion, persistent-media durability, EDQUOT, EIO, sync failures or
46device exhaustion, a write syscall returning zero without an error,
47persistent-media durability, EDQUOT, EIO, sync failures or
3948electrical power loss. Those remain separate acceptance requirements. The fixture
4049adds no production storage layer, privileged application command or dependency.