Skip to content

Add container providers and Rust/Python/JS/TS APIs - #117

Merged
forhappy merged 45 commits into
mainfrom
codex/container-language-support
Oct 26, 2026
Merged

forhappy merged 45 commits into
mainfrom
codex/container-language-support

Conversation

@forhappy

@forhappy forhappy commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Cellar now has a host-selected container provider boundary shared by Rust, Python, JavaScript and TypeScript. Native Docker/compatible Podman remains the default; experimental E2B and Vercel adapters provide bounded execution and files. The optional Cloudflare runtime runs selected published Containers and Sandbox operations through the same native authority and output gates.

Delivered behavior

Area Result
Portable provider API Lifecycle, commands, binary files, HTTP streams, TCP/WebSockets and capability/fencing discovery; providers advertise their implemented subset
Durable remote bindings Protected SQLite journals, stable identities and parameter digests, revision checks, unknown-outcome reconciliation and no blind mutation replay
Optional Workers/DO runtime Native storage/alarms/gates, module dispatch, namespace and returned-function RPC, readable/writable byte-stream arguments/results, returned HTTP responses and incremental HTTP replies
Container WebSockets Actual handshake headers across four languages; original-event socket pumps, later-caller output proof, bounded queues, cancellation and local WebSocketPair proxy support
Published Sandbox SDK Pinned 0.12.9 package/image runs commands, files, background process discovery and incremental execStream; RPC writeFile/readFile round-trip binary streams through unchanged Cap'n Web
Readability Locked JS/TS formatting, focused runtime modules, README diagrams, code examples and capability/evidence tables

Native-only hosts remain free of JavaScript engines. Cloud credentials and provider selection stay in host configuration.

Acceptance evidence

The new image test uploads 2 MiB + 17 bytes through actual Sandbox SDK RPC. It observes a real temporary-file prefix before releasing the source, requires the destination to remain unpublished until EOF, verifies the SDK byte count and every final byte, downloads the file through unchanged readFile with encoding none, then requires explicit SDK destroy and drained native resources.

The shared WebSocket facade never lends the opening event's native socket handle to a later event. Each later send first proves that caller's writes. Storage sync barriers may overlap while a second actual storage mutation still refuses. Failures after an accepted upgrade or data frame retain uncertain outcomes; no frame is replayed.

Validation and limits

  • All 3 pinned-image scenarios pass, including exact SDK binary upload/download and joined teardown.
  • 74 JS/tool/type tests, 4 pinned-input checks, and 64 Node/V8 library tests pass.
  • The new response fixture and existing WebSocket fixture pass in isolation on the final feature code. A deterministic Node/V8 regression also holds socket output while admitting storage and refusing another storage mutation.
  • Strict adapter all-target Clippy, Rust/JS formatting, module layout, documentation and the native-only dependency guard pass.

Broader native qualification is not green. The latest serial runs passed 85 tests and failed 9 across 7 integration targets. Failures included handler/execution budgets, startup/input deadlines, an alarm HTTP 500 and drainage. Other qualification jobs and disk traffic were observed, but causality is unproven. Isolated passes do not close these failures; no deadline or assertion was relaxed. Details and prior evidence are retained in the ledger.

Merged latest main at ce687427; conflicts preserve both provider tests and binding examples. JS/TS binding builds, Cargo metadata, adapter Clippy, Rust format/layout (1,156 sources), docs and the engine-free dependency guard pass after merge.

Remaining priorities

  1. Reproduce and resolve the broader native deadline/drainage failures before full-profile or release claims.
  2. Request transfers and HTTP-message RPC arguments; returned Response and binary SDK download now have native/image evidence.
  3. Published Containers sleep/wake and hooks, upgraded Worker/DO forwarding and previews.
  4. Named portable bindings, reconnect/expiry/orphan handling and stronger remote fencing.
  5. Independently pinned Sandbox 1.x, Daytona/Modal, Dynamic Workers and optional hosted Cloudflare profiles.

E2B/Vercel live-account qualification is deferred until the user's configurations are supplied. Their protocol peers do not establish live service qualification. The complete SP-01–SP-10 goal remains incomplete, and the full Cloudflare baseline retains conformance: not_run until all required operations, lifetimes and failure cases are qualified.

Pin Prettier and check owned sources in CI. Keep private factories embeddable and upstream input pins unchanged. Extract the standalone package verifier so its code is formatted too.
Workers reads running synchronously, while provider execute may need I/O. Keep the observation explicit and bound to native invocation authority.
Execute delegates on the original native event, with owned leases, bounded handles and mailboxes, shared byte reservations, and producer output proof. Close unpublished exports when result publication fails.

Qualify unchanged Sandbox SDK/image exec, files and background process routes. Restrict test network cleanup to verified empty bridges owned by that test host. Broader RPC and sandbox-provider profiles remain incomplete.
Let the published Sandbox SDK consume incremental output under the original event authority. Bound reads and cleanup across language facades, and give the one-shot fence helper room for existing nftables rules.
…age-support

# Conflicts:
#	crates/cellar-javascript/tests/support/native.rs
Retain original producer authority and output proof through native leases. Negotiate producer/consumer byte budgets and join reader cancellation, disposal and lease loss.

Separate response writes and EOF waits from local storage mutation admission. Pending output previously refused independent waitUntil writes with ConcurrentMutation; the reproduced native regression now passes with output gates intact.
Use native leases and producer output proof for bounded writes, close and abort. Preserve aliases, backpressure and joined cleanup across mixed readable/writable results.

A later frame refusal after accepted frames now reports unknown effects for the composite write. Qualify native binary persistence, held acknowledgements, partial failures and stale writers; retain explicit stream-input and SDK upload gaps.
Keep stream producers in their original event. Use native leased
controls for bounded backpressure and joined caller cleanup.

Validate input errors before nesting their encoded frames so producer
stacks cannot cross the session.
Keep container WebSocket I/O in its opening event and prove later callers before sending. Preserve handshake headers across language facades and bound local proxy queues. Qualify the unchanged pinned SDK and image with a gated binary upload and joined cleanup.
@forhappy
forhappy merged commit 80026d1 into main Oct 26, 2026
14 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant