8.5 KiB
8.5 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.
- Last updated: this session (2026-09-25), the three remaining administration defects from the latest review: (1) bind privileged execution to the actual approved plan via a broker-controlled approval ledger, (2) make personal settings work from a normal desktop account in user-owned storage, and (3) carry reviewed effects through execution and finish every started transaction truthfully. See ADR 0014.
- Current focus:
- Approval ledger (
phoebus_installer::approval, ADR 0014):- The plan's integrity seal (actions, per-step effects, candidate, target
root, initiating uid, expiry) is the binding fingerprint and the
O_EXCLconsumption key in a root-owned ledger (/var/lib/phoebus/approvals, 0700 / 0600). execute_plan_privilegednow takes the reviewed digest and passes it tovalidate_prepared_plan(..., Some(expected_digest), ...). The digest travels across authentication independently of the plan file (sys --broker --execute-plan <id> --plan-uid <uid> --approval-digest <sha256> --root <root>).- Replacement under the same identifier is refused even when resealed with a
valid checksum; replay is refused even after the user deletes every file
in their own plan directory; concurrent submissions allow one execution;
a crash leaves a reconciled
interruptedrecord.reconcile_interruptedruns at broker startup. - The initiator is derived from
PKEXEC_UID(approval::broker_initiator_uid);--plan-uidis untrusted input. Authentication precedes the ledger claim, so refusal consumes nothing.
- The plan's integrity seal (actions, per-step effects, candidate, target
root, initiating uid, expiry) is the binding fingerprint and the
- User-owned personal settings (
phoebus_executor::personal):UserStorageresolves the initiating user (PHOEBUS_UID→SUDO_UID→PKEXEC_UID→ effective uid; home from/etc/passwd) and writes 0600 in 0700 atomically.- Personal preferences →
~/.config/phoebus/package-preferences.toml; proactive snooze/dismiss →~/.local/state/phoebus/proactive-state.toml(bounded). System defaults remain/etc/phoebus/..., changed only viaset_package_preference { system_wide: true }through the broker. chooser::load_preferencesmerges system < personal (personal wins, per-app union); proactive reads the legacy root-owned file only as a migration fallback. Bridge failures are surfaced; the QML notifies on failure and the profile combo now uses the exact serde values.
- Reviewed effects + terminal transactions (
service::execute_prepared):- Reviewed per-step effects are carried forward;
resolve_effectsis now only evidence compared withphoebus_core::effects::approval_holds(earlier-step-introduced targets are the only allowance). A material change aborts withstale plan; only Portage actions are compared (other lanes are validated byvalidate_prepared_plan). - Every path after
transaction::beginreaches a terminal result; effect resolution failure, stale plan, action failure and verification failure are recorded with per-action outcomes and the snapshot retained.
- Reviewed per-step effects are carried forward;
- Approval ledger (
- Last verified (this session):
cargo fmt --all -- --checkclean.cargo test --workspace: 582 passed, 0 failed, including new privileged entry-point regressions: replacement during authentication, recomputed checksum, deleted user plan+claim replay, concurrent execution, wrong caller/root, expiry, interruption reconciliation, effect drift, effect resolution failure afterbegin, and later-step failure after an earlier success.cargo clippy --workspace --all-targetsruns (exit 0; only the pre-existingresult_large_err, one arg-count and oneDiskPhaselints remain).- Static
sys(crt-static) builds (static-pie, 6.4 MiB). - Host-level
sysCLI tests: system-wide preference refused without root; personal preference saved to user storage without touching/etc.
- Not yet verified this session (BLOCKED):
- Installed-VM journey and the 12-step acceptance list. The existing
disposable installed disk (
/var/tmp/phoebus-vm/disks/test-disk.qcow2) reaches the LUKS prompt but no passphrase in this environment opens it: the harness default (phoebus-luks-test, which is also the content of/home/dominic/vmlab/serve/luks.pw) is rejected, and no other credential is available. Do not guess or brute-force. - No AI provider credential is present; do not invent one.
- A fresh disposable VM install would verify the installed journey but takes ~2 h (disk space is tight, 24 GiB free), so it was not attempted in this pass.
- Installed-VM journey and the 12-step acceptance list. The existing
disposable installed disk (
- Public repo: https://git.phoebus.club/phoebus/phoebus_os
(remote
origin, SSH port 2222).
Next actions (in order)
- Unlock or rebuild the installed VM (blocker). The installed disk reaches the LUKS prompt but its passphrase is unknown; the committed harness default is rejected. Either supply the real passphrase or perform a fresh disposable install (~2 h) to obtain an installed system, then run the full 12-step acceptance list below.
- Installed
sysacceptance on the booted disk:
The new broker behaviour (replacement during authentication, replay after deleting user plan state, cancellation) is already covered by# serve the static sys first: cp installer-rs/target/x86_64-unknown-linux-gnu/release/sys /home/dominic/vmlab/serve/ env DISK=/var/tmp/phoebus-vm/disks/<clone>.qcow2 \ OVMF_CODE=/usr/share/OVMF/OVMF_CODE_4M.fd \ OVMF_VARS=/var/tmp/phoebus-vm/OVMF_VARS.fd \ BOOT_CHECKS='... curl .../sys ...; SYS_BIN=/tmp/sys bash .../sys-acceptance.sh ...' \ python3 installer/tests/vm/serial-driver.py bootphoebus-installerunit tests; the installed run confirms the sealed elevation path and the personal-preference acceptance case. - AI-selected install journey (needs an authorised provider): boot the
installed disk, serve the built
sysand a 0600 key file, then:
Confirm the model requests evidence, the resolver confirms the candidate, the plan is presented before approval, and the transaction is recorded. No credential is available here; do not invent one.sudo sys --ai-provider deepseek --ai-api-key-file /run/phoebus/ai.key \ install <application> # and the no-model control in the same run: PHOEBUS_AI_PROVIDER= sudo sys install <application> - Rollback VM acceptance (
serial-driver.py rollback) on a cloned disposable image of the installed system. - NVIDIA hardware acceptance (BLOCKED): needs an NVIDIA GPU.
- Interactive graphical user session login into Mango / DankMaterialShell under a physical seat or nested Wayland compositor.
Known blockers / risks
- A full VM install still takes hours (base stage ~116 min). Use the already
installed disposable disk (clone it) for
sys installjourneys rather than a fresh install. - No NVIDIA GPU (and no authorised passthrough).
- Snap needs network and AppArmor for meaningful confinement; the lane detects confinement honestly.
- AppImage provides no sandbox; do not describe it as one.
- Custom ebuilds remain separately reviewed, untrusted artifacts; the install workflow never builds one during investigation.
- OpenCode transport concatenates messages, so multi-turn investigation is best-effort there; the direct providers carry the full conversation.
- Harness artifacts live under
/var/tmp/phoebus-vm/(outside git).
Environment notes
- Dev host: Ubuntu 26.04. QEMU/OVMF/xorriso/rustfmt/clippy/ImageMagick/visudo
present.
flatpakandsnapclients are present on the host (not proof of the VM lanes). - VM harnesses:
installer/tests/vm/{gui-driver,serial-driver,appliance-driver,live-driver}.pyandsys-acceptance.sh.DISKmust be a disposable qcow2; never/dev/*. - Serve fixtures from
/home/dominic/vmlab/servewithpython3 -m http.server 8000 --bind 127.0.0.1(reachable as10.0.2.2:8000). - The static binaries for the VM:
make staticbuildsphoebus-installerandsysunderinstaller-rs/target/x86_64-unknown-linux-gnu/release/.
Definition of a good stopping point
make testpasses;docs/STATUS.mdanddocs/CHANGELOG.mdupdated;docs/HANDOFF.mdupdated; committed (viascripts/agent-commit.sh) and pushed (scripts/publish.sh).