[PR #80] [CLOSED] fix(orchestrator): fail fork when source cannot leave Forking #163

Closed
opened 2026-10-29 14:20:31 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/kvcache-ai/AgentENV/pull/80
Author: @Ayush7614
Created: 7/29/2026
Status: ❌ Closed

Base: main ← Head: fix/fork-restore-source-state


📝 Commits (2)

  • f8edd73 fix(orchestrator): fail fork when source cannot leave Forking
  • 103e97c fix(orchestrator): retry fork source restore before terminal cleanup

📊 Changes

2 files changed (+172 additions, -11 deletions)

View changed files

📝 src/orchestrator/service.rs (+59 -11)
📝 src/orchestrator/tests.rs (+113 -0)

📄 Description

Summary

  • After a successful backend fork, restoring the source from Forking → Running was best-effort and ignored on failure.
  • That left the source stuck in Forking while children were still registered, breaking later pause/resume/delete waiters.
  • Fork now fails hard on that restore error, stops forked children, and surfaces the store failure.

Test plan

  • Added fork_sandbox_fails_when_source_cannot_leave_forking
  • cargo test -p agentenv --lib fork_sandbox_

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/kvcache-ai/AgentENV/pull/80 **Author:** [@Ayush7614](https://github.com/Ayush7614) **Created:** 7/29/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/fork-restore-source-state` --- ### 📝 Commits (2) - [`f8edd73`](https://github.com/kvcache-ai/AgentENV/commit/f8edd736e522a05152846f663a838e7667adbf20) fix(orchestrator): fail fork when source cannot leave Forking - [`103e97c`](https://github.com/kvcache-ai/AgentENV/commit/103e97c05bf42e08518ffbfdd76580fc89d289e9) fix(orchestrator): retry fork source restore before terminal cleanup ### 📊 Changes **2 files changed** (+172 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `src/orchestrator/service.rs` (+59 -11) 📝 `src/orchestrator/tests.rs` (+113 -0) </details> ### 📄 Description ## Summary - After a successful backend fork, restoring the source from `Forking` → `Running` was best-effort and ignored on failure. - That left the source stuck in `Forking` while children were still registered, breaking later pause/resume/delete waiters. - Fork now fails hard on that restore error, stops forked children, and surfaces the store failure. ## Test plan - [x] Added `fork_sandbox_fails_when_source_cannot_leave_forking` - [x] `cargo test -p agentenv --lib fork_sandbox_` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 14:20:31 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/AgentENV#163
No description provided.