feat: add apple-container local development provider - #192
Conversation
|
Codex review: needs changes before merge. Reviewed May 31, 2026, 9:50 AM ET / 13:50 UTC. Summary Reproducibility: not applicable. as a feature PR; there is no current-main bug path to reproduce. The contributor supplied live terminal proof for create, SSH readiness, sync, remote command execution, and cleanup on Darwin/arm64. Review metrics: 3 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land the provider-owned adapter after removing the release-owned changelog entry, with maintainers explicitly accepting the documented macOS 26/Apple-silicon and no-egress constraints. Do we have a high-confidence way to reproduce the issue? Not applicable as a feature PR; there is no current-main bug path to reproduce. The contributor supplied live terminal proof for create, SSH readiness, sync, remote command execution, and cleanup on Darwin/arm64. Is this the best way to solve the issue? Yes, mostly: a provider-owned adapter is the maintainable direction because Apple's runtime is not Docker-compatible and core stays provider-neutral. The release-owned changelog line should be removed before merge. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 43eace2507d3. Label changesLabel changes:
Label justifications:
Evidence reviewedAcceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
bb2f253 to
001bafe
Compare
|
Pushed
Gate green after rebase: build, vet, @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
001bafe to
7013b81
Compare
|
Pushed
Gate green: gofmt, build, vet, On the standing [P1]: full in-guest SSH/sync/run still can't be proven from my environment (sandbox containers have no network egress and no sshd-preinstalled image, so the bootstrap can't bring sshd up; lifecycle create/inspect/delete is proven live). Flagging for maintainer scope decision per the review's lifecycle-MVP option. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
[P1] Full SSH/sync/run E2E is now proven on Apple silicon ( This host's Apple containers have no outbound egress (confirmed at routing level — raw-IP TCP fails, not just DNS), so the bootstrap can't Then a full Complete path exercised: reaches SSH ( @clawsweeper re-review |
|
🦞👀 Command router queued. I will update this comment with the next step. Re-review progress:
|
7013b81 to
d1e78bf
Compare
|
Pushed
Gate green: gofmt, build, vet, @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
d1d9090 to
98e297e
Compare
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
98e297e to
c03dced
Compare
|
Pushed
Gate green: gofmt, build, vet, @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Add Apple's `container` runtime (https://github.com/apple/container) as a new built-in SSH-lease provider `apple-container` (aliases `apple`, `applecontainer`). It is a provider-owned adapter under internal/providers/applecontainer that shells out to the `container` CLI for create/list/inspect/delete and runs command exec and file sync over standard Crabbox SSH, reusing the core SSH helpers exactly as localcontainer/asciibox do. Apple's runtime is not assumed Docker-compatible: each container gets its own routable IP on the host bridge, so SSH connects straight to the container IP on port 22 rather than to a published loopback host port. The provider is gated to macOS in Configure/doctor, rejects non-Linux targets and tailscale, and the bare `container` alias is intentionally left to local-container to avoid a collision. Includes config struct/flags/env (CRABBOX_APPLE_CONTAINER_*), config_cmd output, provider registration + alias-collision test, docs (provider page, providers README row, root README row), CHANGELOG entry for 0.23.1, and table-driven unit tests using the injected CommandRunner fake. Closes openclaw#187 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
5e60ac7 to
e815ced
Compare
Summary
provider: apple-containeras a built-in local-development provider for Apple's nativecontainerruntime (https://github.com/apple/container) on Apple-silicon macOSinternal/providers/applecontainerthat shells out to thecontainerCLI for lifecycle (run/ls/inspect/delete) and runs command exec + file sync over standard Crabbox SSH, reusing the core SSH helpers exactly aslocal-container/ascii-boxdoDesign Notes
Apple's runtime is not assumed Docker-compatible, so this does not reuse the
local-containerDocker code. Each Apple container gets its own routable IP on the host bridge, so the SSH target is the container IP on port 22 (CIDR-stripped from the inspectnetworksaddress) rather than a published loopback host port. Apple-specific lifecycle stays behind the adapter; core stays provider-neutral. The barecontaineralias is left tolocal-container; this provider usesapple-container(apple,applecontainer). macOS/Apple-silicon gated (darwin/arm64); rejects non-Linux targets and--tailscale; thecontainer runforces--user rootso the bootstrap can install/start sshd regardless of the image's default user; no secrets passed as CLI args.Config / Secrets
CRABBOX_APPLE_CONTAINER_CLI; config blockappleContainer.*; aliasesapple,applecontainer--os, currentlyubuntu:26.04)Review feedback addressed (ClawSweeper)
main— conflict-free.CHANGELOG.mdentry (now identical tomain).debian:bookworm→ the--os-derived default).darwin/arm64(rejects amd64 Macs);DoctorreusesrequireMacOS().container run --user rootso a non-root image USER can't stall the SSH wait (+ regression assertion).Verification
CI: Go · Docs · Plugin · Worker · Release Check all green.
Live / E2E (full path proven on Apple silicon)
Host:
Darwin arm64, ApplecontainerCLI v0.3.0. Because Apple's sandbox containers on this host have no outbound network egress, the bootstrap can'tapt-getinto the stock image — so this uses the documented prebuilt-image path. The image was built once and loaded into the runtime (reproducible):Full
crabbox run(create → SSH → sync → remote command → cleanup):This exercises the complete path the P1 finding asked for: the container reaches SSH (
state=ready), Crabbox syncs the working tree, executes a remote command over SSH (whoamicrabbox,Linux aarch64, reads the synced file), and cleans up (stopped=true,container lsclean afterward).doctorand the lifecycle (create/inspect/delete) were also verified live earlier.Closes #187
🤖 Generated with Claude Code