feat(provider): add OpenComputer sandbox provider (REST API) - #236
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 11, 2026, 3:07 AM ET / 07:07 UTC. Summary Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Review detailsBest possible solution: Retry the Codex review after fixing the execution failure. Do we have a high-confidence way to reproduce the issue? Unclear. The review failed before ClawSweeper could establish a reproduction path. Is this the best way to solve the issue? Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against d56ce8028f30. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat 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
|
…se archive sync ClawSweeper review (PR openclaw#236) flagged two correctness/security blockers: 1. [P1] Forwarded secrets in argv. The env-profile path base64-encoded `--allow-env` values into an `oc exec` command string; base64 is reversible and still appears in the local and remote process argv, breaking the secret boundary. OpenComputer's only command transport, `oc exec --wait`, is a buffered request that cannot carry values off the command line, and the streaming exec mode does not reliably propagate exit codes — so there is no safe non-argv channel for env. Per the reviewer's recommended option, env forwarding is removed entirely: `--allow-env`/`--env-from-profile` are now rejected before any sandbox is created, so secrets never reach an oc call. Removes env.go, the env profile upload, and the writeRemoteFile helper. 2. [P2] `--force-sync-large` unusable. Core gates `--force-sync-large` and `--sync-only` on `FeatureArchiveSync`, which the spec omitted, so large syncs failed before reaching the backend. The provider now advertises `FeatureArchiveSync` (it does real archive sync), `--sync-only` is supported (sync then stop, mirroring modal), and the redundant in-backend reject is dropped in favor of core's spec-aware gate. Adds focused coverage proving the spec permits `--force-sync-large`/`--sync-only` and still rejects `--checksum`. Also considered a direct REST/SDK transport (per maintainer suggestion): there is no official Go SDK (only TypeScript and Python), and the `/api` surface is undocumented for Go, so the supported, e2e-proven `oc` CLI path is retained. Re-verified end-to-end against app.opencomputer.dev: archive sync, --sync-only, and env-forwarding rejection all behave as expected; docs and CHANGELOG updated. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@clawsweeper re-review Addressed both blockers in 989f05e:
PR body updated with redacted live e2e output (sync, --sync-only, env-rejection). |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
…elog edit Second-round ClawSweeper review (PR openclaw#236): - [P2] The env gate rejected on any populated RunRequest.Env, which also caught Crabbox's implicit CI/NODE_OPTIONS defaults and would fail ordinary runs in CI environments. Now only *explicit* env forwarding is rejected (EnvSummary, set by --allow-env/--env-from-profile/CRABBOX_ENV_ALLOW, or any non-default env name) — mirroring the wandb provider's implicit-default carve-out. Implicit defaults pass through (unforwarded) so normal runs work; explicit forwarding still fails before any oc invocation. Adds regression coverage for both paths. - [P3] Reverted the CHANGELOG.md edit; the Unreleased section is release-owned for this review lane (matching the Tenki provider PR, which added no changelog entry). Re-verified e2e against app.opencomputer.dev: a run with CI/NODE_OPTIONS set proceeds normally (exit 0), while --allow-env is rejected before sandbox creation. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@clawsweeper re-review Addressed the second-round findings in 69c424e:
Re-verified e2e: a run with |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Update (cef7d5a): env forwarding now works — safely, off-argv — via the OpenComputer REST API. Per the maintainer suggestion to use the API:
e2e against app.opencomputer.dev: @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Update (c981dc3): reworked to run entirely on the OpenComputer REST API — no This addresses the "can we do it all via the API" direction end to end:
Verified e2e against app.opencomputer.dev: create → file-API sync (files read back) → exec/run → native env → --sync-only → teardown, all REST, no leftover sandboxes. Local gates green (race, docs, coverage 91%). @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Live OpenComputer E2E passed on Proof covered:
Local gates also passed: |
|
@clawsweeper re-review Exact-head closeout proof for
The ClawSweeper retry failed in its review runner without reporting a patch finding; the exact-head repo autoreview above completed cleanly. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
What
Adds
provider: opencomputer(aliasesoc,open-computer): a delegated-run provider for OpenComputer full Linux VMs that runs entirely on the OpenComputer REST API — noocCLI process at runtime. Crabbox owns local config, repo claims, sync manifests/guardrails, slugs, timing, and normalized list/status rendering; OpenComputer owns the VM and transport.Everything is off-argv
X-API-Keyheader. Resolved fromCRABBOX_OPENCOMPUTER_API_KEY/OPENCOMPUTER_API_KEY/ theocconfig file (~/.oc/config.json, written byoc config set api-key). Never persisted in Crabbox config, never on argv.--allow-env/--env-from-profileride in the exec request body (POST /api/sandboxes/<id>/exec/run,envsfield), so values never touch a command line.PUT /api/sandboxes/<id>/files(content in the request body), then extracted in-sandbox. Archive-sync feature advertised, so--force-sync-largeand--sync-onlyare honored;--checksumrejected.Lifecycle (all REST)
POST /api/sandboxes(sizing only as a valid CPU/memory tier, else the service default) → file-API sync →POST .../exec/run(cwd = workspace, env in body, exit code mirrored) →DELETE /api/sandboxes/<id>(skipped with--keep).Why API instead of the CLI
Per the maintainer suggestion: there is no Go SDK (TS/Python only), but the REST surface is complete and was confirmed live. Going API-only removes the
ocbinary dependency, keeps every secret/payload off argv, makes env forwarding native, gives reliable exit codes, and is a net −500 LOC vs the CLI hybrid.Verification
gofmt,go vet,go test -race,scripts/check-docs.shclean; core coverage 91% ≥ 90%.--sync-onlyskips the command,--keepretains, missing key errors before any create).exec/run→ native env (--allow-envvalue printed from inside) →--sync-only→ teardown — all over REST, no leftover sandboxes.🤖 Generated with Claude Code