Skip to content

fix(studio): restore sandbox snapshots in background - #1075

Closed
zakahan wants to merge 1 commit into
volcengine:mainfrom
zakahan:fix/async-snapshot-resume
Closed

fix(studio): restore sandbox snapshots in background#1075
zakahan wants to merge 1 commit into
volcengine:mainfrom
zakahan:fix/async-snapshot-resume

Conversation

@zakahan

@zakahan zakahan commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Opening a sandbox agent list currently waits for all eligible snapshots to resume. A slow or unrestorable snapshot can block the list, and repeated visits trigger expensive retries.

This change returns ready sessions without waiting for restores, runs restores in service-owned background tasks, and refreshes the existing cards only while recovery is active. The page and new-chat picker show lightweight recovery and paused-recovery notices. Failed snapshots cool down for 5 and 30 minutes, then stop automatic attempts after three failures. Tasks are deduplicated per snapshot and logical session, limited to three concurrent restores per service, and cancelled at shutdown. Explicit autoResumeSnapshots=false is preserved by the client.

Session and snapshot discovery remain synchronous. Recovery state is in memory: it resets on restart and is not shared across replicas. The PR includes matching packaged WebUI assets.

Validation after rebasing onto upstream main (43ce9786):

  • Sandbox backend tests: 94 passed.
  • Frontend tests: 1053 passed, including a DOM test for recovery notices and polling cleanup.
  • Production build and packaged asset verification passed.
  • Pre-commit (Ruff, formatting, secret scan) passed.
  • Pyright reports the same 47 diagnostics as upstream for the checked backend and test files; no new diagnostics.

@zakahan zakahan closed this Sep 8, 2026
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