Skip to content

fix(sandbox-adapter): make suspend and destroy noop on a suspended or missing sandbox - #432

Merged
eersnington merged 1 commit into
mainfrom
stack/fix-sandbox-adapter-suspend
Dec 3, 2026
Merged

eersnington merged 1 commit into
mainfrom
stack/fix-sandbox-adapter-suspend

Conversation

@eersnington

Copy link
Copy Markdown
Member

Makes suspend a no-op on a sandbox that is already suspended or gone, and destroy a no-op on a sandbox that is gone. @rivet-dev/pi and the documented onSleep example call suspend on every sleep, and providers also stop sandboxes on their own (Daytona after 15 minutes idle, E2B on timeout).

Provider Already suspended Missing
Docker no-op (unchanged) no-op (unchanged)
Daytona now stops only a STARTED sandbox DaytonaNotFoundError is now a no-op, also for destroy
E2B no-op (the SDK returns false on 409) SandboxNotFoundError is now a no-op
Freestyle now pauses only a running VM no-op (unchanged)
  • Each guard is the one the provider's own connect already uses.
  • Auth, rate limit, 5xx, and network errors still throw.
  • The SandboxProvider docs state the contract for custom providers. The interface shape does not change.

@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown

📟 Pip-Boy · a8d3fbc

📦 Packages · fresh npm install resolve, no lockfile · this PR vs base

No notable install size, dependency, or entrypoint changes across 10 packages.

All 10 packages · linux-x64-gnu
package (linux-x64-gnu) @latest base this PR Δ vs base packages
@rivet-dev/pi 405.8 MB 405.8 MB 405.8 MB +1.8 KB (+0.0%) 227 (0)
@rivet-dev/sandbox-adapter 114.5 KB 114.5 KB 116.2 KB +1.8 KB (+1.5%) 1 (0)
@sandbox-agent/cli-shared 27.2 KB 27.2 KB 27.2 KB 0 1 (0)
@sandbox-agent/persist-indexeddb 12.4 KB 12.4 KB 12.4 KB 0 1 (0)
@sandbox-agent/persist-postgres 12.3 KB 12.3 KB 12.3 KB 0 1 (0)
@sandbox-agent/persist-rivet 12.2 KB 12.2 KB 12.2 KB 0 1 (0)
@sandbox-agent/persist-sqlite 12.3 KB 12.3 KB 12.3 KB 0 1 (0)
@sandbox-agent/react 41.6 MB 41.9 MB 41.9 MB 0 15 (0)
acp-http-client 6.7 MB 6.7 MB 6.7 MB 0 3 (0)
sandbox-agent 30.9 MB 30.9 MB 30.9 MB 0 8 (0)

🧹 Rust dependencies

Skipped: this PR doesn't change any Rust code or dependencies.

🦀 Binaries

Skipped: this PR doesn't change any Rust code.

⏱ Timing

job wall time slowest step
changes 18s checkout · 13s
zizmor 21s checkout · 11s
footprint 2m35s Run pnpm --dir sandbox-agent install --frozen-lockfile · 1m03s
⏭ native · ${{ matrix.platform }} — skipped
⏭ self-test — skipped
⏭ hygiene — skipped
report 25s checkout · 9s
🔭 Full CI trace for this commit

One OpenTelemetry trace of CI and Pip-Boy for a8d3fbc: every job and step, with the sizes above attached. Run after CI finishes.

pnpm install --frozen-lockfile --filter 'pipboy...'
pnpm --filter pipboy pipboy trace --sha a8d3fbc185e4775049ad20b5a7c5c7913790f8ab

Add --otlp <url> to send it to any OTLP/HTTP collector.

Agent instruction: From a rivet-dev/agents checkout, run the commands above, then read the trace file the last command prints. List the slowest jobs and steps and explain where CI time went.

@eersnington eersnington changed the title fix(sandbox-adapter): make suspend and destroy safe on a suspended or missing sandbox fix(sandbox-adapter): make suspend and destroy noop on a suspended or missing sandbox Dec 3, 2026
@eersnington
eersnington merged commit 1760fdd into main Dec 3, 2026
11 checks passed
@eersnington
eersnington deleted the stack/fix-sandbox-adapter-suspend branch December 3, 2026 19:38
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