phoebus_os/docs/HANDOFF.md
Phoebus 359f083bc2
Some checks are pending
ci / test (push) Waiting to run
test(gui): drive the OpenCode AI step through the real UI
Add an 'opencode' harness mode with a guest-loopback relay (the tunnel
shape), keyboard selection of the OpenCode chip, UI entry of the server/
provider/model (and a 0600 server password), and assertions on the
frontend's secret-free state (tested, validated, applied). Record the VM
evidence and the remaining not-run full-install gate.
2026-09-22 03:32:07 -07:00

5.7 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-22), OpenCode adapter.
  • Current focus: Implemented a real OpenCode agent-server adapter (phoebus-executor::opencode_client) that speaks the session/message protocol over curl and implements ModelTransport, wired into canonical config (ai.backend = "opencode"), the GUI ("OpenCode agent" + Test connection), the installer CLI (--ai-backend opencode, --opencode-test) and sys ask. The mandatory-AI gate now requires a validated interaction with invalidated state. The probe/transport were hardened (loopback/TLS policy, DNS pinning, status checks, auth), and the GUI harness gained exact-session and frontend-state assertions.
  • Last verified (this session):
    • 336 Rust tests + 16 harness tests green; fmt/clippy clean.
    • Real inference through opencode 1.18.32 with deepseek-v4-flash; --opencode-test → {"phoebus":"ok"}; the GUI bridge ai_check applied 8 reviewed changes; sys ask proposed and ran a read-only action.
    • Auth: none → authentication_required, wrong → authentication_rejected, correct → model_catalog + successful inference. Plain http to a LAN host → insecure_transport, exit 1, no request sent.
    • 7 real-HTTP integration tests (status, chunked multibyte, oversize, redirect, disconnect, auth) and 2 env-gated live tests.
    • GUI acceptance in a disposable VM: gui-driver.py opencode passed 17/17 (selected OpenCode, entered the endpoint/model through the UI, real model response + validated proposal); gui-driver.py gui passed 25/25. ISO sha256 4db98db3…, static binary sha256 72c2dcd0….
  • Not yet verified this session: the full graphical installation through OpenCode past the AI gate (disk/account/review/ERASE/install/detached boot), and a separate physical computer. The pinned manifest is v1.18.31 while the tested binary is 1.18.32. On this server use deepseek-flash; the model must match the server's catalog (the GUI default deepseek-chat does not exist on it).
  • Public repo: https://git.phoebus.club/phoebus/phoebus_os (remote origin, SSH port 2222).

Next actions (in order)

  1. Complete the graphical install with a real model: download a small local OpenAI-compatible model (or supply a 0600 provider key), then run gui-driver.py gui through disk/account/review/ERASE/install/rebooot twice on fresh qcow2 disks and record the passing journeys. The current automated journey passes to the AI gate only.
  2. Installed Mango desktop: install the default profile in a graphical VM and verify the panel/launcher/terminal/audio/network/lock/idle, the dwl fallback, and the welcome/installer absence on the installed system.
  3. Rollback VM acceptance: deliberately break an update, run sys undo, reboot detached, verify /var/db/pkg matches /, then boot the recovery entry with no network or model (ADR 0007).
  4. Narrow the live broker privilege: replace the live-only NOPASSWD: ALL rule for the GUI bridge with the smallest practical command-scoped rule once a safe sudoers form is verified (ADR 0011 context).
  5. Physical-seat desktop: run phoebus-session on a real VT/seat and check phoebus-menu, phoebus-lock, phoebus-idle, kitty, XWayland, the polkit agent, logout/reap and reboot (docs/DEVELOPMENT.md).
  6. Release gates on a CI runner: phoebus-release gates --execute and publish once a runner exists; no gate has executed.

Known blockers / risks

  • No live DeepSeek/OpenAI key and no local model are available; the full GUI install past the AI step and two fresh-disk graphical installs are NOT verified (normal installation requires a connected model). The AI step is verified as a blocked prerequisite and with a fixture transport.
  • Installed Mango (GURU + compiled Quickshell/DMS) is not VM-verified; nor is the dwl fallback session.
  • Rollback and the AI sandbox are implemented and unit-tested but not VM-verified. NVIDIA is not verified.
  • A separate physical computer for the OpenCode transport test is not available (BLOCKED); a forwarded-hop + unauthenticated-LAN-refusal host-local test was done instead.
  • The GUI bridge reaches Quickshell via Process + /usr/bin/sudo -n; it relies on the live user's passwordless sudo. The live sudoers rule is still NOPASSWD: ALL (live-only); narrowing the broker permission is future work.
  • Harness artifacts live under /var/tmp/phoebus-vm/ (outside git): results.json, screenshot-manifest.json, report.html, screenshots.

Environment notes

  • Dev host: Ubuntu 26.04. QEMU/OVMF/xorriso/rustfmt/clippy/ImageMagick present.
  • Debian-Live base ISO is cached at /home/dominic/debian-live-standard.iso (matches installer/live/base.sha256); the appliance ISO builds without root.
  • Local QML iteration: /tmp/opencode/run-qml.sh <config-dir> runs a config on a nested Mango over the host X11 using the built rootfs libraries, and grim captures it. The sanctioned verification is the disposable VM.
  • VM harnesses: installer/tests/vm/gui-driver.py (graphical live ISO: gui/install/boot), appliance-driver.py, serial-driver.py. DISK must be a disposable qcow2; never point it at /dev/*.
  • Serve the install fixtures from /home/dominic/vmlab/serve with python3 -m http.server 8000 --bind 127.0.0.1 (reachable as 10.0.2.2:8000).

Definition of a good stopping point

  • make test passes; docs/STATUS.md and docs/CHANGELOG.md updated; docs/HANDOFF.md updated; committed and pushed (scripts/agent-commit.sh + scripts/publish.sh).