Commit Graph
3 Commits
Author SHA1 Message Date
Devika Verma ab4d6dda77 Sandbox refusal: no reconnect loop; image check follows the driver (docker or podman) and stays out of remote gateways
Review of OPE-205/OPE-206 found three gaps:

- The client reconnects with backoff on ANY socket close, so a session refused for a
  missing image would be retried every few seconds, adding an error notice each time
  and showing the "reconnecting" strip forever. The server now closes a refused session
  with code 4403; the client treats that as final (no reconnect, no strip) and the
  error notice in the transcript says why.
- The image check only knew Docker, while docs promise Docker or Podman. It now maps the
  gateway's driver to its own tool (`docker`/`podman image inspect`, `... pull`), and
  the refusal and the setup hint name that tool.
- A local image store says nothing about a remote gateway's images: when the active
  gateway is remote, the check answers "cannot tell" and never refuses.
2026-09-26 21:54:54 +05:30
Devika Verma 80c72eb580 OpenShell: check for the base image up front instead of hanging the first session on its download (OPE-205)
On first use of the OpenShell sandbox, `openshell sandbox create` pulls the pinned base
image (about 5 GB). OpenWorker waited for that create with a 600 s timeout, inside the
session-start request; on a slow link the pull outlived it, the session failed with
`TimeoutExpired`, the UI showed "Starting OpenWorker..." and retried, and nothing told
the user a one-time download was the cause. Settings > Sandbox said "ready" throughout.

Now the image is part of the readiness check, keyed on the gateway's compute driver
(`openshell gateway info`), not the operating system, since the same image serves
Linux, WSL and macOS and only the Docker driver can be asked:

- `preflight()` raises `OpenShellImageMissing` (an `OpenShellUnavailable`) with the
  `docker pull` command when the driver is Docker and the image is absent, so a session
  is refused in a second with a message that says what to do.
- Settings > Sandbox shows OpenShell as "needs download" with a hint, and keeps it
  selectable; `state` joins each provider row of /v1/settings/sandbox.
- `openworker machine sandbox status` gets a row for the image; `setup` offers the pull
  last, with Docker's own progress and no time limit, on macOS too.
2026-09-26 17:12:05 +05:30
Devika Verma 02f0b4d4c6 Sandbox provider selection, machine status line and the sandbox setup command
Headless: OpenShell when usable, else direct with a loud warning; an explicit setting refuses.
sandbox_provider is machine-level only, so a repository cannot switch the sandbox off.
openworker machine sandbox status|setup is served but not listed in help yet.
2026-09-19 17:16:25 -07:00