phoebus_os/docs/CHANGELOG.md
Phoebus b12b2768b4
Some checks are pending
ci / test (push) Waiting to run
feat(nix): default Nix on; flush finalize writes before unmount
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

169 lines
8.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Changelog
All notable changes are recorded here. The authoritative history is `git log`;
this file is the curated, human-readable summary.
Format: Keep a Changelog. Dates are UTC.
## Unreleased
### Added
- **Nix bootstrap (on by default, VM-verified).** `phoebus-executor::nix`
fetches the pinned, SHA-256-verified official Nix release and bootstraps it
into the target with discrete commands (store copy, `nix-store --load-db`,
`nixbld` users, state dirs, profile and daemon units). A desktop VM confirmed
`nix-daemon.service` active and `nix shell nixpkgs#hello` printing
`Hello, world!`. A binary ebuild was ruled out: the upstream installer has no
`DESTDIR` and runs `nix-store --load-db` against the real root.
- `finalize` now flushes the target (`sync`) before unmounting, so late writes
such as `/usr/local/bin/phoebus-session` and the exported installer log are on
disk even after a forced poweroff.
### Changed
- **Installing Phoebus now requires an AI.** The installer refuses an install
with no provider unless the explicit break-glass `--no-ai` (alias `--legacy`,
or `PHOEBUS_NO_AI=1`) is used. A new `local` provider (Ollama/llama.cpp/
LM Studio) and `--ai-endpoint` support a model the user downloaded; no model
is shipped.
- Desktop installs now include `sys-apps/xdg-desktop-portal`,
`xdg-desktop-portal-gtk` and `xdg-desktop-portal-wlr`, so Flatpak and
Wayland apps get file choosers and screencast support.
### Added
- `sys` offline package commands: `sys install <name>`, `sys remove <name>`,
`sys search <query>` (plus the `remove_package`/`search_packages` typed
actions). They are deterministic Portage operations with no model involved —
`emerge` resolves a bare name or a full atom — so the system stays fully
administrable offline and without the assistant.
- **Debian-Live installer appliance** (`installer/live/build.sh`, no root): a
bootable Phoebus installer ISO built by overlaying the static installer, the
OpenCode manifest and the Debian tools the live image lacks onto a Debian-Live
stable base, with a serial-visible auto-booting grub config. The target stays
Gentoo. See `docs/PLAN-DEBIAN-LIVE.md` and ADR 0005.
- Git workflow: committed hooks (`.githooks/`), `scripts/check-secrets.sh`,
`scripts/agent-commit.sh`, `scripts/publish.sh`, `scripts/setup-hooks.sh`.
- Documentation set: `docs/OBJECTIVES.md`, `ROADMAP.md`, `STATUS.md`,
`ARCHITECTURE.md`, `DEVELOPMENT.md`, `CONTRIBUTING.md`, `GIT-WORKFLOW.md`,
`CHANGELOG.md`, and the top-level `AGENTS.md`.
- `.gitignore` covering the ISO, build output, transcripts and secrets.
## 2026-09-20 — AI guidance, desktop reliability, snapshots
### Added
- AI-assisted install guidance: an OpenAI-compatible provider layer for
**DeepSeek** and **OpenAI** plus a test transport
(`phoebus-ai::provider`), credential loading and a curl transport that keeps
the API key out of argv, config and logs (`phoebus-executor::ai`), and CLI
flags `--ai`, `--ai-provider`, `--ai-model`, `--ai-api-key-file`,
`--ai-proposal-file`, `--ai-facts`. The TUI offers
DeepSeek/ChatGPT/without-AI.
- Typed proposal extensions: scoped `package.use`, explicit build jobs and
binary-package preference. Every proposal now requires a non-empty reason and
duplicate/conflicting changes are rejected before anything is applied.
- `sys` history and update preparation are VM-verified on a Btrfs install.
### Changed
- `phoebus-session` now starts `dwl` first, waits for the Wayland socket before
launching waybar/mako/swaybg, establishes `XDG_RUNTIME_DIR` and a session bus,
starts the polkit authentication agent, and reaps helpers on logout.
- Portage policy: the unused `installkernel uki` flag is no longer forced, the
duplicate/empty PipeWire/WirePlumber lines are gone, and the signed binhost is
derived from the selected profile when unset.
- Update preparation records a successful distfile fetch as ready even when
`--buildpkgonly` is skipped because dependencies must be merged first, and the
state note now includes the redacted Portage reason.
### Fixed
- A high-risk `sys` action now creates its protective snapshot inside
`actions::execute` and **fails closed** if the `.snapshots` subvolume exists
but the snapshot cannot be created; corrupt snapshot history is surfaced
instead of being hidden as empty.
## 2026-09-20 — Retire the Bash installer (migration Phases 0–4)
### Added
- `phoebus-executor::opencode`: pinned-manifest parsing, architecture
detection, fetch through `Exec`, SHA-256 verification, fail-closed
placeholder checks, extraction and config writer (7 unit tests).
- `--bootstrap-opencode` on the CLI; `PHOEBUS_OPENCODE_MANIFEST` overrides the
embedded manifest for fixture verification.
- `cli_coverage` and golden plan tests (`plan_golden.rs`, `tests/golden/`).
- `docs/BASH-MIGRATION.md`: the evidence-gated retirement plan and ledger.
### Changed
- The disposable VM harness installs with the static Rust binary; full
encrypted install + detached boot re-verified (systemd PID 1, `running`,
0 failed units, LUKS, login).
- CI, the pre-commit hook, the Makefile and the commit/publish scripts gate on
Rust only (`cargo fmt`, `clippy`, `test`).
- `installer/doc/VM-BOOT-VERIFICATION.md` and `installer/doc/FINDINGS.md`
moved to `docs/`.
### Removed
- The Bash installer tree (entry point, libraries, TUI, configuration, shell
test suite and README), retired in favour of `installer-rs/`. The Bash
reference remains tagged `v0.1.0-bash-reference`. The disposable VM harness
under `installer/tests/vm/` is retained.
## 2026-09-20 — Rust installer parity, desktop, and foundations
### Added
- Rust workspace (`installer-rs/`): `phoebus-core`, `phoebus-executor`,
`phoebus-ai`, `phoebus-tui`, `phoebus-installer` (~9.4k LOC, 45 files).
- Typed `InstallConfig` supporting TOML and the legacy flat format.
- `TargetRoot` (host/target path safety), `SecretString`/`Redactor`,
`DestructiveAuthorization`, central `Exec` command layer with dry-run.
- Storage backend: GPT, ESP, LUKS2, Btrfs layout, fstab/crypttab, swapfile.
- Stage3 fetch with pinned SHA-256 (or signed DIGESTS), Portage configuration,
signed binary use, source builds, kernel, dracut, systemd-boot BLS.
- Desktop/Flatpak: selects `default/linux/amd64/23.0/desktop/systemd`, writes
`/usr/local/bin/phoebus-session`; flathub remote configured.
- Package policy instrumentation: measured compile times parsed from
`emerge.log` (326 entries recorded in the desktop run), persisted to
`/var/lib/phoebus/compile-times.tsv`.
- Snapshots: read-only Btrfs snapshots + TOML transaction history.
- Background update preparation (`--fetchonly` + `--buildpkgonly`).
- Typed `SystemAction` schema, privileged broker, and the `sys` command.
- AI privacy boundary (`PrivacyPolicy`, `ContextBundle`, forbidden paths).
- Release tooling: `phoebus-release` manifest/verify/sha256/assemble.
- ratatui TUI with plan review and ERASE confirmation.
- Recovery BLS entry booting `rescue.target`.
### Fixed
- Subvolumes mounted before creation.
- fstab/crypttab overwritten by stage3 extraction (moved to `fstab_generate`).
- Missing `/var/tmp` breaking `kernel-install`.
- `installkernel` requiring `uki_generator` even for BLS.
- dracut `crypt` module and `systemd-cryptsetup` missing.
- LUKS cmdline using `rd.luks.uuid` instead of `rd.luks.name`.
- dracut UKI missing the kernel command line (BLS adopted).
- `@swap` not mounted, breaking swap activation.
- Portage GPG verify user unable to read the getuto keyring.
- Transient rsync mirror quarantine (sync retries).
- Pillow/HarfBuzz documentation circular dependency.
- Legacy config silently parsed as TOML with defaults.
### Verified
- Full encrypted UEFI install and boot with the ISO detached: `systemd` PID 1,
`is-system-running = running`, 0 failed units, 10.73 s boot.
- Desktop stack headless: dwl, waybar, mako, swaybg, `grim` screenshot,
`wl-copy`/`wl-paste`, `wpctl`, `flatpak 1.18.1` + flathub.
- No secret leakage in the installer log.
## 2026-09-19 — Bash installer prototype and first VM boot
### Added
- Bash + `dialog` installer (`installer/`) with deterministic backend, TUI,
plan/review, dry-run, logging, and destructive confirmation.
- Read-only hardware/disk discovery with live-medium protection.
- GPT/LUKS2/Btrfs backend, systemd stage3, Portage, kernel, systemd-boot,
users/services/desktop modules.
- Unit/regression suite and a disposable VM harness.
### Verified
- First complete encrypted UEFI VM install and boot with the Bash installer.
### Fixed
- The subvolume-ordering, fstab-timing, `/var/tmp`, `rd.luks.name`,
`uki_generator`, cryptsetup, `@swap`, and `local root="$1" dir=...` bugs
(these are the class of bug the Rust port is designed to prevent).