- systemd Automatic Boot Assessment: BLS +<tries> parsing/formatting and phoebus-boot-confirm.service - Preflight safety gates: 10 GiB storage preflight check and atomic @ and @var pre-update snapshots - Tiered update channels: Core, Proven (default), Edge - Userspace AI agent framework: agent_jail Bubblewrap isolation, desktop_config undoable mutations, phoebus-mcp server, sys propose staging bridge - Fixed parent directory creation race condition in personal storage - Verified with cargo fmt, clippy, and full workspace test suite
39 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.
-
System stability foundations (2026-09-30, IMPLEMENTED + TESTED): Implemented key stability foundations approved by user:
- systemd Automatic Boot Assessment (
bootctl mark-good+ BLS boot counter fallback): BLS filenames<entry>+<tries>.confwith unmetered recovery fallback (phoebus-recovery.conf),phoebus-executor::boot_assessmentcontainingphoebus-boot-confirm.serviceunit,enable_boot_counting, and service installation inetc/systemd/system/multi-user.target.wants. - Preflight Safety Gates:
check_update_preflightchecking >=10 GiB free space on root, andcreate_pre_update_snapshot_settaking atomic coordinated@(root) and@var(Portage DB state) Btrfs snapshots prior to updates so rolling back never breaks package manager consistency. - Tiered Update Channels:
UpdateChannel(Core,Proven[default],Edge). - Enforced default prebuilt kernel:
sys-kernel/gentoo-kernel-binstrictly set as default. Gates:cargo fmt,clippy --workspace --all-targets,cargo test --workspaceall pass.
- systemd Automatic Boot Assessment (
-
Userspace-directed AI agent framework (2026-09-30, IMPLEMENTED + TESTED): designed and implemented a Two-Tier architecture for userspace developer/desktop AI agents (e.g., Claude Code, OpenCode, Cursor, Codex). Added
agent_jail+phoebus-agent-run(Bubblewrap isolation with private tmpfs masking over~/.ssh,~/.gnupg, keyrings,.aws,.config/gh),desktop_config+phoebus-desktop(schema-validated MangoWM keybinding & DarkMaterialShell theme mutations with automatic snapshot checkpoints and one-clickundo),phoebus-mcp(standardized Model Context Protocol stdio server), andsys propose(unprivileged plan staging for Polkit elevation review). Fixed parent directory creation race condition inphoebus-executor::personal. Workspace tests: 124+ passed, 0 failed. -
Live real-agent call (2026-09-28, host, real model): with a real
opencode serve(v1.18.32) on127.0.0.1:4096and theopencode-goprovider,sys ask "list installed packages" --ai-backend opencode --opencode-provider opencode-go --opencode-model deepseek-v4.1-flashreturned a valid assistant plan + approval digest (read-onlylist_packages, exit 0). A hostile instruction to read/etc/shadowand~/.sshand run a shell command was refused and downgraded to the read-only inventory; the phoebus transport disables every OpenCode tool in the session, so the agent has no shell/file access. No provider credential appeared in the sys log. This is host-level live evidence (not VM); a VM/live-provider run with the direct sandboxed transport remains NotRun. -
End-to-end AI-path test (2026-09-28, IMPLEMENTED + UNIT-TESTED, no live model): new
installer-rs/crates/phoebus-installer/tests/sys_ai_e2e.rsdrives the realsysbinary against a real local OpenAI-compatible TCP stub and the real curl transport (--no-sandbox, no seat). Four cases: a valid model plan executes end-to-end; the request sent contains no/home/path and no credential; a modelrun_shellfails closed after one corrective retry; adepcleanwith a smuggledshellkey is refused by the exact schema; and malformed output fails closed after one correction. This is not a live-model call (sys askwith a real provider is still VM/live NotRun) but it closes the "connected-model path only tested with fake transports" gap. Gates:cargo test --workspace841 passed / 0 failed. -
Three kernel choices + VM-found kernel bugs (2026-09-29): added a first-class three-way kernel choice (
bindefault,balancedsource kernel with broad hot-plug coverage,tunedsource kernel) via the newBuildBalancedKernelaction /sys build balanced kernel; both source choices keepgentoo-kernel-binas the known-good fallback and create a separate BLS entry. The first VM journey started the balanced build and found two real bugs, both fixed:vdb_has_atom("sys-kernel/gentoo-kernel")matched the siblinggentoo-kernel-binrecord (prefix overlap), and the separate BLS entry was looked up inEFI/Linuxinstead of the realloader/entriesdirectory. The build is in progress on a disposable overlay withMAKEOPTS="-j10 -l14"(the installed default-j3 -l8is memory-derived and too slow for a test build). Source conversion remains to be started. Result: the full distribution config did not finish in 3 h (guesttimeoutkilled it atRC=124; 7.7 GiB build artifacts, no system change — build-only is fail-safe). The review text now says "allow several hours" instead of the earlier "20–60 min". Completing this journey needs a multi-hour build window; the separate BLS entry path is unit-tested with the correctedloader/entriesdirectory. -
OpenCode transport standardized (2026-09-29, VM-VERIFIED): the OpenCode backend no longer runs outside the model sandbox and no longer has a stricter endpoint policy than the direct provider. It is sandboxed by default (curl body inlined on stdin because
PrivateTmphides a temp file);httpsservers on the network work as before, and remote plainhttpis allowed only with--opencode-insecure-http/PHOEBUS_OPENCODE_INSECURE_HTTP=1. Re-verified in the VM with the real host agent (serial-boot-20260929T114319Z-c43c2a92, driver PASS=8). Next confidence work: VM-prove the approval-ledger/effect-binding paths, source-conversion/tuned-kernel journeys (multi-hour), a physical-seat desktop pass, and configure a CI runner for the release gates. -
VM live AI (2026-09-29, VM-VERIFIED): from inside the installed guest, the host's real
opencodeagent was reached through the loopback tunnel andsys askproduced a valid plan (live-agent), with a hostile instruction refused/downgraded (live-agent-hostile-rejected) (serial-boot-20260929T102703Z-ffd1ec25). A real local model (Qwen2.5-1.5B GGUF viallama-server) was also driven through the direct sandbox in both scopes; it reached the model but failed closed on schema-noncompliant output. The assistant prompt now shows a concrete action-object example ({"action":"list_packages"}), which made the small model emit action objects; a capable model is still required, and a 4096-token local context can be exceeded by the one-shot correction turn. Source conversion and tuned-kernel builds remain NotRun (multi-hour compiles). -
Real powerful model via the host agent,
sysin the VM (2026-09-29, VM-VERIFIED): four requests throughopencode/deepseek-v4.1-flash:listandsearch firefoxreturn valid grounded plans;install firefox --flatpakas the user stops before mutation; hostile shell/private-file instruction refused (serial-boot-20260929T111941Z-2be30b89, PASS=8, zero auth prompts). A read-only Flatpak probe had hung on Flatpak's interactiveappstream-update(pkttyagent) on the headless console;CommandSpec::detached()now runs host-root Flatpak commands with no controlling terminal. The install prompt now enumerates the allowedkindvalues (a capable model had guessedkind:"gui"). The install investigation itself still stops on the model's own request-count/formatting limits and fails closed (nosysdefect). -
First VM test loop on the golden image (2026-09-28, VM-VERIFIED): booted a fresh overlay of the installed
phoebus-headless-80g.qcow2with the staticsysfrom HEAD and found two real defects, both fixed. (1) Unprivilegedsys askhung on a polkitmanage-unitsprompt because the model sandbox used the systemsystemd-run; it now usessystemd-run --userwith the user-manager property subset for non-root callers, full system sandbox for root. (2) An unprivileged read-only AI plan exited 1 after printing the plan because the service layer required the root-owned transaction log; recording is now best-effort for non-root plans and mandatory for privileged mutations. VM evidence (serial-boot-20260929T092147Z-6f88907a, PASS=8): system sandboxAI_ROOT_RC=0, user sandboxAI_USER_RC=0(was 124/timeout), no-sandboxAI_NOSANDBOX_RC=0, hostile replyAI_SHELL_RC=1, andsys-acceptance.shSUMMARY PASS=49 FAIL=0. Hypothesis recorded (not changed): headless/inactive-sessionflatpak searchcan trigger Flatpak's interactiveappstream-updatepolkit prompt; the unattended acceptance runs detached to avoid the hang. Additional loops on the same golden overlay with the fixed binary: mutating acceptance as rootSUMMARY PASS=42 FAIL=0(serial-boot-20260929T093329Z-4ef893cf), rollbackPASS=11(serial-rollback-20260929T094640Z-256c2ba1), Snap journeyPASS=11(serial-boot-20260929T094957Z-3d4a9211). Next: source conversion / tuned kernel (multi-hour compiles) and a live direct-provider model in the VM remain NotRun. -
Boundary-hardening pass (2026-09-28, IMPLEMENTED + UNIT-TESTED, VM NOT RUN): six host-provable defects fixed with regression tests. (1) Removed the
PHOEBUS_ALLOW_UNPRIVILEGED_EXEC=1env backdoor: it madeservice::effective_uid()report uid 0, letting a non-root desktop-assistant client skippkexec+ the approval ledger and run a root-requiring plan in-process. (2)load_api_keynow refuses a credential containing",\, whitespace or a control character (it is interpolated into a curl configheader = "..."). (3) The OpenCode base64 Basic/Bearer token is now registered with the redactor (only the plaintext was). (4)SystemFacts::validate_no_forbiddennow scanscpu_features(it was omitted). (5)validate_endpointrefuses userinfo (https://user:pass@host/...). (6) The AI assistant/install parsers now usephoebus-core::action::validate_action_value, closing a unit-variantdeny_unknown_fieldsbypass ({"action":"depclean","shell":"sh"}was accepted on the AI path). Gates: fmt clean,clippy --workspace --all-targets -- -D warningsclean,cargo test --workspace837 passed / 0 failed, release build. NotRun: VMsystemd-runsandbox exercise — host probe shows systemmanage-unitsrequires polkit auth and the full property set is invalid for--user(DynamicUser unsupported; PrivateDevices fails); a VM run as thephoebususer on a seat is required to settle whether the sandbox is usable unprivileged or must switch to--userwith a reduced property set. Also NotRun: source-conversion/tuned-kernel journeys (need a disposable install + reboot); Snap changed-revision/strict confinement (external prerequisite). Identified but deliberately unchanged: Flatpak/Snap install drift binds the human version only (no commit/revision);SnapRefreshhas no review binding;UpdateSystem/world-update has no post-verification;PrepareUpdatesrecordsokwith a truthful "prebuild skipped" note. Recorded as hypotheses, not reported holes. -
sysadversarial battery + hardening (2026-09-28, IMPLEMENTED + UNIT-TESTED, VM NOT RUN): newinstaller-rs/crates/phoebus-installer/tests/ sys_adversarial.rs(54 cases: shell injection per operand, empty/NUL, lengths, Unicode/homoglyphs, traversal, option injection, malformed/nested JSON, CLI flag conflicts, natural-language edges, boundaries, privilege gates) exercising thephoebus-corevalidators and thesysbinary underPATH=/nonexistent. Found and fixed 5 real gaps, each regression-tested:valid_file_pathshell metacharacters +..(doc contract previously unimplemented);valid_application_name../empty components + leading slash;valid_ebuild_atom.-leading components, closing a real overlay path traversal (../pkg), plusebuild::package_dirre-validation;valid_flatpak_app_idempty reverse-DNS element;valid_nix_attributeleading dash. Gates:cargo fmt --all -- --checkclean,clippy --workspace --all-targets -- -D warningsclean,cargo test --workspace828 passed / 0 failed. VM rerun of the acceptance matrix remains NotRun. -
sysflaw-fix battery (2026-09-28, IMPLEMENTED + UNIT-TESTED, VM NOT RUN): fixed 6 audited flaws: versioned/slotted/repo atoms now validate (valid_package_spec), quoted multi-word app names parse in legacy install/remove,vdb_has_atomnormalizes (executor + kernel), Flatpak install/remove pin--system --noninteractive, andwho owns <relative path>is normalized. Added host batteryinstaller-rs/crates/phoebus-installer/tests/ sys_flaws.rs(9 tests) andsys-acceptance.shservice-lifecycle / versioned- atom / who-owns cases. Gates:cargo fmt --all -- --check,clippy --workspace --all-targets,cargo test --workspace773 passed,bash -n+shellcheckclean. VM rerun of the expanded acceptance matrix is NotRun. -
Headless stabilization run (SELF-HEALING LOOP ACTIVE, run 10 IN FLIGHT): Failures so far, each fixed + committed + verified green (761 tests) + rerun:
- Brave overlay pin missing → recorded reviewed pin
d3a97f22…(0aa31a3). /bin/zshmissing atusers_configure(Zsh lane only in desktop, which runs later) → shell lane moved tobase_packages(5ea4bb1).zsh-autosuggestionsmasked~amd64→accept_keywords_shell()wired into the GURU block (ff104dd).- GURU
zsh-autosuggestionsneeds>=zsh-5.9.1, stable is5.9-r7→ keywordedapp-shells/zshitself (6972511). swayimgREQUIRED_USEexactly-one-of lua_single_target_*(profile enables none) →media-gfx/swayimg lua_single_target_luajit(3abdc87).gui-apps/matugendoes not exist (GURU sparse-index proof) → corrected tox11-misc/matugen(f480c9c).nemoneedslibxmlb[introspection], binhost lacks it → scopeddev-libs/libxmlb introspection(0036529).- Same class:
xapp[introspection]→ scoped xapp + pre-emptive libsecret/ cinnamon-desktop introspection + mpv luajit (8a0dfdf). - Same class:
libdbusmenu[gtk3](xapp dep) → scoped it plus the rest of the ebuild-read closure:gdk-pixbuf/gtk+introspection (233a3e2; closure read from gentoo.git tree, no checkout). - Run 10 reached 285/346 desktop then the DRIVER (not the guest) gave up:
serial-driver.pyinstall expect timeout was 9000 s (2.5 h) but full Mango needs ~3.5 h; QEMU was killed with the guest mid-emerge →24b11ebraises it to 19800 s (5.5 h). - Run 11 reached 346/346 then failed enabling seatd: Gentoo's seatd
ships its systemd unit only with USE=
server; our package.use set flags on libseat but not on seatd itself →add7dfcaddssys-auth/seatd server systemd builtin. - Run 12 reached
finalizethen failed its own check: the VDB verify matched a literalcategory/namedirectory, but VDB entries arecategory/name-version→has_vdb_record()prefix match + regression test (2b8559f). - Run 13 COMPLETED GOLDEN (
===INSTALL-RC=0===,NO_SECRET_LEAK, serial dirserial-install-20260928T002557Z-e39d1934). All 12 stages passed, 347 desktop packages emerged, 588 compile times recorded into metrics, coordinated snapshots@-20260928T060439-initial-known-goodand@varcreated.
- Detached boot proven (
serial-boot-20260928T075316Z-c1918e9c): Booted detached disk with-boot order=c(no ISO). LUKS2 decrypted, systemd running with 0 failed units.seatd.serviceactive and running (/run/seatd.sock0660 root:seat,phoebusin groupseat). Fast-defaults verified in Gentoo VDB (firefox-bin,libreoffice-bin,thunderbird-bin,brave-browser) and Flatpak (calibre,gimp,flatseal). Acceptance suite passed 40/40. - Next:
scripts/publish.shto push commits toorigin/main.
- Brave overlay pin missing → recorded reviewed pin
-
Run 14 (IN FLIGHT, pristine record with all fixes): new static binaries from HEAD (
phoebus-installer183ec40b…,sysd5f7a46f…); driver pid 2485744, serial dirserial-install-20260928T091251Z-8e9c8076, chain pid 2494536. Includes the nix file-perm fix (c806c98), opencode Local default (2261c54), zsh-prompt + equals fixes, setsid acceptance, and the guest loopback tunnel (fwd.py, with thesettimeout(None)long-reply fix). -
Run 15 (COMPLETE GOLDEN, 2026-09-28):
INSTALL-RC=0(driver 4/4, serialserial-install-20260928T132731Z-b5f8629a), no leak; detached boot driver 4/4 (serial-boot-20260928T183131Z-953e4677: systemd running, 0 failed, seatd active, clean poweroff); 40/40 acceptance; nix per-user hello enumerated from install perms alone (/etc/nix*world-readable — thebc0c4b8ordering fix proven);AI_LIVE_RC=0(valid plan + digest, muse-spark-1.3-contributor). Evidence in VM-BOOT-VERIFICATION.md / STATUS.md / CHANGELOG.md. Next: publish. -
Seat/thunderbird/AI-timeout session (IMPLEMENTED + UNIT-TESTED, VM NOT RUN): P0 seat fix (seatd pkg + enabled before greetd, libseat systemd/builtin/ server USE,
seatin default groups, greeter-G video,input,render,seat, 3 s bounded seat wait in the session script,LIBSEAT_BACKENDdeliberately unset), thunderbird-bin fast default +SOURCE_CONVERSIONSentry + welcome text (all lanes untouched; mandatory-AI requirement unchanged), andCurlTransporttimeout 120 s → 300 s default viaPHOEBUS_AI_TIMEOUT(fail-closed parsing). Gates: fmt, clippy--workspace --all-targets -- -D warnings, 759/759 tests (was 757),bash -nsession script. Seat-VM reverification, thunderbird installed-identity/conversion journey, and live CPU-inference timeout proof are NotRun (no VM run this session). -
Zsh modernization (2026-09-26, IMPLEMENTED + UNIT-TESTED, VM NOT RUN): rewrote
ZSH_SKEL_RC(color fix, cached compinit, Kitty keybindings,INC_APPEND_HISTORY, vcs_info git branch, exit-status prompt) and addedZSH_ZPROFILE(/etc/profilebridge +~/.local/bin);seed_default_zshuses the new const. Gates: fmt, clippy--workspace --all-targets -- -D warnings, 757/757 tests,zsh -n+ interactive startup smoke on host zsh 5.9. Seeding is once-only (existing~/.zshrcpreserved). Installed-session behavior (login env, Nix paths, prompt/git/keys in Kitty) awaits the disposable VM. Uncommitted;docs/DUAL-BOOT.mdfrom the prior session also still uncommitted. -
Fast-defaults follow-up (2026-09-26, ISO BUILT + CONTENT-VERIFIED, VM NOT RUN): audited the
e747baffast-defaults tree against the prompt (all lanes covered, no code changes needed), re-ran gates green (fmt, clippy -D, 757/757 tests, release build, vmsafety 18/18, shellcheck info-only), rebuilt the static binaries frome747baf(phoebus-installer8cf90d0f…,sysc87557…), and built a fresh ISOphoebus-installer-amd64-fastdefaults.iso(1.6 GiB,ad9cddb2…, build20260926T145700Z,PHOEBUS_REUSE_ROOTFS=1; git-ignored) with content verification (embedded binaries hash-match, Gentoo key both fingerprints, Mango/DMS + installer UI present). NO install/boot this session — wall-clock blocker (full Mango install ~165 min; host ready: doctor 20 ok, ~103 GiB free); all install/boot/graphical/source/tuned gates NotRun with exact unblock in VM-BOOT-VERIFICATION.md. Next: disposable 80 GiB install of thead9cddb2…ISO + detached boot, 37-case acceptance, graphical/file/device/source/tuned gates. -
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. -
Fast-defaults session (2026-09-26, IMPLEMENTED + UNIT-TESTED, VM NOT RUN): Firefox/LibreOffice as
-bin, Calibre/GIMP/Flatseal as target-only system-wide Flatpaks (no Portage duplicates), single generic kernel, delivery section in plan review + progress log, install metrics hooks, preference neutrality guard,convert_to_source(Firefox/LibreOffice/ Calibre/GIMP; Brave refused with reason) +build_tuned_kernel(separate BLS, fallback kept, default only after test boot) typed actions with full reviews through the existing approval/broker path, installed once-per-user reopenable non-blocking welcome + DMS skel seed, portal/MIME defaults with no sandbox overrides. Gates: fmt, clippy -D, 757 tests (was 736), release build, vmsafety 18/18, shellcheck clean. NO new ISO, NO install/boot this session — session-time blocker (host ready: doctor 20 ok, 104 GiB free); all VM gates NotRun with exact unblock in STATUS. Next: build ISO, disposable 80 GiB install + detached boot, 37-case acceptance, graphical/file/device/source/tuned gates per VM-BOOT-VERIFICATION.md. -
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. -
Workstation experience session (2026-09-26, IMPLEMENTED + UNIT-TESTED, VM BLOCKED): Mango workstation atoms (22 apps, exact, no substitute; Kitty kept, Nemo default, CUPS local-only, sshd installed/disabled), Brave stable scoped overlay (pin pre-network fail-closed; no pin recorded yet), Zsh-by-default
- packaged plugins, Vanilla-DMZ 24 cursors, default ccache 2G, AI reuse handoff (per-user 0600 key, truthful status, no Approve&Execute on errors), startup-check model (blur optional, PPD+D-Bus, matugen, cava) with truthful summary, assistant dark-default + light + responsive + token-drift guard, 60/20 GiB disk gates. Gates: fmt, clippy -D, 736/736 tests, release build, vmsafety 18/18, shellcheck info-only. NO new ISO (8 GiB free, needs ≥20; target needs 60–80), NO install/boot this session — all VM gates NotRun with exact unblock in STATUS. Next: free ≥80 GiB, pin Brave commit, build ISO, disposable 80 GiB install + detached boot, seat-VM compositor/cursor/ DMS/theme checks, fixture + live-AI handoff, local CUPS job, sshd-disabled
- PPD D-Bus recheck after reboot.
-
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. -
ISO rebuild + verification session (2026-09-26, DONE except seat-compositor): new ISO
installer/live/phoebus-installer-amd64-20260926.iso(1.6 GiB,250dbe9a…, build20260926T041500Z, HEAD11c0ee0+0b41781) built viaPHOEBUS_REUSE_ROOTFS=1, content-verified (embedded hashes match, Gentoo key both fingerprints, UI payload present); old Sep-24 ISO kept. Interactive VM RUNNING (KVM/GTK,phoebus-interactive-20260926.qcow2+ private vars in/var/tmp/phoebus-interactive/, screenshot at welcome, undisturbed). Unpinned signed-DIGESTS full install PASSED (gui-install-20260926T040728Z-f3ae68f4,INSTALL-RC=0,NO_SECRET_LEAK, ~165 min) + detached boot (running, 0 failed units,sys --legacy+ snapshot). Tamper refusals PASSED (placeholder pin pre-network, hash mismatch post-download, bothRC=1+ no leak). Recovery-entry boot PASSED (snapshot cmdline/findmnt, login,sys --legacy, truthfulaskfailure, systemd degraded). Seat desktop PARTIAL: seat0/DRM/greeter/auth verified, Mango dies in <1s (libseat, no seatd) — the blocker. Snap: no Store revision, still partial confinement. Nix: GC-dangling NOT reproduced; new gap: modern per-user Nix profiles invisible tosys(follow-up). Live AI: still no credential/model (NotRun).gui-driver.pyboot sys-check fixed (--legacy).gates --execute: 0/0/6 NotRun, no publish. Quality gates green (717/717, clippy -D, vmsafety 18/18). Evidence diskdisks/unpinned-accept-1.qcow2KEPT; scratch overlays removed. Next: seatd-or-logind fix for Mango (design+rebuild+retest), per-user Nix enumeration, live AI credential, snap revision/strict, NVIDIA. -
Security/readiness follow-up (2026-09-26): trust anchor + executable gates + strengthened rollback PASS.
- Stage3 trust anchor (fixed):
release_key_path()ignoresPHOEBUS_GENTOO_RELEASE_KEY; production always uses the provisioned key, test injection only via explicitverify_digests_with_key. Host-level Good-signature check of the real DIGESTS passes (not VM evidence). VM proof blocked: needs a rebuilt live ISO + disposable install (exact prerequisites indocs/VM-BOOT-VERIFICATION.md). - Release gates executable: invalid
checks/desktopmodes fixed (realbootmodes),--executeruns each argv and reports Passed/Failed/NotRun from evidence (unconfigured host: 0/0/6, publish refuses). Found and fixed agui-driver.pySyntaxError. 6 new tests. - Strengthened rollback rerun PASSED
(
serial-rollback-20260926T034218Z-7fab51ef, PASS=11 FAIL=0, exit 0, no leak, overlayrollback-accept-8.qcow2): mandatory===ROLLBACK-MARKER present===before undo, DBca398d71…→fda3780a…→restored, marker absent after detached reboot,/homesurvives, systemd running.SERVEshellcheck fix included. - Recovery-entry boot is now a distinct manual gate with its own
procedure (NOT RUN). Roadmap no longer lists passed
sys undoas unfinished; Secure Boot filed as a separate opt-in milestone. - Quality gates:
cargo fmt --check,clippy --workspace --all-targets -- -D warnings,cargo test --workspace717/717 (oneassistant_bridgeflake under parallel load, green in isolation and on rerun), release + static-pie builds,test_vmsafety.py18/18,shellcheckclean. Seat desktop, live AI, Snap revision/strict, and NVIDIA stay open with exact prerequisites (STATUS).
- Stage3 trust anchor (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. -
Hardening pass (2026-09-26): stage3 fail-closed + truthful boot security + rollback acceptance PASS.
- Stage3 (security defect, fixed): the unpinned path warned and
continued on DIGESTS-download failure, missing SHA-512 entry, missing
gpg/key, failed key import, and gpg launch errors. All stop the install
before extraction now; bad signature/hash also stop it. The pinned path
requires a valid 64-hex pin (placeholder refused) before any network
use.
stage_installchecks forgpg/sha256sum/sha512sumfirst. 16 new regression tests (every failure branch, nonzero-exit and cannot-start doubles, both positive paths). The live image shipsgnupgplus the Gentoo release key, fingerprint-checked at build time against Gentoo's published fingerprints (13EB…2910weekly,D99E…2058signing). Commits2162670,744059b. - Boot security (fixed):
uki=true/secureboot=trueare rejected atvalidate_config(shared by CLI/TUI/GUI bridge); the plan preview always reports unsigned BLS. Parsing/validation/rendering regressions + golden updated. Commit95e0d05. Authenticated boot stays an open limitation (STATUS). - Rollback acceptance PASSED for real
(
serial-rollback-20260926T030237Z-912f6386, PASS=11 FAIL=0, exit 0, no secret leak): fresh overlayrollback-accept-7.qcow2onfresh-install-1.qcow2— snapshot →app-misc/helloinstall (DBca39…→fda3…) →sys undo <id>rc=0 → detached reboot (DB restored, root marker absent,/homesurvives, systemd running, recovery entry present). The 2026-09-25 pass claim had no transcript and did not reproduce; fixed harness defects: sudo auth (stale-prompt match bug found and fixed with unique markers), root phases, explicit--legacy, verified break (nanowas pre-installed), targeted undo, marker-absent assertion, preserved phase-1 log. Commits744059b,5f69996. - Release candidate (local, isolated): manifest (2 artifacts), verify,
tamper refusal, and publish refusal against the NotRun report all behave;
gates --executeis 0 passed / 6 NotRun (every gate needs VM/seat/model;run_gatesnever executes gate commands itself). Nothing published. - Quality gates:
cargo fmt --check,cargo clippy --workspace --all-targets -- -D warnings,cargo test --workspace712/712, release + static-pie builds,test_vmsafety.py18/18,make doctor19 ok / 1 disk-space warning.
- Stage3 (security defect, fixed): the unpinned path warned and
continued on DIGESTS-download failure, missing SHA-512 entry, missing
gpg/key, failed key import, and gpg launch errors. All stop the install
before extraction now; bad signature/hash also stop it. The pinned path
requires a valid 64-hex pin (placeholder refused) before any network
use.
-
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. -
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
- Stage3 VM proof with the new binary: unit-tested (19 stage3 tests) and
the pinned path is unchanged for real pins, but no full install has run
with the fail-closed binary yet; the next disposable install is the proof.
The unpinned (signed-DIGESTS) VM proof additionally needs a rebuilt live
ISO carrying the provisioned key (
installer/live/build.shnow provisions it; no ISO was rebuilt in this session). - Installed Mango + DMS session under a seat: still needs a
seat-providing graphical VM (or physical VT): login, kitty, DMS
spotlight, lock/idle, polkit agent, logout, reboot
(
docs/DEVELOPMENT.mdphysical-VT procedure). - 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 (need an AppArmor-ready guest kernel with loaded policy, and a Store snap that actually has a newer revision than installed).
- 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)
- Stage3 install proof: next disposable install with the fail-closed binary (pinned path), then a rebuilt live ISO (with the provisioned Gentoo key) proving the signed-DIGESTS path in the VM.
- 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).
- Installed desktop under a seat (Mango + DMS login through reboot).
- 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).