Skip to content

desktop: run local Intelligence on OpenBot's engine, on a rootful Podman machine - #862

Merged
dustywusty merged 2 commits into
dustywusty/local-eval-on-upstreamfrom
dustywusty/desktop-engine-choice
Oct 29, 2026
Merged

dustywusty merged 2 commits into
dustywusty/local-eval-on-upstreamfrom
dustywusty/desktop-engine-choice

Conversation

@dustywusty

@dustywusty dustywusty commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Local Intelligence runs on the same container engine as OpenBot, including the Podman machine OpenBot installs on a computer with no engine. Merges into #832's branch (dustywusty/local-eval-on-upstream), the local Intelligence feature.

Needs a CLI release with CopilotKit/Intelligence#2147, which teaches local Intelligence to run on rootful Podman. Until then, the CLI refuses Podman.

Which engine OpenBot uses

Not changed here. It comes from main (#831): Docker if it answers; Docker Desktop if it has run before; otherwise Podman. The engine is saved with the installation and used on every later start. An earlier version of this PR had its own engine choice; that is gone.

What changes

  • Rootful Podman machine (acquire.rs, engine.rs):
    • New machines are created with podman machine init --rootful, because local Intelligence's k3d needs rootful.
    • OpenBot uses the machine's rootful connection (<name>-root). On the bare name, its containers would land in the rootless engine, and the supervisor's Docker socket mount would fail.
    • A rootful Windows machine gets the host-gateway setting in the system config.
  • OpenBot stays where its database is. A rootful machine has two engines with separate storage. If OpenBot's postgres-data volume is in the rootless storage and not the rootful one, OpenBot keeps the bare connection. Releases up to 0.2.0 reached every machine by its bare name, so this keeps those installs on their data.
  • Existing rootless machines are not switched. Local Intelligence refuses on a rootless machine, with a row saying how to switch (Failure::RootlessPodman). Following that advice no longer hides OpenBot's data, because of the point above.
  • One engine for both (local_eval.rs):
    • Every Intelligence CLI process gets COPILOTKIT_LOCAL_ENGINE=docker|podman, matching OpenBot's engine.
    • On Podman it also gets CONTAINER_HOST/DOCKER_HOST for the machine's API socket (Unix socket or named pipe), drops any inherited DOCKER_CONTEXT, and has Podman on its PATH.
    • The engine is recorded when the engine is ready (also on the path where Docker answers right after the install step) and when Start pins it. Before either, it is the installation's saved engine.
    • Nothing secret is added.
  • Install step text: while Podman installs, the row says "Enter your Mac password when macOS asks for it" on macOS (Linux: "your system").
  • Readiness text (localReadiness.ts) no longer says "Docker Desktop".

Verification

  • From desktop/src-tauri: cargo fmt --check and cargo clippy --all-targets -- -D warnings are clean. cargo test --lib --bins and the recorder_host tests pass.
  • From desktop: tsc and Biome are clean, and bun test passes.

Not verified: needs a live run

  1. Fresh Mac or PC with nothing installed:
    • the Podman install prompt;
    • the rootful machine starts, and OpenBot's containers run on it;
    • model sign-in can read and renew the bind-mounted .openbot/model-oauth.json (the server runs as uid 1001; whether Podman's file sharing on macOS, or WSL's on Windows, lets it read the person's 0600 file is untested);
    • local Intelligence starts, and pods reach host.docker.internal;
    • on Windows: missing WSL, plus the gateway setting on a rootful machine.
  2. Machine with Docker Desktop that has run before: stopped → opened, Podman never installed, and the CLI gets COPILOTKIT_LOCAL_ENGINE=docker.
  3. Existing rootless Podman: OpenBot keeps its data, and local Intelligence shows the rootful row.
  4. A first-run race: local setup starting before the engine is ready.

@dustywusty
dustywusty force-pushed the dustywusty/desktop-engine-choice branch from 6f204a8 to dc0f193 Compare October 29, 2026 04:07
@dustywusty
dustywusty marked this pull request as ready for review October 29, 2026 04:19
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T04:23:19.063720Z — Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src-tauri/src/engine.rs
Comment thread desktop/src-tauri/src/local_eval.rs
@dustywusty
dustywusty force-pushed the dustywusty/desktop-runs-images branch from d5335c5 to 621a416 Compare October 29, 2026 06:38
@dustywusty
dustywusty requested a review from samjulien as a code owner October 29, 2026 06:38
Base automatically changed from dustywusty/desktop-runs-images to dustywusty/local-eval-on-upstream October 29, 2026 07:03
…man machine

Which engine OpenBot uses is main's (#831): Docker if it answers, Docker Desktop if it has run
before, otherwise Podman, saved with the installation. This commit no longer changes that choice.

Local Intelligence's k3d needs rootful Podman (CopilotKit/Intelligence#2147), so the machine OpenBot
creates is `--rootful`, and OpenBot addresses it through its `<name>-root` connection, the rootful
engine, both for its own machine and for a running machine it adopts. On a rootful Windows machine
the host-gateway setting goes to the system configuration. An existing rootless machine is never
switched; local Intelligence setup and start decline there instead, with a `rootless-podman`
failure whose row names `podman machine set --rootful`.

Every Intelligence CLI process gets COPILOTKIT_LOCAL_ENGINE for the engine OpenBot runs on, recorded
when the engine is ready (also where Docker answers right after the install step) and when Start
pins it; before either, the installation's saved engine. For a Podman machine it also gets
CONTAINER_HOST and DOCKER_HOST naming the machine's forwarded API, drops an inherited
DOCKER_CONTEXT, and has Podman's directory on PATH. While Podman installs, the step row names the
password prompt macOS or Linux raises. The window's runtime row no longer says Docker Desktop.
@dustywusty
dustywusty force-pushed the dustywusty/desktop-engine-choice branch from a943a7b to 997f04a Compare October 29, 2026 07:06
A rootful Podman machine has two engines with separate storage: `<name>` reaches the rootless one
and `<name>-root` the rootful one. Releases up to 0.2.0 reached every machine by its bare name, so an
OpenBot that adopted a rootful machine, or whose own machine was switched to rootful since, has its
database in the rootless storage. Addressing a rootful machine by `<name>-root` opened that OpenBot
on an empty database. Now a rootful machine keeps its bare connection when OpenBot's
`postgres-data` volume is there and not in the rootful storage, both for a running machine OpenBot
adopts and for its own.

Local Intelligence still runs on the machine's rootful engine, through the API the machine forwards,
when OpenBot stays in the rootless storage of the same machine: one VM, and the only engine there
that Intelligence runs on. That choice is now explicit in `CliEngine::of_with` and has a test.
Following the window's `podman machine set --rootful` advice therefore no longer costs the person
their OpenBot.
@dustywusty dustywusty changed the title desktop: install Podman when a machine has no engine, and run Intelligence on the same engine desktop: run local Intelligence on OpenBot's engine, on a rootful Podman machine Oct 29, 2026
@dustywusty
dustywusty merged commit 046326e into dustywusty/local-eval-on-upstream Oct 29, 2026
25 checks passed
@dustywusty
dustywusty deleted the dustywusty/desktop-engine-choice branch October 29, 2026 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant