Repository navigation
fix(harness): resolve async tool record path without double slash - #3976
Open
pcbeingused33 wants to merge 1 commit into
Open
pcbeingused33 wants to merge 1 commit into
pcbeingused33 wants to merge 1 commit into
Conversation
RemoteFilesystem.ls() returns directory entries with a trailing slash, so WorkspaceAsyncToolRegistry.findRecordPath built <root>/<session>//<id>.json. exists() never matched the stored key and the by-id complete/fail/markTimeout overloads silently did nothing, leaving records RUNNING. Strip the trailing slash before appending the record file name. Fixes agentscope-ai#3975 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This branch has not been deployed
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.
Fixes #3975
AgentScope-Java Version
2.1.0-SNAPSHOT (main)
Description
Root cause:
RemoteFilesystem.ls()returns directory entries with a trailing slash, soWorkspaceAsyncToolRegistry.findRecordPathbuilt<root>/<session>//<id>.json.exists()never matched the stored key,findRecordPathreturnednullandupdateStatusreturned early without logging. The by-idcomplete/fail/markTimeoutoverloads were therefore silent no-ops on aRemoteFilesystem, leaving recordsRUNNINGuntilfindStalereported them as timed out.Fix: strip the trailing slash from the session directory path before appending
<id>.jsoninfindRecordPath(the minimal option suggested in the issue).Test:
WorkspaceAsyncToolRegistryTest.byIdUpdatesWorkOnRemoteFilesystemregisters three stale records on aRemoteFilesystemover anInMemoryStore, resolves them throughcomplete/fail/markTimeoutand assertsfindStaleis empty. It fails before the change and passes after.Checklist
mvn spotless:applymvn test) —WorkspaceAsyncToolRegistryTestwas run (7 passed); the full suite was notThis change was prepared with the assistance of an AI coding tool (Claude Code).