mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #64] [MERGED] fix(sandbox): resume sandbox upon recoverable pause failure #149
Labels
No labels
bug
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/AgentENV#149
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/kvcache-ai/AgentENV/pull/64
Author: @LSX-s-Software
Created: 7/29/2026
Status: ✅ Merged
Merged: 7/30/2026
Merged by: @yingdi-shan
Base:
main← Head:fix/recoverable-pause-failure📝 Commits (1)
966806cfix(sandbox): resume sandbox upon recoverable pause failure📊 Changes
4 files changed (+105 additions, -12 deletions)
View changed files
📝
src/orchestrator/tests.rs(+69 -1)📝
src/sandbox/backend.rs(+3 -0)📝
src/sandbox/firecracker/sandbox.rs(+19 -9)📝
src/sandbox/mock.rs(+14 -2)📄 Description
What
Ensure
SandboxBackend::pause()returns a recoverable error only after the sandbox has been restored to a running state.For the Firecracker backend, a recoverable pause failure now triggers an in-place resume before the error is returned. If recovery also fails, the error is promoted to terminal so the orchestrator stops and removes the sandbox instead of publishing a frozen VM as
Running.Why
Firecracker is paused before snapshot artifacts are fully created. A later snapshot-processing failure could therefore leave the VM paused while the orchestrator restored its handle, proxy route, and
Runningmetadata. The sandbox appeared healthy and routable but could not make progress.Keeping the recovery guarantee at the backend boundary lets the orchestrator retain its simple error handling without depending on backend-specific intermediate states.
Related issue
Closes #41
Scope and non-goals
Included:
pause()contract at the sandbox backend boundary.Not included:
FirecrackerSandbox::pause_to_dir()semantics.Design and behavior changes
The orchestrator can safely restore the handle, proxy route, and
Runningmetadata for a recoverable error because the backend now guarantees that recovery has already completed.Compatibility and operations
Validation
make fmt(equivalent command run directly)make clippy(equivalent focused command run directly)make test-unitmake -C services test(required whenservices/changes)maketargetCommands and results:
Skipped checks and reasons:
services/is unchanged.Risks and reviewer notes
N/A
Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.