mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #100] [CLOSED] fix(orchestrator): restore pause state after allocation failure #178
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#178
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/100
Author: @morluto
Created: 7/31/2026
Status: ❌ Closed
Base:
main← Head:fix/pause-allocation-rollback📝 Commits (2)
89618d8fix(orchestrator): restore pause state after allocation failurea465e71test(orchestrator): prove pause rollback invariants📊 Changes
2 files changed (+236 additions, -4 deletions)
View changed files
📝
src/orchestrator/service.rs(+48 -2)📝
src/orchestrator/tests.rs(+188 -2)📄 Description
What does this PR do?
Restores a running sandbox when paused-artifact-root allocation fails before the backend pause begins.
Previously,
pause_sandbox_innerdetached the runtime handle and proxy route and then propagated an allocation error with?. That skipped the rollback used by later pause failure paths, leaving metadata inPausingwhile the live runtime was no longer routable.The failure path now restores the runtime handle and proxy route, transitions metadata from
Pausingback toRunning, and releases the temporaryPausedSandboximage ownership before returning the allocation error. If the metadata transition also fails, the returned internal error preserves both failures.Closes #99.
How was it tested?
pause_artifact_root_allocation_failure_restores_running_for_retry, which deterministically fails the first artifact-root allocation and verifies:Runningwith no paused state;Paused.cargo test -p agentenv --lib orchestrator::service::tests::pause_artifact_root_allocation_failure_restores_running_for_retry -- --exact --nocapturecargo fmt --all -- --checkgit diff --check main...HEADCompatibility
No API, persistence format, or successful pause behavior changes. This only changes rollback after an artifact-root allocation error that occurs before
SandboxBackend::pauseis called.Suggested review order
src/orchestrator/service.rs.src/orchestrator/tests.rs.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.