Skip to content

Commit 9b9f790

Browse files
authored
fix(dev): extract Docker sandbox runtime from sandbox image (#3422)
Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>
1 parent 58b5f8f commit 9b9f790

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

‎architecture/gateway.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ immediately without a grace period. Finalization is persisted separately from
3737
the exit result; the gateway deletes an ephemeral sandbox only after the
3838
finalized supervisor session disconnects.
3939

40+
Local Docker development builds the supervisor image separately from the
41+
`openshell-sandbox` workload runtime. Cross-platform runtime extraction uses
42+
the sandbox image, which exports `/openshell-sandbox`.
43+
4044
## Configuration Boundary
4145

4246
The gateway accepts exactly schema version 2. Missing, legacy, and future

‎skills/debug-openshell-cluster/SKILL.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ Common findings:
240240
- Sandbox fails before readiness with an OCI workspace validation error: inspect the image's `WorkingDir` using the immutable image ID reported by the gateway. Empty, `/`, and explicit `/sandbox` use the managed `/sandbox` compatibility workspace. Any other workdir must be an absolute normalized directory with no symlink components; the final policy UID, primary GID, and supplementary groups must pass the kernel's effective traverse/write checks, including POSIX ACL and LSM decisions. OpenShell does not create, chown, or chmod a non-default image workdir.
241241
- Docker also rejects an image `VOLUME` that covers the workdir or one of its parents because the runtime would mask the immutable path before validation. Move the `VOLUME` below the workspace or remove the declaration.
242242
- A workdir rejected as a special filesystem or OpenShell control-path collision cannot be made valid with permissions. Move the image workdir away from kernel-backed mounts and the concrete supervisor, TLS, token, runtime, and socket paths named in the error.
243+
- Local Docker gateway setup cannot copy `openshell-sandbox` after exporting a supervisor image: the sandbox runtime and supervisor are separate artifacts. The runtime image must provide `/openshell-sandbox`; the supervisor image provides `/openshell-supervisor`.
243244
- Docker driver cannot initialize because it cannot find `openshell-sandbox`: verify the sibling binary next to `openshell-gateway`, or that the configured `sandbox_runtime_image` contains `/openshell-sandbox`.
244245
- Sandbox never registers: check gateway logs and supervisor callback endpoint.
245246
- Calls to an external tool server fail while the sandbox is Ready: inspect `Tool server connections` in `openshell sandbox get <name>`. For configured MCP-over-HTTP endpoints, JSON output exposes each address together with `last_result` and `last_reported_at` in `endpoint_statuses`. Select the endpoint by host, path, and ports, then check the reported failure boundary. `last_reported_at` records gateway acceptance time and can advance when retained evidence is accepted after a reset. Results do not expire or prove current availability; `HttpResponseReceived` can still contain a tool error. If several paths share a host and port, a failure before the path is known remains in logs. Verify the actual operation when current tool availability matters.

‎tasks/scripts/gateway-docker.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ if [[ "${HOST_OS}" == "Linux" && "${HOST_ARCH}" == "${DAEMON_ARCH}" ]]; then
194194
"${ROOT}/target/${SUPERVISOR_TARGET}/debug/openshell-sandbox"
195195
else
196196
# Cross-compile through the prebuilt-binary staging helper, then use the
197-
# supervisor stage to extract just the openshell-sandbox binary.
197+
# sandbox stage to extract just the openshell-sandbox binary.
198198
#
199199
# This task is gated on a working Docker daemon above, so pin the
200200
# container-engine helper to docker — otherwise it auto-detects podman
@@ -204,7 +204,7 @@ else
204204
if ! CONTAINER_ENGINE=docker \
205205
DOCKER_PLATFORM="linux/${DAEMON_ARCH}" \
206206
DOCKER_OUTPUT="type=local,dest=${SUPERVISOR_BUILD_DIR}" \
207-
bash "${ROOT}/tasks/scripts/docker-build-image.sh" supervisor-output; then
207+
bash "${ROOT}/tasks/scripts/docker-build-image.sh" sandbox; then
208208
rm -rf -- "${SUPERVISOR_BUILD_DIR}"
209209
exit 1
210210
fi

0 commit comments

Comments
 (0)