Skip to content

feat(sandbox): stop only the attested execution - #4217

Draft
danehans wants to merge 3 commits into
NVIDIA:mainfrom
danehans:feat/4009-conditional-sandbox-stop/danehans
Draft

danehans wants to merge 3 commits into
NVIDIA:mainfrom
danehans:feat/4009-conditional-sandbox-stop/danehans

Conversation

@danehans

@danehans danehans commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Allow controllers to stop only the sandbox execution that produced an attested observation. A delayed stop for an earlier execution cannot stop its replacement.

Related Issue

Fixes: #4009

Changes

  • Bind an execution ID to authenticated runtime launches and expose it through status, extension claims, SDKs, and the CLI.
  • Check the expected execution inside the current serialized stop/suspend lifecycle path, including retries. Preserve identity across resume and idempotent start retries; rotate it for replacement launches.
  • Return execution-specific stop receipts and replay confirmed results for 24 hours. Leave uncertain driver outcomes unresolved.
  • Reject conditional stop on unsupported PostgreSQL and HA deployments; document upgrade handling and the existing unconditional stop behavior.

Release Notes

Controllers can pass --execution-id to stop the execution they observed. Stale requests leave newer executions running.

Testing

  • Rebased onto main at 634ca7d8; GitHub reports the branch mergeable.
  • cargo test -p openshell-server --lib (2,617 passed); Rust SDK and focused CLI tests passed.
  • mise run go:ci, Clippy for the affected Rust crates, cargo fmt --check, and Markdown lint passed.
  • Unit and Kubernetes end-to-end coverage added or updated.
  • mise run e2e:kubernetes with OPENSHELL_E2E_KUBE_TEST=sandbox_execution_stop: 1 focused test and Kubernetes conformance passed.

Checklist

Generated Rust SandboxStatus struct literals need the new execution_id field when rebuilt against this API. The Go SDK changes remain here pending the planned SDK migration in #5031. This PR remains a draft while the issue awaits maintainer acceptance and the required CI gate is blocked.

@copy-pr-bot

copy-pr-bot Bot commented Oct 5, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@danehans
danehans marked this pull request as ready for review October 5, 2026 21:21
@danehans
danehans marked this pull request as draft October 5, 2026 22:09
@github-actions

Copy link
Copy Markdown

This pull request has had no activity for 14 days and is now marked stale.

@github-actions github-actions Bot added the state:stale Inactive item at risk of automatic closure. label Oct 23, 2026
@rhuss

rhuss commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Heads-up: the Go SDK moves to ai-openshell/sdk-go on 2026-11-03 (#5031). This PR also changes hand-written SDK code under sdk/go/openshell/. Please keep it in the PR, since core still builds sdk/go until its Go CI gate is dropped. After the freeze, sdk/go here is a deprecated snapshot. Once this PR merges and its protos ship in a core release, the SDK part gets ported to sdk-go with your authorship. Nothing to do on your side.

@danehans
danehans force-pushed the feat/4009-conditional-sandbox-stop/danehans branch from f328b54 to 1fe5ddb Compare November 2, 2026 19:53
Bind conditional stops and extension credentials to each launch. Preserve

historical receipts across retries and reject stale execution identities.

Fixes: NVIDIA#4009
Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
Preserve identity on persisted start retries and rotate it for new
recovery launches. Update compatibility checks and suspend/resume
coverage.

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
@danehans
danehans force-pushed the feat/4009-conditional-sandbox-stop/danehans branch from 1fe5ddb to 2b1968a Compare November 2, 2026 20:20
@github-actions github-actions Bot removed the state:stale Inactive item at risk of automatic closure. label Nov 3, 2026

This branch has not been deployed

No deployments
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.

feat(sandbox): support stop requests conditional on sandbox execution identity

2 participants