You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As an operator running OpenShell with the Docker compute driver, I want a sandbox's per-sandbox token file removed whenever its resources are reclaimed — including when the container was already removed out-of-band — so that credential material doesn't accumulate indefinitely on disk.
Problem Statement
In crates/openshell-driver-docker/src/lib.rs's delete_sandbox_inner, when find_managed_container_summary finds no container and there's no in-memory pending record for the sandbox, the function returns Ok(false) immediately without calling the token-file cleanup. Every other branch in this function (found container, or a pending record with no live container) does call the cleanup. This is the one gap.
Impact / Why This Matters
#2352 fixed the server-side gap where out-of-band sandbox removal never triggered a DeleteSandbox call at all. Now that it does, Docker's own DeleteSandbox implementation needs to be idempotent-complete for that fix to actually close Docker's leak — right now it isn't, for this specific branch. The result: a sandbox's token file can still leak indefinitely when its container disappears out-of-band and the in-memory pending-record has already expired or was never populated (e.g. after a gateway restart).
Acceptance Criteria
delete_sandbox_inner calls the token-file cleanup in the "container gone, no pending record" branch, matching the other branches.
Regression test covering this specific branch.
Reproduction Steps
Create a sandbox on the Docker driver.
Remove its container out-of-band (docker rm -f), and ensure enough time/restart passes that the in-memory pending record is gone.
User Story
As an operator running OpenShell with the Docker compute driver, I want a sandbox's per-sandbox token file removed whenever its resources are reclaimed — including when the container was already removed out-of-band — so that credential material doesn't accumulate indefinitely on disk.
Problem Statement
In
crates/openshell-driver-docker/src/lib.rs'sdelete_sandbox_inner, whenfind_managed_container_summaryfinds no container and there's no in-memorypendingrecord for the sandbox, the function returnsOk(false)immediately without calling the token-file cleanup. Every other branch in this function (found container, or a pending record with no live container) does call the cleanup. This is the one gap.Impact / Why This Matters
#2352 fixed the server-side gap where out-of-band sandbox removal never triggered a
DeleteSandboxcall at all. Now that it does, Docker's ownDeleteSandboximplementation needs to be idempotent-complete for that fix to actually close Docker's leak — right now it isn't, for this specific branch. The result: a sandbox's token file can still leak indefinitely when its container disappears out-of-band and the in-memory pending-record has already expired or was never populated (e.g. after a gateway restart).Acceptance Criteria
delete_sandbox_innercalls the token-file cleanup in the "container gone, no pending record" branch, matching the other branches.Reproduction Steps
docker rm -f), and ensure enough time/restart passes that the in-memorypendingrecord is gone.Environment
Any Docker-driver deployment; not version-specific, this branch predates #2352.