Skip to content

fix(server): resume unspecified sandbox phase#1765

Merged
drew merged 1 commit into
NVIDIA:mainfrom
shiju-nv:fix/server-resume-unspecified-phase
Jun 5, 2026
Merged

fix(server): resume unspecified sandbox phase#1765
drew merged 1 commit into
NVIDIA:mainfrom
shiju-nv:fix/server-resume-unspecified-phase

Conversation

@shiju-nv
Copy link
Copy Markdown
Contributor

@shiju-nv shiju-nv commented Jun 4, 2026

Summary

Resume sandboxes whose persisted row decodes to the proto-default Unspecified phase. Sandbox rows written by an older gateway build decode to Unspecified, and the startup resume sweep skipped them. This leaves a still-running sandbox stuck (never resumed, never errored) after a gateway restart. This treats Unspecified as a running phase so the sweep reconciles it from live driver state.

Changes

  • sandbox_phase_should_be_running now includes SandboxPhase::Unspecified alongside Provisioning, Ready, and Unknown. Deleting and Error remain excluded so terminal/in-progress sandboxes are not silently revived.

Testing

  • mise run pre-commit passes
  • Unit tests added/updated
  • E2E tests added/updated (if applicable)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

Legacy or never-initialized sandbox rows decode to the proto-default
Unspecified phase. The startup resume sweep skipped them, leaving the
backend unreconciled: never resumed, never errored. Unspecified was the
only non-terminal phase skipped, since unrecognized values already fall
through to Unknown and get resumed.

Treat Unspecified as running so the sweep reconciles it from live driver
state: resume when the backend resource exists, mark Error when it is gone.

Tests

- cargo test -p openshell-server \
  resume_persisted_sandboxes_resumes_running_phases

Signed-off-by: Shiju <shiju@nvidia.com>
@drew drew merged commit 97986d9 into NVIDIA:main Jun 5, 2026
28 checks passed
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.

2 participants