mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #199] Recover snapshot cache after canceled restores #247
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#247
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/199
Author: @nikhilsimha
Created: 8/20/2026
Status: 🔄 Open
Base:
main← Head:nikhil/recover-canceled-artifact-cache📝 Commits (1)
e588f7eRecover snapshot cache after canceled restores📊 Changes
1 file changed (+71 additions, -11 deletions)
View changed files
📝
src/snapshot/artifact_cache.rs(+71 -11)📄 Description
What changed
When the task leading a snapshot artifact materialization is canceled, the next waiter now removes that abandoned in-flight entry and retries. The cleanup compares the watch channel before removal so a concurrent waiter cannot remove a newer fetch.
A regression test cancels the materialization leader, then verifies a second caller materializes and reads the artifact.
Why
A client disconnect can cancel the leader after the cache records the fetch but before it publishes a result. The sender is dropped, while the receiver remains in the in-flight map. Every later restore of that snapshot then fails with
ended without a resultuntil the AgentENV server restarts.This change makes canceled restores self-healing and prevents a transient disconnect from permanently blocking sandbox recovery on that node.
Validation
cargo test snapshot::artifact_cache::tests— 7 passedcargo clippy --locked --all-targets -- -D warnings— passedcargo test --locked— 741 passed, 4 ignored; 5 unrelated ublk tests could not connect to the local ublk daemon (channel closed)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.