fix(sandbox): retain active fallback across concurrent calls - #2854
Open
Oxygen56 wants to merge 3 commits into
Open
fix(sandbox): retain active fallback across concurrent calls#2854Oxygen56 wants to merge 3 commits into
Oxygen56 wants to merge 3 commits into
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
xiaoyuuuuuupeng
approved these changes
Aug 27, 2026
Contributor
|
LGTM Fixes the #2849 empty-fallback window: fallbackBindings stack + fallbackBound look correct. Concurrent lifecycle tests pass; per-call binding unchanged. One non-blocking nit on setSandbox(null) clearing the whole stack — doesn't block merge. |
xiaoyuuuuuupeng
approved these changes
Aug 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AgentScope-Java Version
2.0.3-SNAPSHOT
Description
Fixes #2849.
When concurrent calls shared one agent, the context-free filesystem fallback remembered only the
latest sandbox. If that call released while an earlier call was still active, it cleared the
fallback and caused the remaining call's internal filesystem work to fail.
This change retains every active fallback binding in acquisition order. Releasing a call removes
one matching binding and restores the most recently acquired binding that is still active. It also
removes non-current bindings so they cannot be restored after release, and preserves repeated
bindings to the same sandbox until every matching call has released. Per-call context binding
remains authoritative and unchanged. Startup cleanup also records whether the current call
actually registered a fallback, so a failed startup cannot remove an identical sandbox binding
that belongs to another active call.
This follow-up is intentionally limited to the reported empty-fallback window. Context-free
callers still use the most recently acquired active fallback and do not gain session routing;
per-call context remains the isolation mechanism.
The failed-start regression was run against both versions: it reaches the reported missing-sandbox
failure before this follow-up and passes afterward. The existing release-order regressions and
focused lifecycle checks also pass locally.
The null-binding regression confirms that a rejected null update leaves both the current and previous active bindings intact.
Local
clean verifypasses for the Harness module and its dependencies, including formatting and the full relevant test suites. GitHub CI runs the complete cross-platform build and remaining repository checks.Checklist
Please check the following items before code is ready to be reviewed.
mvn spotless:applymvn test)