Fix remote sandbox leaks on reset and dashboard backend validation - #88
Open
GuzmanPintos wants to merge 2 commits into
Open
Fix remote sandbox leaks on reset and dashboard backend validation#88GuzmanPintos wants to merge 2 commits into
GuzmanPintos wants to merge 2 commits into
Conversation
evo reset only reset the workspace-default backend, so sandboxes created through per-experiment overrides were never torn down. reset now runs reset_all for every distinct backend spec, remote specs first. - Propagate teardown failures from reset and preserve state for retry: failed sandboxes stay in the state file and the error propagates; core keeps the run directory when any remote teardown fails so a second reset can retry cleanup. - Stop inheriting the host shell env into remote sandboxes: inherit_shell true now applies to local runs only; a new 'always' value opts remote sandboxes back in. - Validate the dashboard execution endpoint payload shape, reject non-scalar values, and map BackendError to 400; load_provider wraps constructor crashes in RemoteBackendUnavailable.
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.
Both were found while testing the Tenki provider (#87), but the bugs predate it and hit every remote provider.
evo resetleaked per-experiment sandboxes. It only ranreset_allon the workspace-default backend, so sandboxes created with a per-experiment override (evo new --remote <provider>on a worktree-default workspace) were never torn down. Reset now runsreset_allfor every distinct backend spec in the run, remote specs first. Remotereset_alldeletes only its own state file instead of the whole run directory (other specs still need those files); core wipes the run dir once every backend has reset. A failure in one backend no longer stops the rest, and failures are re-raised at the end so reset exits non-zero when a sandbox may still be running.The dashboard execution endpoint mishandled malformed payloads. Posting
provider_configas a string or with nested object values returned a 500; posting a list silently wiped the saved settings. It now validates the payload shape and returns 400 with a message, and maps provider construction failures (BackendError) to 400 as well.load_providerwraps constructor crashes inRemoteBackendUnavailable, which also fixes the 500 when you save a config for a provider whose SDK isn't installed.inherit_shell: trueno longer forwards the orchestrator's environment into remote sandboxes, where host values likeHOME=/Users/...overrode sane in-sandbox values and broke tools that read them (npm cifails on a Linux box handed a macOS HOME). Local runs keep the old behavior;evo env inherit-shell alwaysopts remote sandboxes back in.