Skip to content

Cold-replace a checkpoint that cannot be restored - #819

Merged
SaladDay merged 1 commit into
mainfrom
cold-replace-a-checkpoint-that-cannot-be-restored
Oct 22, 2026
Merged

SaladDay merged 1 commit into
mainfrom
cold-replace-a-checkpoint-that-cannot-be-restored

Conversation

@SaladDay

@SaladDay SaladDay commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

A microsandbox resume that failed before native restoration (missing or damaged snapshot, failed qualification, or a helper that cannot read the snapshot format) left its durable restore admission open. Every later attempt returned unconfirmed, so the allocation stayed in restoring until retention expiry, and the Session's pending input waited until its public deadline. Seen on mx on 2026-10-22.

The Core–Sandbox Provider protocol gains the Resume outcome ErrCheckpointUnusable (node wire code checkpoint_unusable): the adapter durably closed the exact attempt before native dispatch, and the snapshot cannot be restored. A later ObserveOnly reports it again, and it is never returned once native restoration was dispatched.

  • Core: on this outcome, Core ends the allocation's retention at once with ExpireUnusableCheckpoint (running, restoring, same compute_revision), and the ordinary expiry cleanup runs from there. A qualified Session then continues through the existing cold replacement. Capacity-pressure expiry still applies only to suspended allocations.
  • microsandbox helper:
    • The fresh dispatch that created the admission closes it on any failure before RestoreSandbox.
    • Snapshot defects are also recorded as unusable: not found, identity or integrity failure, or a failed resource, workspace or runtime-image qualification.
    • Other failures are only closed, so Core retries with a new operation ID through the existing RestoreAttemptClosed path.
  • Docs: docs/sandbox-provider.md, contracts/agents-api/node-generation-protocol.md and their Chinese mirrors, and the helper README.

Checks:

  • python3 scripts/build-microsandbox-provider.py test
  • go test with -run filters on the restore, compute, retention and pressure tests in internal/execution, internal/deployment and deploymentpg, plus ./internal/sandbox/...
  • go vet
  • make check-docs

An independent review found two problems, both fixed: a failed target lookup left the admission open, and the helper README was not updated.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@SaladDay
SaladDay merged commit 01a041c into main Oct 22, 2026
19 checks passed
@SaladDay
SaladDay deleted the cold-replace-a-checkpoint-that-cannot-be-restored branch October 22, 2026 11:04
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