Skip to content

fix(harness): normalize Windows list_files paths - #1892

Merged
chickenlj merged 1 commit into
agentscope-ai:mainfrom
guslegend0510:fix/issue-1887-windows-list-files-path-normalization
Jun 25, 2026
Merged

chickenlj merged 1 commit into
agentscope-ai:mainfrom
guslegend0510:fix/issue-1887-windows-list-files-path-normalization

Conversation

@guslegend0510

Copy link
Copy Markdown
Contributor

AgentScope-Java Version

2.0.0-SNAPSHOT

Description

This PR fixes Windows path normalization for list_files in agentscope-harness.

On Windows, absolute workspace paths that use backslashes were not normalized to workspace-relative form before being passed into the filesystem layer. As a result, list_files could fall back to the local backend and miss Redis-backed workspace data.

Changes made:

  • Normalize \ and / in WorkspacePathNormalizer#tryStrip.
  • Add a regression test for FilesystemTool.listFiles() with a Windows-style absolute workspace path.

Related issue:

How to test:

  • mvn -pl agentscope-harness -am -Dtest=FilesystemToolTest test

@guslegend0510
guslegend0510 requested a review from a team June 23, 2026 23:05
@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...rness/agent/workspace/WorkspacePathNormalizer.java 60.00% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@chickenlj
chickenlj merged commit 9e192f8 into agentscope-ai:main Jun 25, 2026
5 checks passed
wzl521 pushed a commit to wzl521/agentscope-java that referenced this pull request Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] list_files fails to find workspace data in Redis mode on Windows due to backslash path mismatch

3 participants