From b2f5181f7f2cae0714a0bec8fc2fc9e5e36c7f2a Mon Sep 17 00:00:00 2001 From: Phoebus Date: Sun, 20 Sep 2026 06:59:01 -0700 Subject: [PATCH] docs: record the desktop VM session and AI guided-path verification Add the detached-boot desktop verification (socket wait, polkit agent, helper reaping) and pin the lockfile for the new phoebus-ai dependency. --- docs/HANDOFF.md | 8 +++++--- docs/VM-BOOT-VERIFICATION.md | 34 ++++++++++++++++++++++++++++++++++ installer-rs/Cargo.lock | 1 + 3 files changed, 40 insertions(+), 3 deletions(-) diff --git a/docs/HANDOFF.md b/docs/HANDOFF.md index 6e6561e..aac3371 100644 --- a/docs/HANDOFF.md +++ b/docs/HANDOFF.md @@ -7,9 +7,11 @@ commit it. It should be short and current; use `git log` for detail. - **Current focus:** four workstreams — AI-assisted install guidance, desktop session reliability, signed-binary reuse, and snapshots/safe updates. - **Last verified:** static Rust binary install + detached boot - (`docs/VM-BOOT-VERIFICATION.md`); in this session additionally: `sys` - snapshot/history and update preparation on an installed Btrfs VM, and the - generated `phoebus-session` script against stub binaries. + (`docs/VM-BOOT-VERIFICATION.md`); in this session additionally: a full dwl + desktop install + detached boot with the session's helpers waiting for the + Wayland socket, the polkit agent running and all helpers reaped on logout; + `sys` snapshot/history and update preparation on an installed Btrfs VM; and + the AI guided path (valid/invalid/malicious/conflicting/no-AI) by fixtures. - **Public repo:** (remote `origin`, SSH port 2222). diff --git a/docs/VM-BOOT-VERIFICATION.md b/docs/VM-BOOT-VERIFICATION.md index a12b21c..3a8b7af 100644 --- a/docs/VM-BOOT-VERIFICATION.md +++ b/docs/VM-BOOT-VERIFICATION.md @@ -230,6 +230,32 @@ Unit regression tests cover the failure paths that a VM cannot easily force: corrupt snapshot history is an error, and a high-risk action aborts when the protective snapshot fails. +## Desktop session on an installed VM + +A full dwl desktop install was built with the static Rust binary +(`DESKTOP_PROFILE=dwl`, `FLATPAK=no`) and booted with the ISO detached: +`INSTALL_RC=0`, all stages, `NO_SECRET_LEAK`, `systemctl is-system-running` -> +`running`, `0 failed units`. + +Running the installed `/usr/local/bin/phoebus-session` under the headless +wlroots backend (the serial VM has no logind seat): + +- the `wayland-0` socket is created before any helper starts; +- after startup the process tree is `dwl`, `waybar`, `mako`, + `swaybg -c #1e1e2e` and `/usr/libexec/polkit-gnome-authentication-agent-1` + (the polkit agent, which the previous script never started); +- dwl reports the `HEADLESS-1` output; +- after `dwl` exits, **all session processes are reaped**. + +Installed and on `PATH`: `dwl`, `waybar`, `mako`, `swaybg`, `kitty`, `wofi`, +`Xwayland`. The polkit agent lives at +`/usr/libexec/polkit-gnome-authentication-agent-1`; the session script's +fallback finds it because it is not on `PATH`. + +This is headless verification. A physical VT / real logind seat remains to be +exercised interactively (`docs/DEVELOPMENT.md` -> "Physical VT / real-seat +check"). + ## Signed binary reuse analysis The desktop transaction's installer log (`emerge` grouping) shows the policy @@ -239,6 +265,14 @@ already requests signed binaries for the expensive set: - binary groups: base tools, `gentoo-kernel-bin`/firmware, and the dwl/waybar/ wofi/mako/sway*/gtk-layer-shell/xwayland set. +The desktop install in this session took ~1h49m wall time (12:01–13:50 UTC) on +8 vCPUs. Most of that is Portage falling back to source because the OpenRC/ +hardened binhost cannot satisfy the systemd/desktop USE set, even though the +policy requested binaries. Two comparable data points are now recorded: the +base-only install took ~44 min and the desktop install ~1h49m. The code changes +here remove forced flags but cannot raise reuse without a matching binhost, so +no new time saving is claimed. + The remaining source builds are caused by the **official Gentoo binhost being built for the OpenRC/hardened profile** (`PROFILE: default/linux/amd64/17.0/ hardened`), which cannot satisfy a systemd/desktop USE set. The safe changes diff --git a/installer-rs/Cargo.lock b/installer-rs/Cargo.lock index c67a797..92c9cc5 100644 --- a/installer-rs/Cargo.lock +++ b/installer-rs/Cargo.lock @@ -523,6 +523,7 @@ name = "phoebus-installer" version = "0.1.0" dependencies = [ "clap", + "phoebus-ai", "phoebus-core", "phoebus-executor", "phoebus-tui",