[PR #82] [CLOSED] fix(orchestrator): treat persistence cleanup failures as operation failures #166

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

📋 Pull Request Information

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

Base: main ← Head: fix/persistence-cleanup-failures


📝 Commits (2)

  • a6db392 fix(orchestrator): treat persistence cleanup failures as operation failures
  • 1ec2b7e fix(orchestrator): harden persistence cleanup against partial failures

📊 Changes

3 files changed (+286 additions, -15 deletions)

View changed files

📝 src/orchestrator/persistence/file_backed.rs (+3 -1)
📝 src/orchestrator/service.rs (+57 -13)
📝 src/orchestrator/tests.rs (+226 -1)

📄 Description

Summary

  • Delete reported success even when paused artifacts could not be removed, so sandboxes could resurrect after restart.
  • Resume warned and continued when clearing the Resuming marker failed, so a crash could discard the paused record.
  • Delete now fails and restores a stable state for retry; resume rolls back to Paused if record cleanup fails.

Test plan

  • Added delete_sandbox_fails_when_persisted_state_cannot_be_removed
  • Added resume_delete_record_failure_rolls_back_to_paused
  • cargo test -p agentenv --lib resume_marks_resuming
  • cargo test -p agentenv --lib delete_sandbox_fails_when_persisted

🔄 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/82 **Author:** [@Ayush7614](https://github.com/Ayush7614) **Created:** 7/29/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/persistence-cleanup-failures` --- ### 📝 Commits (2) - [`a6db392`](https://github.com/kvcache-ai/AgentENV/commit/a6db392734abd86f100894abb50f23c289b1f0ba) fix(orchestrator): treat persistence cleanup failures as operation failures - [`1ec2b7e`](https://github.com/kvcache-ai/AgentENV/commit/1ec2b7e233496f42375172d9fe4dae8394d97d1c) fix(orchestrator): harden persistence cleanup against partial failures ### 📊 Changes **3 files changed** (+286 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `src/orchestrator/persistence/file_backed.rs` (+3 -1) 📝 `src/orchestrator/service.rs` (+57 -13) 📝 `src/orchestrator/tests.rs` (+226 -1) </details> ### 📄 Description ## Summary - Delete reported success even when paused artifacts could not be removed, so sandboxes could resurrect after restart. - Resume warned and continued when clearing the `Resuming` marker failed, so a crash could discard the paused record. - Delete now fails and restores a stable state for retry; resume rolls back to `Paused` if record cleanup fails. ## Test plan - [x] Added `delete_sandbox_fails_when_persisted_state_cannot_be_removed` - [x] Added `resume_delete_record_failure_rolls_back_to_paused` - [x] `cargo test -p agentenv --lib resume_marks_resuming` - [x] `cargo test -p agentenv --lib delete_sandbox_fails_when_persisted` --- <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:32 +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#166
No description provided.