Some checks are pending
ci / test (push) Waiting to run
Record the disposable-VM evidence for the AI-first install workflow: the deterministic install, the explicit --portage install/remove journey with a protective snapshot and durable history, the no-model offer, the read-only investigation actions, and the 19/19 acceptance matrix. Note the AI-selected journey as the remaining gate (needs a connected provider).
119 lines
6.7 KiB
Markdown
119 lines
6.7 KiB
Markdown
# 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-24), AI-first package installation:
|
|
the shared `sys install` workflow, bounded AI investigation, deterministic
|
|
proposal validation, explicit backend flags and truthful install transactions.
|
|
- **Current focus:**
|
|
1. **Shared install workflow** (`phoebus-executor::install`, ADR 0013):
|
|
identify → evidence → AI investigation → deterministic validation/effects
|
|
→ review → approval → execute → verify → history. Used by
|
|
`sys install`, `sys ask install ...` and the explicit backend flags.
|
|
2. **Bounded investigation** (`phoebus-ai::install`): the model may request
|
|
typed read-only evidence (`discover_candidates`, `inspect_candidate`,
|
|
`check_backend`, `inspect_installation`) and ask one bounded question
|
|
before proposing; turn/request/size limits and repeated-request detection
|
|
bound it. A rejected proposal is revised with the resolver's finding.
|
|
3. **Deterministic authority**: `validate_proposal` re-resolves the candidate
|
|
against real metadata (fabrication, staleness, ambiguity and duplicates
|
|
are refused), maps it to the existing broker action, and binds approval to
|
|
a digest that is revalidated before execution.
|
|
4. **Explicit flags**: `--portage/--flatpak/--nix/--snap/--appimage/--ebuild`
|
|
bypass the model, are mutually exclusive and never fall back.
|
|
5. **No-model path**: an unqualified install with no provider prints the
|
|
deterministic selection and explicit commands and installs nothing.
|
|
6. **Transactions**: `transaction::begin`/`finish` record an in-progress
|
|
transaction before the mutation; installs verify identity/version after.
|
|
7. **Real install facts**: `/etc/phoebus/install.toml` is now written by the
|
|
installer and read by `sys`; facts add free space, Wayland, usable lanes,
|
|
saved preferences and recovery capability.
|
|
- **Last verified (this session):**
|
|
- `cargo fmt --all -- --check`, `cargo clippy --workspace --all-targets`
|
|
(no new warnings) and `cargo test --workspace` pass.
|
|
- New tests: AI loop steps/bounds/repetition/revision/provider-failure;
|
|
resolver fabrication/ambiguity/duplicate/changed-version; action mapping;
|
|
transaction begin/finish (ok and failed); `sys_cli` flag conflicts,
|
|
no-fallback, no-model offer, help; target-vs-host facts.
|
|
- `installer/tests/vm/test_vmsafety.py` (18 tests) passes with the extended
|
|
`sys-acceptance.sh`.
|
|
- **Disposable VM (deterministic minimal install, `--no-ai`)**: completed
|
|
with `INSTALL-RC=0` and installed `/usr/local/bin/sys`; booted detached
|
|
(systemd `running`). `sys install app-misc/hello --portage` produced a
|
|
plan + effects, a protective snapshot, installed and verified it in the
|
|
package database, and recorded a durable transaction that survived a clean
|
|
reboot. `sys remove` succeeded (after fixing unmerge parsing) and the
|
|
acceptance matrix reported `FAIL=0` (19/19). See
|
|
`docs/CHANGELOG.md` and `docs/STATUS.md` for details.
|
|
- **Not yet verified this session:** the **AI-selected** journey
|
|
(`sys install <app>` with a connected model). It is unit-tested with scripted
|
|
transports but was not run against a live provider because no authorised
|
|
provider/credential exists in this environment. The exact command is in
|
|
"Next actions" below.
|
|
- **Public repo:** <https://git.phoebus.club/phoebus/phoebus_os>
|
|
(remote `origin`, SSH port 2222).
|
|
|
|
## Next actions (in order)
|
|
|
|
1. **AI-selected install journey (needs an authorised provider)**: boot the
|
|
installed disposable disk, serve the built `sys` and a 0600 key file, then:
|
|
```sh
|
|
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>
|
|
```
|
|
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.
|
|
2. **Rerun the deterministic journey on a fresh disk** if the harness changes:
|
|
```sh
|
|
make static
|
|
cp installer-rs/target/x86_64-unknown-linux-gnu/release/{phoebus-installer,sys} /home/dominic/vmlab/serve/
|
|
cp installer/tests/vm/{install.sh,sys-acceptance.sh} /home/dominic/vmlab/serve/
|
|
OVMF_CODE=/usr/share/OVMF/OVMF_CODE_4M.fd OVMF_VARS=/usr/share/OVMF/OVMF_VARS_4M.fd \
|
|
DISK=/var/tmp/phoebus-vm/disks/<qcow2> \
|
|
ISO=/home/dominic/Source/phoebus_os/livegui-amd64-20260913T163055Z.iso \
|
|
KERNEL=/var/tmp/live-boot/gentoo INITRD=/var/tmp/live-boot/gentoo.igz \
|
|
INSTALL_URL=http://10.0.2.2:8000/install.sh \
|
|
python3 installer/tests/vm/serial-driver.py install
|
|
# then serial-driver.py boot with BOOT_CHECKS running the matrix
|
|
```
|
|
3. **Rollback VM acceptance** (`serial-driver.py rollback`) remains unrun.
|
|
4. **NVIDIA hardware acceptance (BLOCKED)**: needs an NVIDIA GPU.
|
|
5. **Installed Mango desktop** and the **live ISO `gui` journey** remain to be
|
|
re-run.
|
|
|
|
## Known blockers / risks
|
|
|
|
- **A full VM install still takes hours** (base stage ~116 min). Use the already
|
|
installed disposable disk (clone it) for `sys install` journeys 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. `flatpak` and `snap` clients are present on the host (not proof of
|
|
the VM lanes).
|
|
- VM harnesses: `installer/tests/vm/{gui-driver,serial-driver,appliance-driver,live-driver}.py`
|
|
and `sys-acceptance.sh`. `DISK` must be a disposable qcow2; never `/dev/*`.
|
|
- Serve fixtures from `/home/dominic/vmlab/serve` with
|
|
`python3 -m http.server 8000 --bind 127.0.0.1` (reachable as `10.0.2.2:8000`).
|
|
- The static binaries for the VM: `make static` builds `phoebus-installer` and
|
|
`sys` under `installer-rs/target/x86_64-unknown-linux-gnu/release/`.
|
|
|
|
## Definition of a good stopping point
|
|
|
|
- `make test` passes; `docs/STATUS.md` and `docs/CHANGELOG.md` updated;
|
|
`docs/HANDOFF.md` updated; committed (via `scripts/agent-commit.sh`) and
|
|
pushed (`scripts/publish.sh`).
|