Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

docs(regression): macOS/Lima incus connection + clearer port-preflight error (#538)

Call Whitec2a28c087df0
diff --git a/AGENTS.md b/AGENTS.md
index 9cff7b7d5..45fda498e 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -106,6 +106,28 @@ Standard path:
- default command: `./scripts/run_regression.sh`
- direct runner: `python3 scripts/incus_regression.py up --target master`
+Connecting to Incus on macOS (Lima):
+
+- macOS has no native Incus daemon. The regression environment runs inside the
+ Lima VM `avibe-incus-regression`, and `incusd` there listens **only on its unix
+ socket** (no TLS `core.https_address`, no guest→host socket forward). So a plain
+ host `incus` (default `local` remote) has nothing to dial and the runner aborts
+ with "you must connect to a remote server".
+- Drive the runner through the VM with the `INCUS_CMD` knob (the runner splices it
+ in place of `incus`):
+
+ ```
+ INCUS_CMD="limactl shell avibe-incus-regression -- sudo incus" ./scripts/run_regression.sh
+ ```
+
+ Optionally add the Lima user to the `incus-admin` group inside the VM to drop the
+ `sudo`. This is the supported way to run the regression CLI on macOS — not a hack.
+- Symptom when this is missing: `incus info` fails, so `up` wrongly concludes the
+ instance does not exist, takes the create path, and trips the host-port preflight
+ on the UI port the already-running env is forwarding (e.g. 15130). The fix is the
+ connection above — not removing the preflight, which is correctly skipped once the
+ client can see the existing instance.
+
Rules:
- do **not** use `--reset-config` or `--reset-all` unless the user explicitly requests reset behavior
diff --git a/scripts/incus_regression.py b/scripts/incus_regression.py
index 8eda0f804..234ed99ea 100644
--- a/scripts/incus_regression.py
+++ b/scripts/incus_regression.py
@@ -1340,7 +1340,22 @@ def cmd_up(args: argparse.Namespace) -> int:
runner = Runner(dry_run=args.dry_run)
target_exists = runner.exists(incus("info", remote_ref(args.remote, target.instance), project=target.project))
if not args.dry_run and not target_exists and args.remote is None:
- ensure_host_port_available(target.ui_host, target.host_port)
+ try:
+ ensure_host_port_available(target.ui_host, target.host_port)
+ except RegressionError as exc:
+ # A reachable incus client would have reported the instance as existing
+ # above and skipped this preflight. The usual macOS cause is that `incus`
+ # can't reach the Lima VM daemon, so `incus info` failed and the instance
+ # only *looks* absent — point the operator at the real fix.
+ raise RegressionError(
+ f"{exc}\n"
+ "If this instance already exists, the incus client is probably not "
+ "reaching the daemon (on macOS incus runs in the Lima VM), so the "
+ "earlier `incus info` failed and the instance looks absent. Set "
+ "INCUS_CMD to drive incus through the VM, e.g. "
+ "INCUS_CMD='limactl shell avibe-incus-regression -- sudo incus', so the "
+ "runner sees the existing instance and skips this preflight."
+ ) from exc
seed_requires_env = not args.dry_run and (args.reset_mode != "none" or not target_exists)
if seed_requires_env:
require_runtime_seed_env()