Repository navigation
feat(sandbox): support conditional deletion by sandbox ID - #6205
Open
rodrigosetti wants to merge 3 commits into
Open
rodrigosetti wants to merge 3 commits into
rodrigosetti wants to merge 3 commits into
Conversation
Add an optional expected_sandbox_id precondition to DeleteSandbox. Reject an empty ID and report a mismatch as ABORTED with structured reason SANDBOX_IDENTITY_MISMATCH. Requests without the field stay name-based. Add CLI deletion by ID and by name with an expected ID. Bind CLI no-keep cleanup and TUI deletion to the observed sandbox ID. Expose the precondition in the Rust SDK without changing name-only deletion callers. Exercise name reuse and delete replay at the gateway and same-name replacement through Rust conformance. Document the version requirement for gateways that predate conditional deletion. Closes ai-openshell#3210 Signed-off-by: rodrigosetti <rodrigosetti@gmail.com>
Avoid unused qualification warnings on the sandbox delete path. Signed-off-by: rodrigosetti <rodrigosetti@gmail.com>
Preserve the caller's expected sandbox ID through gateway interception, pin the TUI confirmation to its original target, and scope port-forward cleanup to that target. Keep the existing Rust SDK delete signatures and use raw gRPC for conditional requests. Signed-off-by: rodrigosetti <rodrigosetti@gmail.com>
3 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
An automated cleanup that reads a sandbox and later deletes it by name can delete a same-name replacement. Allow the caller to require that the name still resolves to the sandbox ID it observed.
Related Issue
Closes #3210
Changes
DeleteSandboxRequest.expected_sandbox_id. A mismatch returnsABORTEDwithErrorInforeasonSANDBOX_IDENTITY_MISMATCH. An empty ID is invalid, and an omitted ID preserves name-only deletion. Interceptors must preserve a caller-supplied ID.openshell sandbox delete --id IDandopenshell sandbox delete NAME --expected-id ID. Foregroundsandbox create --no-keepuses the created ID. Conditional cleanup only stops local port forwards tracked for that ID.delete_sandboxsignatures unchanged. Use the existing raw gRPC client for conditional requests. Update the public schema inventory without changing stored schemas.Release Notes
Conditional deletion requires a gateway that supports
expected_sandbox_id. Older gateways ignore the field and delete by name.Testing
Checklist