fix(tool): scope internal emitter callbacks to agent calls - #3066
Draft
CryoThrust wants to merge 1 commit into
Draft
fix(tool): scope internal emitter callbacks to agent calls#3066CryoThrust wants to merge 1 commit into
CryoThrust wants to merge 1 commit into
Conversation
Signed-off-by: Yohanes <CryoThrust@users.noreply.github.com>
CryoThrust
force-pushed
the
fix/call-scoped-tool-emitter-callback
branch
from
September 9, 2026 10:21
8b13987 to
851f165
Compare
Contributor
Author
|
Rebased the draft onto the latest upstream main ( |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
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.
Summary\n\nFixes #3065.\n\nThe framework-internal ToolEmitter callback was stored as mutable state on a shared Toolkit/ToolExecutor. Concurrent ReActAgent calls could therefore route progress from one tool invocation to another request.\n\nThis draft keeps the existing public ToolEmitter API and carries the internal callback through the call-scoped ToolCallParam:\n\n- ReActAgent creates one callback per event stream.\n- Toolkit/ToolExecutor pass it through each tool execution.\n- DefaultToolEmitter captures the callback when the invocation starts.\n- The legacy setInternalChunkCallback path remains available for compatibility.\n\n## Regression coverage\n\nAdded a deterministic barrier-based test with two concurrent calls sharing one Toolkit. Each callback receives only its own tool ID and progress payload.\n\nVerification:\n\n- [INFO] Scanning for projects...
[ERROR] [ERROR] Could not find the selected project in the reactor: agentscope-core @
[ERROR] Could not find the selected project in the reactor: agentscope-core -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MavenExecutionException\n- [INFO] Scanning for projects...
[ERROR] [ERROR] Could not find the selected project in the reactor: agentscope-core @
[ERROR] Could not find the selected project in the reactor: agentscope-core -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MavenExecutionException\n- 28 existing ToolCallParam/ToolEmitter tests plus the new concurrency case pass.\n\nThis is a draft because the five-argument Toolkit.callTools overload is an internal API shape for maintainer review. I can adapt it to another internal execution-context mechanism if preferred.