SDK/CLI: non-default streaming mode for sandbox image builds (cas-streaming)#741
Open
diptanu wants to merge 3 commits into
Open
SDK/CLI: non-default streaming mode for sandbox image builds (cas-streaming)#741diptanu wants to merge 3 commits into
diptanu wants to merge 3 commits into
Conversation
tl sbx image create --streaming opts a build into the content-addressed streaming rootfs format. The SDK sends rootfsFormat=cas-streaming on the prepare request (the prepared response — including the staged manifest upload and rootfsFormat — flows into the builder spec verbatim), rejects registered-template FROMs up front (streaming builds are base-only), and completes with the staged-artifact metadata: snapshot_format_version content_addressed_streaming_v1, the staged image URI, and the builder-reported image size. The registered identity (manifest URI + image sha) is produced by the platform's trusted verify-and-admit, so the SDK emits an explicit "verifying and admitting" status while the synchronous completion runs. The node and python bindings expose the same non-default streaming option. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
cas-streaming /complete now answers 202 {status: ingesting} while the
trusted service runs the admission as a job; the SDK polls
GET sandbox-template-builds/{buildId} every 3s (30 min cap) until the
build settles, returning the registered template from the completed
status and surfacing the admission error on failure. ext4 builds keep
the synchronous 200 path.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The sandbox_templates integration test constructed the options struct without the new streaming field, failing cargo test compilation in CI. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
SDK half of the content-addressed streaming rootfs build contract (design: tensorlakeai/compute-engine-internal#1121). Opt-in, non-default: existing builds are unchanged.
tensorlake sbx image create --streaming(CLI) /streamingoption (SDK, node + python bindings): requestsrootfsFormat: cas-streamingat prepare time.complete_request_from_metadatareads the builder's prepare metadata (manifest URI, image sha, image size,rootfs_disk_bytes) instead of the.tlsnapfields./completenow returns 202 for streaming builds while the trusted ingest service verifies and admits chunks; the SDK polls the build endpoint (wait_for_build_completed, 3 s interval, 30 min cap) until the build finalizes or fails.Once built, streaming images are handled by the dataplane transparently — no server/executor opt-in flags.
Testing
cargo build -p tensorlake -p tensorlake-cliclean after rebase onto main.cargo test -p tensorlake --lib sandbox_images: 28 passed.Companion PRs: tensorlakeai/firecracker#40, tensorlakeai/platform-api#572, compute-engine-internal (dataplane/server/ingest service).
🤖 Generated with Claude Code