Commit graph

160 commits

Author SHA1 Message Date
fb4dcc5683 docs: record the 2026-09-22 harness, security and polish session
Some checks are pending
ci / test (push) Waiting to run
Update the changelog, status matrix, handoff and VM boot verification with
the 23/23 graphical journey, the hardened harness, the confirmed fixes and
the remaining blocked/unverified gates (full GUI install past AI, rollback,
installed desktop, physical second-computer OpenCode transport).
2026-09-21 20:01:58 -07:00
613e383082 fix(gui): focus the welcome action and refuse silent mid-install exit
The tiled welcome window was not keyboard-focused, so the primary action
had no focus ring and Return did nothing; request activation and force
focus. Refuse Escape during the destructive phase and say the operation
cannot be cancelled. Show the AI connection guidance beside the controls.
Guard the fixes with live_iso tests.
2026-09-21 20:01:58 -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
3d43f8c6c8 feat(executor): add an OpenCode server capability probe
OpenCode is an agent application, not an OpenAI-compatible endpoint. Add
a typed probe over /global/health and /config/providers that distinguishes
disconnected, authentication required, incompatible, reachable-no-model and
ready, and never returns provider credentials. Expose it as
phoebus-installer --opencode-probe. Document the four components, host and
tunnelled remote workflows, and the Phoebus assistant boundary (ADR 0011).
2026-09-21 20:01:44 -07:00
0a6725b049 fix(core): refuse symlink escapes in the target root
Reject a symlinked path component while writing beneath TargetRoot
instead of following it, so a planted symlink cannot redirect an
installer write to the host. Cover escaping directories and leaves.
2026-09-21 20:01:38 -07:00
9b5c1155b0 fix(ai): validate provider endpoints and bound the transport
Accept only http(s) endpoints and refuse URLs that could inject curl
config directives. Restrict the transfer to http,https, keep redirects
disabled (so a header cannot follow one to another origin) and bound the
response with max-filesize. Add endpoint and transport regression tests.
2026-09-21 20:01:38 -07:00
d395fd3464 fix(installer): make GUI bridge approvals single-use and bounded
Consume the approval before destructive work and refuse a second
start_install from a retry, a second frontend or a reconnect. Bound
request lines and secret values; reject deeply nested JSON. Add
regression tests for replay, oversized input and nesting.
2026-09-21 20:01:38 -07:00
5ae166e827 fix(executor): revalidate the target disk before partitioning
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.
2026-09-21 20:01:32 -07:00
7e9fa9c2a3 feat(installer): graphical welcome and install wizard over a typed bridge
Some checks are pending
ci / test (push) Waiting to run
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).
2026-09-21 13:13:40 -07:00
0f6d503c2e docs(live): document the PHOEBUS_REUSE_ROOTFS build cache
Some checks are pending
ci / test (push) Waiting to run
2026-09-21 06:47:53 -07:00
bbd3d89d6a feat(desktop): make Mango + DankMaterialShell the default and build a live desktop ISO
Some checks are pending
ci / test (push) Waiting to run
- 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.
2026-09-21 06:47:22 -07:00
639cb330fd docs: record the 2026-09-21 appliance baseline (INSTALL-RC=0, detached boot, initial snapshot)
Some checks are pending
ci / test (push) Waiting to run
2026-09-21 04:22:21 -07:00
6eb4036c22 fix(mango): do not auto-sync GURU before git; verify the shell started
Some checks are pending
ci / test (push) Waiting to run
- Write guru.conf with auto-sync = no so the first emerge --sync (before
  dev-vcs/git exists) only syncs the main tree; GURU is synced explicitly.
- In the Mango session, check dms.service is active after starting
  mango-session.target and fall back to a direct 'dms run' if not.
2026-09-21 03:53:20 -07:00
25f7381b4a feat(desktop): add Mango + DankMaterialShell profile with rollback, assistant and release foundations
Some checks are pending
ci / test (push) Waiting to run
- 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.
2026-09-21 03:46:52 -07:00
b12b2768b4 feat(nix): default Nix on; flush finalize writes before unmount
Some checks are pending
ci / test (push) Waiting to run
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.
2026-09-20 22:35:46 -07:00
fea647ac7d docs: record the rebuilt ISO and the gated Nix bootstrap
Some checks are pending
ci / test (push) Waiting to run
2026-09-20 14:52:18 -07:00
0718bb34e5 feat(nix): gated bootstrap of the pinned Nix release
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.
2026-09-20 14:50:57 -07:00
32a124e3f9 docs: fix handoff numbering
Some checks are pending
ci / test (push) Waiting to run
2026-09-20 14:44:00 -07:00
f8b34635c7 docs: record the mandatory-AI gate, local provider and portals
Note the rebuilt appliance ISO (fec8e312) and the new desktop portals; add
Nix packaging as the top next task since it was deliberately not faked.
2026-09-20 14:43:34 -07:00
3a405dd1e7 feat(installer): require AI to install; add local provider
Installing Phoebus now requires a connected model: the install gate refuses
with no provider unless the explicit break-glass --no-ai (alias --legacy, or
PHOEBUS_NO_AI=1) is used. Add a 'local' provider kind (Ollama/llama.cpp/
LM Studio) with an optional API key and --ai-endpoint override, so a user can
run a model they downloaded; no model is shipped. Desktop installs now include
xdg-desktop-portal + gtk/wlr backends for Flatpak and Wayland apps.
2026-09-20 14:41:53 -07:00
d36b2fe5fe docs: one control plane — sys typed actions, not raw Portage
Some checks are pending
ci / test (push) Waiting to run
The no-model fallback is the Phoebus deterministic CLI (sys) running the same
typed actions the assistant emits, exposed as an explicit non-AI (legacy) mode.
Raw emerge/nix/flatpak remain a last resort rather than the intended front-end.
2026-09-20 14:35:05 -07:00
0c2a6bb9d6 docs: require an AI at install; AI-first system, legacy fallback
Some checks are pending
ci / test (push) Waiting to run
Installing Phoebus now requires a connected model (remote provider or a
user-downloaded local model; none is shipped). The installed system is AI-first
and uses a connected model proactively. It is never required to boot, run or
recover: the deterministic CLI (sys, emerge, nix, flatpak) remains as a
break-glass fallback, and no model ever holds privilege.
2026-09-20 14:33:19 -07:00
9ae86d5234 docs: ship no model; make the assistant model-optional
Some checks are pending
ci / test (push) Waiting to run
The AI assistant stays a defining, always-present subsystem, but Phoebus
ships no model. The user may download a local model or configure a remote
provider; with no model the assistant still explains, plans and applies
deterministic changes and the CLI remains available. Installation requires the
network; the installed system must boot, run and recover offline.
2026-09-20 14:29:59 -07:00
15cc9ec58c feat(sys): add offline Portage install/remove/search commands
Some checks are pending
ci / test (push) Waiting to run
sys install <name>, sys remove <name> and sys search <query> are
deterministic and model-free: Portage resolves a bare name or a full atom.
Adds the remove_package and search_packages typed actions (remove is High risk
and gets the protective snapshot; search is read-only). This is the
old-fashioned fallback so the system stays fully administrable with no LLM.
2026-09-20 14:28:35 -07:00
ab7408cdcf docs: make AI and Nix defining, offline-capable subsystems
AI and Nix are now always-present parts of Phoebus (not optional add-ons):
the assistant ships with a local model so it works offline and in recovery,
and Nix is a second package lane shipped and updated through Portage.
Installation needs the network; the installed system must boot, run and
recover without it. The assistant is the preferred front-end, never a gate:
the deterministic CLI (sys, emerge, nix, flatpak) is always available. The
model still never holds privilege. Records ADR 0006 (package lanes).
2026-09-20 14:27:02 -07:00
27795f7998 docs(live): record the Debian-Live appliance install and detached boot
Some checks are pending
ci / test (push) Waiting to run
The appliance ISO firmware-boots, installs (INSTALL_RC=0, NO_SECRET_LEAK) and
the installed disk boots detached as Gentoo-only (Portage, no apt, systemd
running, 0 failed units). Two anomalies are recorded rather than hidden: the
target hostname and a first-boot DHCP timing observation.
2026-09-20 13:49:49 -07:00
d6fa7c8dce feat(live): build a Debian-Live installer appliance ISO (no root)
Add installer/live/build.sh: overlay the static installer, the OpenCode
manifest and the Debian tools the standard live image lacks (cryptsetup,
btrfs-progs, gdisk, dosfstools, parted, util-linux-extra) onto a Debian-Live
stable base, patch the boot config for a serial console, and preserve the
hybrid BIOS+UEFI boot. The live squashfs is never repacked and libc is never
bundled, so the appliance is unchanged and the target remains Gentoo-only.
Records ADR 0005 and the implementation plan.
2026-09-20 12:49:31 -07:00
8dbf624046 docs: pin the handoff to this session's verification commit
Some checks are pending
ci / test (push) Waiting to run
2026-09-20 06:59:18 -07:00
b2f5181f7f 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.
2026-09-20 06:59:01 -07:00
c6665e550a fix(ai): refuse proposals that weaken required settings
Deterministic review now rejects encryption=none, filesystem=ext4 and the
aggressive kernel profile, so the LUKS2/Btrfs/stability posture cannot be
traded for convenience. A live provider that returns an invalid proposal is
reported and the installer continues with the proven defaults (the explicit
--ai-proposal-file test path still fails loudly).
2026-09-20 05:04:12 -07:00
b120c1e5e4 docs: record AI guidance, desktop reliability and snapshot verification
Update the status matrix, roadmap, changelog and handoff; add the WS4/WS3 VM
evidence and a concise real-VT desktop test procedure.
2026-09-20 05:03:37 -07:00
a20e064680 fix(update): keep fetched distfiles when binary prebuild is skipped
emerge --buildpkgonly refuses while dependencies still need merging, which
is normal for an out-of-date system. Record that as Ready with the fetched
distfiles and the Portage reason instead of a hard Failure, and include the
redacted stderr tail in the state note. The VM harness check timeout is now
configurable.
2026-09-20 05:00:45 -07:00
035826e0f9 test(desktop): functionally verify phoebus-session startup and cleanup
Run the generated session script against stub dwl/helper binaries: helpers
must start only after the Wayland socket exists, the polkit agent must start,
and every helper must be reaped when the compositor exits. A compositor that
dies before creating the socket fails the session loudly.
2026-09-20 05:00:45 -07:00
b45e61e361 feat(ai): guided AI optimization with DeepSeek/OpenAI providers
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.
2026-09-20 04:47:11 -07:00
fcda004834 perf(portage): reduce forced USE overrides and derive the signed binhost
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.
2026-09-20 04:41:52 -07:00
24b7259e56 fix(desktop): make phoebus-session race-free and reap helpers
The session script started waybar/mako/swaybg before dwl created the
Wayland socket and never started the polkit agent. It now starts dwl first,
waits for wayland-0, establishes a session bus and runtime dir, starts the
polkit authentication agent, and kills helpers when the compositor exits.
2026-09-20 04:40:08 -07:00
e82aaba5fb fix(executor): fail closed when a protective snapshot cannot be created
High-risk sys actions now create their protective snapshot inside
actions::execute and abort if the .snapshots subvolume exists but the snapshot
fails, instead of warning and mutating anyway. Corrupt snapshot history is
surfaced as an error rather than being silently treated as empty.
2026-09-20 04:39:23 -07:00
4cdce98e7f docs(migration): record Phases 0-4 complete in the session log
Some checks are pending
ci / test (push) Waiting to run
2026-09-20 04:01:03 -07:00
63c76e4a52 docs(migration): pin the Phase 4 evidence commits 2026-09-20 04:00:33 -07:00
fc64793aec docs: update references after retiring the Bash installer
Point AGENTS.md, README.md and the docs at the Rust-only toolchain and the
moved VM-BOOT-VERIFICATION.md, and drop the Bash installer from DEVELOPMENT.md.
2026-09-20 04:00:19 -07:00
1e5337e7a5 refactor!: retire the Bash installer tree and relocate its docs
Delete installer/bin, lib, tui, config, tests/*.sh and README.md now that the
Rust installer is the only proven path (docs/BASH-MIGRATION.md Phase 4). Move
FINDINGS.md and VM-BOOT-VERIFICATION.md to docs/ and delete the Bash-only
TESTING.md. The disposable VM harness under installer/tests/vm/ is retained.
2026-09-20 04:00:14 -07:00
fbffa5ca8f docs(migration): map the Bash tests to Rust coverage (Phase 3)
Record the test-to-coverage map, mark Phase 3 verified, and drop the Bash
installer from the contributor docs that are not under docs/.
2026-09-20 03:57:22 -07:00
875278b9a9 ci: make the Rust suite the only quality gate
Remove the Bash test suite and shellcheck from CI, the pre-commit hook, the
Makefile, agent-commit and publish. CI now runs cargo fmt, clippy and test.
2026-09-20 03:57:01 -07:00
4c59a1f3ad test(rust): replace the Bash parity test with golden plan tests
parity.rs compared the Rust plan to the Bash installer. The Bash tree is
being retired, so pin the exact Rust plan and destructive preview to golden
files instead (UPDATE_GOLDEN=1 to regenerate).
2026-09-20 03:56:57 -07:00
9bda0496fb docs(migration): pin the Phase 2 evidence commit 2026-09-20 03:55:12 -07:00
54701bd1ef test(vm): record static-binary install and detached boot evidence
The committed harness now installs with the static Rust binary and boots the
disk detached: systemd PID1, running, 0 failed units, LUKS2 unlock, login and
networking. Also fixes the boot check marker so expect() does not match the
shell's echoed command.
2026-09-20 03:54:53 -07:00
f984b01cfc test(vm): drive the static Rust installer from the VM harness
The guest script now fetches and runs the static phoebus-installer binary
instead of the Bash tree, keeping the 0600 secret files and NO_SECRET_LEAK
scan. Docs and the interactive launcher point at the Rust binary.
2026-09-20 03:02:37 -07:00
4071c7d1f5 feat(rust): port OpenCode provisioning with verified checksums
Add phoebus-executor::opencode (manifest parsing, architecture detection,
fetch through Exec, SHA-256 verification, fail-closed placeholders, extraction,
symlink, config writer). Add --bootstrap-opencode to the CLI so the Phase 0
CLI-coverage gate passes.
2026-09-20 03:00:30 -07:00
fb8bdfd633 test(rust): add CLI coverage of the Bash installer surface
Expected to fail on --bootstrap-opencode until Phase 1 adds the flag.
2026-09-20 02:57:57 -07:00
ec88d65af5 build(rust): make the workspace rustfmt and clippy clean 2026-09-20 02:57:18 -07:00