Commit graph

4 commits

Author SHA1 Message Date
5f6999631a fix(vm): rollback gate proves a real mutation and restore
The gate could pass vacuously: the guest ran unprivileged (every
mutation refused), used a pre-installed break package, restored the
newest snapshot instead of its own, and the driver never asserted the
root marker was gone. Now the driver authenticates sudo with unique
end markers and a verified timestamp, both phases run as root with
explicit --legacy, the break uses app-misc/hello (verified absent,
verified changed), undo targets the recorded snapshot id, and the
driver asserts the break changed the package DB and the root marker
is absent after the detached reboot.
2026-09-25 20:02:43 -07:00
744059b6a2 fix(vm): provision Gentoo release key; truthful rollback gate
Live image ships gnupg plus the Gentoo release key, fingerprint-checked
at build time against the published release-key fingerprints, so the
fail-closed DIGESTS verification cannot be silently skipped.

Rollback harness: authenticate sudo (unique end markers, verified
timestamp, abort instead of hanging), run both guest phases as root,
use explicit --legacy for snapshot/break/undo, fix the verify SYS path,
emit the real systemd state, and preserve the phase-1 transcript.
2026-09-25 19:49:50 -07:00
c759477c7f test(vm): automate rollback acceptance on a disposable clone
Add a serial-driver rollback mode and guest scripts that exercise the real
rollback path: record the /var/db/pkg fingerprint and a /home marker,
create a recovery point with sys snapshot, install a small package as a
controlled reversible update, run sys undo, power off, boot detached and
compare the restored package state and /home against the pre-rollback
values. Checks kernel modules, the snapshot recovery entry and sys
rollback status. sys is fetched from the host, matching the existing
harness evidence procedure; booting the recovery entry offline remains a
documented manual gate. bash -n guards for every guest script are added
to the no-VM unit tests.
2026-09-23 06:19:17 -07:00
cc23df69de test(vm): enforce harness disk safety and structured results
Validate every writable drive (qcow2, inside PHOEBUS_VM_DISKS, no /dev/*,
block/char devices, raw images, escaping symlinks or outside backing
chains), give each run its own OVMF variable file, QMP socket and state
directory, and use QMP plus argument arrays instead of shell interpolation.
Return nonzero on any failed assertion, timeout, EOF or missing result and
record PASS/FAIL/BLOCKED/SKIPPED/NOT RUN. Add 16 unit tests, a report
generator and a findings register; make test runs the harness suite.
2026-09-21 20:01:50 -07:00