Changelog entry for the 2026-09-26 refactor; STATUS corrected to the current 38-case sys matrix with the new static-binary evidence; VM boot verification gains the sys-acceptance-refactor run; handoff updated. Verified with cargo test --workspace (692/692) and the disposable-VM matrix (guest PASS=38 FAIL=0, driver PASS=41 FAIL=0).
9.7 KiB
Handoff
Rolling note between work sessions. Update this file before you finish, then
commit it. It should be short and current; use git log for detail.
-
Quality pass (2026-09-26): boxed
ExecError::Commanddetails (CommandFailure, 128 → 96 bytes, measured with a path-dependent probe crate; constructor + all match sites updated, error text/redaction/stderr-tail preserved, 4 regression tests), clearedcargo clippy --workspace --all-targets -- -D warningswith no blanket allows (type alias,CommandRecordparams struct,DiskPhaserenames), and splitservice.rs(4218 lines →service/mod,plan,validation,execution,tests) andgui_bridge.rs(2763 lines →gui_bridge/mod,protocol,bridge,tests) as structural refactors with explicit re-exports andpub(super)seams — noservice.rsleft alongsideservice/mod.rs.make testgreen (692/692, unchanged across the splits). Release + static-pie builds pass. The disposable VM re-ran the current 38-casesysacceptance matrix against the new staticsys(70f0a72b…): guestPASS=38 FAIL=0, driverPASS=41 FAIL=0(serial-boot-20260926T014746Z-3089a820, overlaysys-acceptance-refactor.qcow2). Commitse69bfb9,1bf31c5,2dd48d1. -
Interface contract (unchanged): ordinary requests use AI; only explicit
--legacyselects deterministic handling; source flags constrain the AI and never bypass it; a missing model stops the workflow and offers the exact--legacycommand without executing it. -
Snap first-use follow-up (2026-09-25): the previous "no snapd" note was a real integration gap. The normal
sys install … --legacy --snapresolver needs snapd to confirm a Store candidate before approval, while a raw typedsnap_installsilently added it during execution. First-use setup is now a separately reviewed Portage install plus socket enable/start, with exact guidance when absent. Fresh installs set scopedsys-fs/squashfs-tools lzma lzo, which Gentoo's snapd ebuild requires. A disposable VM exposed a second bug: Portage candidate resolution picked the first dependency (dev-lang/go-bootstrap) instead of the requestedapp-containers/snapd; it now matches the requested atom. Snap confinement is reported from the daemon rather than assumed strict. The disposable VM completed setup, Store install, refresh and remove (PASS=10 FAIL=0), with partial confinement. A fresh overlay and a clean reboot repeat with the final static binary each passedPASS=11 FAIL=0, including clean poweroff. Refresh found no newer revision. -
Previous session: second-round
sysreview fixes. Follow-up tod3f676a. Three further confirmed defects are fixed with regression tests: unsafe cleanup previews, non-exact Flatpak/Snap update execution, and reverse-dependency self-reference.make testis green (661 → 683 tests). This corrects the earlier blanket claim that every review finding was already fixed. -
Interface contract (unchanged): ordinary requests use AI; only explicit
--legacyselects deterministic handling; source flags constrain the AI and never bypass it; a missing model stops the workflow and offers the exact--legacycommand without executing it.
Snap first-use changes
phoebus-core::systemgenerates scoped SquashFS USE flags for new installs.- Portage candidate resolution selects the requested atom from the pretend plan, even when dependencies precede it. A multi-package regression covers the bug found by the VM.
- The Snap install path gives exact setup commands when snapd is absent; the
typed action no longer adds an unreviewed Portage dependency. Candidate
sandbox levels and missing
snap infofields are treated conservatively. installer/tests/vm/snap-guest.shdrives the installed-system journey. The serial driver can authenticate for boot checks and logs only guest output, keeping sent test passwords out of its transcript.
Previous sys review work
- Cleanup previews are non-destructive (finding 1).
eclean-dist/eclean-pkgdelete by default, soportage_cleanersnow previews with--pretend --deep(same selection policy as execution) and executes with--deep; the Nix preview uses the documentednix-store --gc --print-dead. Items are read from stdout+stderr, sorted and bound. Tests prove a cleaner never runs destructively during planning, revalidation or cancelled approval. - Exact Flatpak/Snap update transactions (finding 2).
ResolvedPlan.updatescarriesUpdateTransactions: full Flatpak ref + full installed/remote commits (viaflatpak info, since thecommitcolumn is abbreviated), or snap name + old/new revisions + channel. Execution consumes the reviewed transaction (add_executable…flatpak update --commit=<c>), revalidates each source immediately before its mutation, verifies the resulting commit/revision, and refuses non-exact transactions. A source whose resolution failed is never re-discovered.PlanStoreaggregation includesupdates. - Reverse dependencies (finding 3). The reverse branch no longer drops valid matches; it excludes only a genuine self-reference (the dependent is the queried package).
- Determinism.
All selected packages:removals are sorted (depclean previews are now order-independent);emerge --depclean --ask=n.
Verified in disposable VMs
- Cache cleanup + depclean (real tools):
ecleanupstream preview is non-destructive;sys clean cachepreview/cancelled/approved/drift/failed all behave correctly; depclean cancel/approve with transaction history and preserved/home. - Reverse dependencies:
sys-libs/glibcandsys-libs/zlibreport real dependents (conditional/versioned included). - Flatpak: installed via Portage (
sys-apps/flatpak, enablingmedia-libs/freetype[harfbuzz]), flathub added, an app installed and downgraded, thensys apply updates --flatpakresolved full ref+commits, deployed the pinned commit, and verified it. - Custom ebuild: stage → build/install (VDB entry + installed file) → remove.
- Managed AppImage: acquire with pinned SHA-256, list, run the managed ELF, remove; a placeholder SHA is refused.
- Nix: a
NIX_ENABLED=yesinstall bootstraps Nix;nix profile install nixpkgs#nodejs-sliminto/nix/var/nix/profiles/profileis enumerated bysys list --nixand found bysys list nodejs --nix, with store paths and generations reported separately. - Non-root
pkexec sys --broker: with the shipped polkit action and the standard wheel-admin rule installed on the disposable image, a wheel user authenticated through a terminal agent; cancellations changed nothing, the approved removal returned the broker JSON outcome, and the replay was rejected. The shipped privilege policy is unchanged. - Read-only acceptance:
installer/tests/vm/sys-acceptance.shPASS=38 FAIL=0re-run against the final staticsys(dd61c610…), including the newrdeps-legacyreverse-dependency regression. - Snap first use: the disposable VM installed
app-containers/snapdthrough the reviewed Portage plan (six effects), enabled and startedsnapd.socket, installed Snap Storehello-world6.4 revision 29, ran refresh, then removed it. The daemon reportedpartialconfinement and the install review agreed. The harness reportedPASS=10 FAIL=0(serial-boot-20260926T001830Z-107996de). Final-binary runs on a fresh overlay passedPASS=11 FAIL=0on first boot (serial-boot-20260926T005327Z-c024cc43) and after a clean reboot (serial-boot-20260926T010605Z-e6193c3a); both shut down cleanly.
Not completed / blocked
- Snap update to a different revision / strict confinement: refresh with no newer revision and partial confinement were VM-verified. A revision-changing refresh and AppArmor-backed strict confinement were not.
- Live AI: a local OpenAI-compatible model (
llama-server+ a GGUF model) was served on the host; the AI workflow reached the model, but the sandboxed call exceeded the 120 s transport timeout on CPU (curlexit 28). Needs a faster model/GPU or a remote provider credential. Fixture-backed routing and failure tests pass (ask-offline, missing-model offer, source constraint). - Recovery boot (distinct from rollback): the recovery BLS entry is present and asserted in the rollback acceptance, but booting it interactively was not automated. Method: select "Phoebus Recovery (known-good snapshot)" in the systemd-boot menu with no network.
- Nix re-run flakiness: a later
sys list --nixre-run reported the profile link dangling (the profile store path was gone) and correctly listed no packages; the first run with a real profile is the positive evidence.
Known blockers / risks
- VM serial login is occasionally flaky; retry the boot when
detached-boot-loginfails. make doctorpasses (KVM accessible via an ACL). Disk is shared by build and VM; watch free space.- The pre-existing
test-disk.qcow2cannot be unlocked (unknown passphrase); do not guess or brute-force it.
Next actions (in order)
- Recovery boot by selecting the recovery BLS entry with the network down.
- Live AI with a faster local model/GPU or an authorized provider credential (natural-language discovery, source constraints, reviewed install).
- Nix profile GC stability if the dangling re-run is reproducible.
- Snap strict confinement and changed-revision update in a disposable VM when an AppArmor-ready kernel and a revision-changing Store test are available.
Definition of a good stopping point
make testpasses;docs/STATUS.md,docs/CHANGELOG.mdand this file updated; committed (scripts/agent-commit.sh) and pushed (scripts/publish.sh).