colibri/docs/ISO-ACCEPTANCE-RUNBOOK.md
Sam & Claude df5fbab051
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / markdown (pull_request) Has been cancelled
fix(rc): FreeBSD rc.d deep-audit — cost mode naming, chmod cleanup, health check, docs (Sam & Hermes)
Six bugs found in deep-dive analysis of FreeBSD rc.d/rc.conf after the
live-copy-safe fix (7d23905):

1. colibri_cost_mode → colibri_daemon_cost_mode: naming broke rc.subr
   ${name}_ convention — operator setting colibri_daemon_cost_mode=fast
   in rc.conf was silently ignored. Fixed in rc.d, staging script,
   rc.conf.sample, and all docs.

2. Removed redundant chmod 660 on socket in poststart: Rust code already
   sets 0770 with documented rationale. The poststart override to 0660
   was conflicting, fragile, and had no comment.

3. Removed unnecessary chmod 644 on pidfile in poststart: pidfile lives
   in a 0750 directory — world-readable permission is pointless and
   security-negative.

4. Fixed ISO-SERVICE-LAYOUT.md: socket perms were wrong (said 750, actual
   770), colibri-daemon.pid was labeled supervisor pidfile (it's the
   child), supervisor pidfile was missing entirely, shutdown behavior
   didn't mention custom stop_cmd targeting the supervisor.

5. health_cmd now checks for non-empty daemon response instead of just
   connectvity — a hung daemon accepting connections but returning
   garbage was reported healthy.

6. rc.conf.sample hostname path: $ (hostname) → $(/bin/hostname) for
   consistency with rc.d script and early-boot PATH safety.

Checks: sh -n OK, cargo fmt --check OK, cargo clippy clean,
cargo test --workspace 207 passed.
2026-06-15 08:28:20 +02:00

3.3 KiB

ISO Acceptance Runbook — Colibri Service

Use this after Colibri has been staged into an ISO/image root and booted on FreeBSD.

0. Pre-flight

freebsd-version
id colibri
ls -l /usr/local/bin/colibri /usr/local/bin/colibri-daemon
ls -l /usr/local/etc/rc.d/colibri_daemon
sysrc colibri_daemon_enable

Expected:

  • colibri user exists.
  • binaries are executable.
  • rc.d script is executable.
  • service is enabled for ISO acceptance, or can be started manually.

1. Start service

service colibri_daemon start
sleep 2
service colibri_daemon status

Expected:

  • service reports running.
  • /var/run/colibri/colibri.sock exists.
  • /var/db/colibri/ exists and is owned by the service user.
  • /var/log/colibri/daemon.log exists or is created on first output.

Triage:

tail -100 /var/log/colibri/daemon.log
ls -la /var/run/colibri /var/db/colibri
sockstat -u | grep colibri || true

2. Operator status

colibri status

Expected fields:

daemon/version/host
paths.data_dir
paths.db_path
paths.socket_path
cost.mode
cost.session_max_bytes
cost.max_uncompacted_turns
sessions
agents / agent_list
panes
tasks
scheduler.interval_secs

Confirm cost.mode matches colibri_daemon_cost_mode from rc.conf.

3. Task board check

colibri create-task --title "iso check" --description "direct CLI task"
colibri list-tasks --status queued

Expected: list contains iso check with status queued.

4. Scheduler/intake check

colibri intake-task \
  --title "iso intake check" \
  --description "scheduler should persist this" \
  --capability freebsd

# scheduler tick is currently 30s
sleep 35
colibri list-tasks --status queued

Expected: list contains iso intake check.

5. Glasspane check

colibri snapshot

Expected: valid JSON snapshot. It may have no panes before an agent is spawned.

Optional local fake-agent check if colibri-test-agent is included:

colibri spawn-local /usr/local/bin/colibri-test-agent --session-id iso-check
sleep 4
colibri snapshot

Expected: a pane transitions through idle/working/blocked/done.

6. Stop service

service colibri_daemon stop
sleep 2
service colibri_daemon status || true
ls -l /var/run/colibri/colibri.sock || true
ls -l /var/db/colibri/colibri.sqlite*

Expected:

  • daemon exits.
  • socket is removed or no longer connectable.
  • SQLite DB remains.

7. Restart persistence

service colibri_daemon start
sleep 2
colibri list-tasks --status queued

Expected: tasks created before stop are still present.

8. Live desktop acceptance

Run when the test machine is available:

boot ISO from USB
log into XFCE
launch Zed
run colibri status from terminal
launch colibri-tui if included

Expected:

  • XFCE starts.
  • Zed launches with GPU behavior acceptable for our requirements.
  • Colibri service is running without the TypeScript control service.
  • CLI/TUI remain responsive.

Pass criteria

The ISO candidate passes Colibri service acceptance when:

  • rc.d starts/stops the daemon cleanly.
  • colibri status exposes paths, cost, scheduler, tasks, panes.
  • direct tasks persist to SQLite.
  • intake tasks drain on scheduler tick.
  • glasspane snapshot is reachable.
  • restart preserves SQLite state.
  • no TypeScript control service is required for core supervision.