Add shared cloud snapshot contracts - #1296
Conversation
d0e5335 to
6cee1f5
Compare
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
Reviews (2): Last reviewed commit: "feat(snapshot): add backend-neutral clou..." | Re-trigger Greptile |
9e4b618 to
048759f
Compare
|
66557a4 to
565326e
Compare
|
565326e to
03e542f
Compare
|
|
869415f to
5b956cc
Compare
|
Reviews (7): Last reviewed commit: "fix(snapshot): align backend-neutral con..." | Re-trigger Greptile |
|
Reviews (8): Last reviewed commit: "refactor(snapshot): defer cloud checkpoi..." | Re-trigger Greptile |
|
Reviews (9): Last reviewed commit: "refactor(snapshot): simplify sandbox ide..." | Re-trigger Greptile |
Route snapshot lifecycle through backend-specific implementations and add cloud snapshot contracts and restore support. Preserve typed snapshot references across SDKs, add instance archive export parity, and update tests and documentation.
Retain local artifact path access on backend-neutral snapshot types while returning a typed unsupported error for cloud snapshots. Preserve indexed handle identity separately from its local path and format the Ruby extension for CI.
Model disk snapshots and future checkpoints as tagged cloud request and resource variants. Carry the same kind on operations and keep the Rust SDK builder backend-neutral.
Remove stale snapshot builder compatibility code after the config overlay refactor. Update the MCP submodule to serialize snapshot references while retaining path for path-backed compatibility.
Keep the cloud snapshot request and resource as tagged enums while exposing only the disk variant. Reject future resumable capture in the SDK until checkpoint support is implemented, and align generated bindings and documentation.
Use sandbox_id consistently in cloud snapshot creation and resource details. Align the Rust SDK, serialization coverage, and generated TypeScript contract.
fa29e86 to
834b3ff
Compare
|
Reviews (10): Last reviewed commit: "refactor(snapshot): simplify sandbox ide..." | Re-trigger Greptile |
What changed
microsandbox-typesCloudSandboxSpec.from_snapshotwith exactly-one origin validationmicrosandbox-typesmicrosandbox-imagemanifest re-export shimWhy
msb-cloud needs one shared, dependency-safe snapshot contract for API types, SDKs, OpenAPI, and generated TypeScript. The manifest cannot remain owned by
microsandbox-imagebecause the shared types package must not depend upward on the image implementation.Public behavior
Snapshot operation status exposes the stable public states
queued,in_progress,succeeded, andfailed. Sandbox creation requires exactly one ofimageorfrom_snapshot, and snapshot restores reject an explicit disk-size override.This PR establishes contracts only; cloud snapshot HTTP operations and backend dispatch land in follow-up work.
Validation
cargo test -p microsandbox-types --features ts,utoipa— 61 passedmsbbuild