Repository navigation
Conversation
A new CUDA-free crate that owns the ColdSnap manager-facing contract and nothing else: request format 4, receipt format 2, the capabilities document, argv construction, the single process-I/O seam, and the restore-shaped derivation of sleep/wake/status. Everything is transcribed from the controller's Go source (internal/snapshot/schema.go, receipt.go, internal/cli/capabilities.go) rather than its prose, so field names and validators match what it actually enforces. It deliberately does NOT own Atlas lifecycle policy. What "sleep" means for an Atlas CUDA context — release weights and KV, retain the process — is a spark-server decision, and a foreign-protocol adapter that also owned it would invert the dependency and make every lifecycle change a change here. This is scaffolding for that work, not the work. Two things are deliberately left undone, and both are load-bearing: 1. No request is emitted for an engine other than vllm/sglang. ColdSnap's engineadapter registry has no `atlas` entry and receipt validation rejects any other engine, so an atlas request is structurally invalid. Emitting engine:"vllm" for an Atlas workload was the tempting shortcut; it would produce a receipt that makes lifecycle decisions look evidenced when they are not. The engine type is therefore a closed enum on the request side and a tolerant one on the wire side. 2. The receipt's request_sha256 is NOT compared against the digest of the bytes sent. snapshot.RequestSHA256 is sha256(CanonicalJSON(json.Marshal(request))) over the decoded, default-resolved struct — recursively key-sorted, Python-escaped, with omitted fields resolved to driver defaults. It is not a checksum of the submitted bytes, and a byte-level comparison would reject every valid receipt. Identity rests on the echoed operation_id and operation, which are exactly comparable; the controller digest is retained for audit. Outcomes are classified four ways — success, definitive failure, protocol violation, unknown — because a process boundary disagrees with itself in more ways than two. A timeout or a receiptless nonzero exit is UNKNOWN, never failed: sleep/wake take a fresh id each time, so the controller does not deduplicate them and a retry is a second operation rather than a repeat. 119 tests, none of which need a GPU or the coldsnap binary — the runner seam is the only place a process is spawned, so every failure mode above is reachable on a laptop. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
|
Triage (2026-09-26). Recommend closing, or moving this to its own repo.
It's CUDA-free and owns only the foreign protocol, so it works as a standalone crate that Atlas depends on once a placement-manager job exists. That keeps it out of the workspace in the meantime. |
Contributor
Author
|
Closing to cut the open-PR count, per the 2026-09-26 triage (standalone scaffolding with no Atlas integration or job behind it yet). No work is lost: the branch |
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
Adds
crates/atlas-coldsnap, a CUDA-free Rust client for the ColdSnap controller protocol, so Atlas can eventually be driven by a placement manager'ssleep/wake/statuslifecycle.This is scaffolding for that integration, not the integration itself — see the caveat under Notes for reviewers. The crate is purely additive: one line added to the workspace
memberslist, andtimegains theparsingfeature inCargo.lock(already in the graph transitively).What it owns, and what it deliberately does not
It owns the foreign contract and nothing else: request format 4, receipt format 2, the
coldsnap capabilitiesdocument, argv construction, the single process-I/O seam, and the restore-shaped derivation ofsleep/wake/status. Field names and validators are transcribed from the controller's Go source (internal/snapshot/schema.go,receipt.go,internal/cli/capabilities.go,internal/canonicaljson/canonical.go) rather than its prose.It does not own Atlas lifecycle policy. What "sleep" means for an Atlas CUDA context — release weights and KV, retain the process — is a
spark-serverdecision. A foreign-protocol adapter that also owned that would invert the dependency and make every lifecycle change a change here.Test plan
cargo fmt -p atlas-coldsnap -- --checkATLAS_SKIP_BUILD=1 CUDARC_CUDA_VERSION=13000 cargo clippy -p atlas-coldsnap --all-targets(clean under the workspacewarnings = "deny"+clippy::allpolicy)cargo test -p atlas-coldsnap— 119 passed (93 unit + 26 integration), on macOS, with no GPU and nocoldsnapbinarytypos crates/atlas-coldsnap.rs)bash scripts/check-license-headers.sh— not run: it requires Docker, which is unavailable on this host. The same rule was verified directly against.licenserc.yamlinstead.spark-server.Scoping the checks to
-p atlas-coldsnapis deliberate: the workspace as a whole needs a CUDA host to build.The 119 tests are possible because the runner seam (
CommandRunner) is the only place a process is spawned. Every failure mode below is therefore reachable on a laptop with a scripted fake.Notes for reviewers
Two things are deliberately left undone, and both are load-bearing.
No request is emitted for an engine other than
vllm/sglang. ColdSnap'sengineadapter.Lookupregisters only those two, andOperationReceipt.Validateindependently rejects any other engine — so"engine": "atlas"is structurally invalid, not merely unsupported. The tempting shortcut was to emitengine: "vllm"for an Atlas workload; that would produce a receipt asserting a vLLM engine for a workload that is not vLLM, making lifecycle decisions look evidenced when they are not. The engine type is consequently a closed enum on the request side and a tolerant one on the wire side, so a future engine cannot make an otherwise valid receipt unparseable.The receipt's
request_sha256is not compared against the digest of the bytes sent.snapshot.RequestSHA256issha256(CanonicalJSON(json.Marshal(request)))— over the decoded, default-resolved struct, with recursively sorted keys and Python-styleensure_asciiescaping. It is not a checksum of the submitted bytes, and a byte-level comparison would reject every valid receipt (whitespace, key order, omitted fields resolved to driver defaults, and Unicode escaping all change it while the semantic request is identical). Identity rests instead on the echoedoperation_idandoperation, which are exactly comparable; the controller digest is retained for audit.PreparedRequestadditionally verifies that its serialized bytes actually encode the id and operation it is correlated against, so that check cannot be vacuous.Outcomes are four-way, not two-way.
Success/OperationFailed/Unknown/ protocol violation. A timeout or a receiptless nonzero exit isUnknown, never failed:sleep/waketake a fresh id each time, so the controller does not deduplicate them and a retry is a second operation rather than a repeat.UnknownOperation::retry_is_safe()returnsfalseand points the caller atstatusfor reconciliation.Deferred to a follow-up PR: the
spark-serverlifecycle surface (aLifecycleEngineseam overModelHost, plus an opt-in admin endpoint). It is not here because it modifies the live serving path and its "release weights + KV, keep process" behaviour is exactly what cannot be validated off-hardware — it deserves its own review rather than riding along with the adapter crate.Upstream question, not yet filed: whether ColdSnap intends an Atlas engine adapter at all, or whether the boundary is manager-side coordination with ColdSnap never seeing an
atlasengine. The answer determines whether item 1 above is a temporary gap or the permanent shape. Worth resolving before anyone builds toward an adapter that isn't coming.Peer review: the process-boundary logic was independently reviewed by a second model, which caught a timeout race (a child exiting between the poll and the deadline check was killed and misreported as
Unknown(TimedOut)), an unguardedkill(-pid)where a zero pid would have signalled the caller's process group, a missingEINTRretry, a cap-arithmetic overflow, a leaked child on wait error, and the fact that stderr truncation could SIGPIPE a healthy process. All fixed, each with a regression test.Generated with Devin