Implement the shared installation workflow (ADR 0013). sys install, sys ask
install and the explicit backend flags all use one path: identify -> evidence
-> AI investigation -> deterministic validation/effects -> review -> approval
-> execute -> verify -> history.
- phoebus-ai::install: bounded, multi-turn investigation. The model may request
typed read-only evidence (discover_candidates, inspect_candidate,
check_backend, inspect_installation), ask one bounded question about intent,
and must return a structured InstallProposal. Turn/request/size limits and
repeated-request detection bound it; a rejected proposal is revised.
- phoebus-core: add the four read-only investigation actions and strict
validators; add a transaction id; backend/kind wire names now match as_str.
- phoebus-executor::install: resolve_explicit (no model, no fallback),
resolve_deterministic and resolve_with_ai; validate_proposal re-resolves the
candidate against real metadata, rejects fabrication/ambiguity/staleness/
duplicates, maps it to the existing broker action, and binds approval to a
digest; revalidate + verify_installed. chooser gains per-lane friendly-name
resolution and structured evidence.
- transaction::begin/finish record an in-progress transaction before mutation.
- sys: --portage/--flatpak/--nix/--snap/--appimage/--ebuild (mutually
exclusive) bypass the model; an unqualified install consults the model and,
with none, prints the deterministic selection and installs nothing.
- The installer persists /etc/phoebus/install.toml; sys loads it and adds free
space, Wayland, usable lanes, saved preferences and recovery capability to
the bounded facts.
- Docs: ADR 0013, docs/SYS.md install sections and cases 23-31, CHANGELOG,
STATUS, HANDOFF, ROADMAP. New live-VM workflow check script.
Host gates pass: fmt, clippy (no new warnings), workspace tests, make test.
VM: verified the workflow CLI and read-only investigation on the reference
LiveGUI ISO; a full target install journey is running (see HANDOFF).
The installed-target check scanned only the top level of /boot and /efi for
vmlinuz/kernel. With layout=bls, kernel-install places the kernel as
<boot>/<machine-id>/<version>/linux, so a correct install would have been
rejected. Scan the tree (bounded, without following symlinks) for linux/vmlinuz/
kernel, and accept a BLS entry that names a kernel.
Replace the fixed category routing (ADR 0006) with a shared, inspectable,
hardware- and preference-aware selection policy over resolved candidates from
Portage (source/binary/vendor), Nix, Flatpak, Snap, AppImage and the Phoebus
overlay. The policy keeps base components under Portage, separates hard
constraints from preferences, honours and persists explicit choices, errors
instead of silently switching lanes, and reuses an already-installed lane.
- phoebus-core::selection: the pure policy (16 tests: base-system, low-memory
vs high-core, sandbox requirement, GPU/arch/storage rejection, explicit
preference, unavailable backend, reproducibility, render).
- phoebus-executor::chooser: resolves real metadata and hardware facts.
- phoebus-executor::{snap,appimage,ebuild}: new lanes. Snap detects daemon and
confinement and installs app-containers/snapd through Portage; AppImage
adopts images with a pinned SHA-256, checks the ELF architecture without
executing, integrates a desktop entry and preserves user data on removal; the
custom ebuild overlay binds approval to the ebuild content digest and builds
through Portage's sandbox.
- Typed actions choose_package / set_package_preference / snap_* / appimage_* /
custom_ebuild_* with strict validators; the assistant prompt and schema are
reconciled (no category routing; custom ebuilds are untrusted).
- Installed sys: the installer locates the trusted static binary, copies it to
/usr/local/bin/sys and proves it runs in the target chroot before the
recovery snapshot, failing closed if absent; the VM harness fetches sys.
- docs/SYS.md: command/action reference and acceptance matrix; ADR 0006 revised.
Host gates pass: fmt, clippy (no new warnings), workspace tests, make test,
release and static sys builds. VM lane journeys remain pending (see HANDOFF).
The installer wrote dracut force_drivers naming nvidia modules during the
first kernel build, before the driver package existed, so the initial
kernel/initramfs build could not resolve them. Only the NVIDIA install
stage installs the driver and regenerates the initramfs.
- dracut_conf() no longer emits the NVIDIA fragment; the modprobe policy
is still written before the kernel.
- write_nvidia_dracut_conf() writes it in the NVIDIA stage, after emerge
and before kernel-install add-all.
- verify_nvidia_modules() proves the driver actually built modules for a
kernel and fails the install otherwise; it returns the resolved version
from var/db/pkg so the record carries the real version, kernel and
module names rather than a 'current' label.
- The update path verifies the rebuilt modules before reporting success;
previous kernels and module trees are left in place.
- resolve the NVIDIA branch and kernel-module flavor from PCI device IDs
(Turing+ open modules; Maxwell/Pascal/Volta proprietary, masked below 595;
Fermi/Kepler fall back to nouveau, reported; unknown IDs reported)
- capture pci_id/pci_address in the probe; drive VIDEO_CARDS, package.use,
package.accept_keywords, package.mask, modprobe.d and dracut from the plan,
preserving hybrid Intel/AMD
- add the nvidia_drivers install stage (after the kernel, before boot) that
emerges the driver, regenerates the initramfs, records /etc/phoebus/nvidia and
fails the install on failure; sys update rebuilds modules and the initramfs
- refuse AI changes to x11-drivers/nvidia-drivers
- live ISO: signed non-free components, stable-kernel pin (testing 7.2 breaks
the 550 driver), DKMS build for the exact kernel, gated pre-greetd load,
fail-safe entry, gpu-report, and a --verify-live-nvidia build gate that runs
on cached rootfs builds and fails on any missing component
- docs: ADR 0012, STATUS/CHANGELOG/HANDOFF, live README
- also carries the pending OpenCode model-variant/streaming changes and fixes
the GUI bridge install thread join that could hang
probe_disks parsed lsblk human-readable sizes as bytes, so every disk
reported 0 B and the size-based identity check was blind; pass -b.
Re-probe the selected disk immediately before the destructive stage and
refuse if it disappeared, became protected (mounted/read-only/live) or
changed size/model since the review. Add regression tests for each case.
Add a branded live welcome window and a Quickshell/QML installer frontend
over a narrow, fail-closed JSON bridge (phoebus-installer --gui-bridge)
that reuses the same InstallConfig, plan, validation, authorization and
staged executor as the TUI/CLI. Add the Phoebus brand system (emblem,
wordmark, wallpaper, tokens), suppress DMS first-run dialogs on the live
medium, identify the live medium as protected, make the installer
shortcut live-only, and fix the installed boot default so systemd-boot
never selects the recovery entry.
Verified in a disposable graphical VM (welcome/installer journey,
duplicate prevention, keyboard navigation, blocked AI prerequisite) plus
a real non-interactive install and detached boot (INSTALL-RC=0,
NO_SECRET_LEAK, systemd running, 0 failed units, LUKS2, Btrfs, network).
- desktop.profile defaults to mango with Flatpak on; explicit none/minimal/dwl/
full still win. The plan shows the selected session.
- Installed login uses greetd + tuigreet (authentication required, Mango default,
dwl selectable); live autologin is a separate live-only configuration.
- installer/live/build.sh builds a rootless Debian testing rootfs with Mango
(pinned source build), DankMaterialShell (pinned SHA-256 release), Quickshell,
scenefx, Qt Wayland and greetd, then splices it into the base Debian-Live boot
equipment. Live autologin, an Install Phoebus launcher and a serial/VT
recovery console are included and the build fails clearly if a desktop
component is missing. Verified in a graphical seat-providing VM (Mango + DMS +
Quickshell; DMS panel captured).
- Shared desktop assets emitted by phoebus-installer --emit-asset, a graphical
VM driver (live-driver.py), and regression tests for defaults/overrides,
login, live/installed separation and the live ISO guards.
- Docs updated: ADR 0005/0009, STATUS, HANDOFF, CHANGELOG, ROADMAP, DEVELOPMENT
and VM-BOOT-VERIFICATION.
- Mango + DankMaterialShell desktop option (desktop.profile = "mango") through
the GURU overlay with scoped ~amd64 keywords, a sealed session entry point and
a dwl fallback session (ADR 0009).
- Coherent rollback/recovery: coordinated @ + @var snapshots, fstab and BLS
root-subvolume rewriting, matching-kernel selection, snapshot recovery entry,
retention/space gates and sys undo (ADR 0007).
- Installed assistant (sys ask) with an OS-level systemd sandbox boundary and
fail-closed typed plans; resolved package effects bound to approval.
- Nix build isolation enforced (sandbox, no fallback) plus lifecycle/cleanup.
- Desktop helpers (menu/lock/idle), transaction log, release gates with atomic
publish and signing helpers, and a Debian-Live appliance VM harness.
Nix is on by default (NIX_ENABLED=no opts out); a desktop VM verified
nix-daemon active and 'nix shell nixpkgs#hello' -> Hello, world!. Create
/nix/var/nix/daemon-socket (the unit's ConditionPathIsReadWrite) and the
.wants links. finalize now runs sync before unmounting so the session script
and exported log are durable across a forced poweroff.
A binary ebuild is impossible (the upstream installer has no DESTDIR and runs
nix-store --load-db against the real root), so bootstrap the pinned,
SHA-256-verified official release with discrete commands in the target chroot
(no curl|sh, no sh -c): store copy, DB load, nixbld users, profile wiring and
nix-daemon units. Gated behind packages.nix (default off) until VM-verified.
Add an OpenAI-compatible provider layer (DeepSeek, OpenAI and a test
transport) that sends only bounded system facts and injects the API key via a
curl config on stdin, never in argv, config or logs. Extend the typed proposal
schema with scoped package.use, build jobs and binary-package preference; every
change now needs a non-empty reason and duplicates are rejected. Wire
--ai/--ai-proposal-file/--ai-facts into the CLI and add provider selection to
the TUI. Deterministic validation and review are unchanged: the model never
reaches the executor and the no-AI path keeps working.
Drop the unused installkernel uki flag (BLS uses uki_generator=none), remove
the empty wireplumber line and the duplicate pipewire entry, and add scoped
package.use plus explicit build jobs to the typed config. The binhost URI is
now derived from the selected profile when unset. No change weakens signature
verification or enables ~amd64.
Initial public import of the proven Bash installer (installer/) and the production Rust workspace (installer-rs/). The reference ISO, build output and local agent transcripts are gitignored.
Verified: installer/tests/run_tests.sh and cargo test --workspace both pass.