feat(proxy): add OpenSandbox runtime backend#1233
Merged
zhongwen666 merged 15 commits intoJul 17, 2026
Merged
Conversation
zhongwen666
reviewed
Jul 14, 2026
zhongwen666
reviewed
Jul 17, 2026
Contributor
Author
|
已补齐 |
zpzjzj
force-pushed
the
feat/opensandbox-runtime-backend
branch
from
July 17, 2026 06:07
393fe64 to
5cc2470
Compare
zhongwen666
approved these changes
Jul 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification
ruff format --check: passedruff check: passedasyncio.timeout, which requires Python 3.11)origin/master...HEAD: no actionable correctness findings after fixing path-prefix escape and reserved WebSocket-header handling found during the final security passLive Managed OpenSandbox-Compatible Endpoint E2E
Validated locally against a managed OpenSandbox-compatible endpoint with
opensandbox==0.1.13, using Keychain-only credential injection (no credential written to files or logs).Pending->Runningrunningcheck=Truenon-zero exit propagationUploadFile.filewithout whole-file buffering; remote SHA-256 matched locallyThe service proxy keeps the SDK endpoint as the routing source of truth: a path-prefixed endpoint retains its path/query prefix, while any scheme-less endpoint receives the configured protocol. Request paths are appended beneath that endpoint, endpoint-required headers override client headers case-insensitively, and WebSocket URLs use the corresponding
ws/wssscheme. Relative path segments and reserved WebSocket handshake headers are rejected/filtered so the endpoint capability boundary cannot be escaped or corrupted.The live run found and this branch fixes two SDK integration gaps:
get_file_inforeports missing paths asFILE_NOT_FOUNDrather than an empty mapping, and FastAPISpooledTemporaryFileneeds a streamingIOBaseadapter for SDK 0.1.13.Live Community OpenSandbox Docker E2E
Validated locally against
opensandbox/server:latestwith the Docker runtime,opensandbox/execd:v1.0.19, andopensandbox==0.1.13after restoring the existing Colima environment.Running, with cleanup completed after each runhost:port/sandboxes/{id}/proxy/{port}OpenSandboxProxyService.http_proxyreturned 200OpenSandboxProxyService.websocket_proxyechoed the frame successfullyDelivery plan
To keep each review coherent while treating persistent sessions as a required capability, the remaining work is ordered as follows:
create_session/run_in_session/close_session, persist the(sandbox_id, ROCK session name) -> OpenSandbox session idmapping in Redis for multi-worker safety, and clean mappings on close/delete/expiry. This is a required follow-up rather than an optional last-mile enhancement.The user-facing guide is intentionally last so it documents the stable post-session behavior instead of publishing a limitation that the immediately following PR would invalidate. To minimize review churn, feedback and CI fixes within each PR will be accumulated into a consolidated push where practical.
Deferred from this PR
Refs #1202