Skip to content

修复 workspace/project 文件列表路径归一化#1724

Open
guslegend0510 wants to merge 9 commits into
agentscope-ai:mainfrom
guslegend0510:fix/issue-1704-project-list-normalization
Open

修复 workspace/project 文件列表路径归一化#1724
guslegend0510 wants to merge 9 commits into
agentscope-ai:mainfrom
guslegend0510:fix/issue-1704-project-list-normalization

Conversation

@guslegend0510

@guslegend0510 guslegend0510 commented Jun 11, 2026

Copy link
Copy Markdown

背景

LocalFilesystemSpec.project() 场景下,glob() 返回的 project/lower 层绝对路径没有被统一转换为 workspace-relative,导致 listKnowledgeFiles() / listMemoryFilePaths() 在 project 目录存在时路径不一致。

变更

  • 新增列表路径归一化,同时兼容 workspace 根路径和 overlay lower project 根路径。
  • 补充 knowledge / memory 文件的 project 层回归测试。

验证

  • mvn -B "-Dspotless.check.skip=true" -pl agentscope-harness -am "-Dtest=WorkspaceManagerListingTest,BaseSandboxFilesystemTest,HarnessAgentTest" test

@guslegend0510 guslegend0510 requested a review from a team June 11, 2026 22:44
@guslegend0510 guslegend0510 changed the title ?? project ?????????? 修复 workspace/project 文件列表路径归一化 Jun 11, 2026
@AgentScopeJavaBot AgentScopeJavaBot added bug Something isn't working area/core/tool Tool, skill, RAG abstractions area/harness agentscope-harness (test/runtime support) labels Jun 12, 2026

@AgentScopeJavaBot AgentScopeJavaBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Review

This PR fixes workspace/project file list path normalization by introducing Project.getStoragePath() to store the original storagePath value, and changing Workspace.getPath() return type from String to Path. It also fixes PathMatcher glob compatibility issues on Windows (FileSystemExceptionInvalidPathException) and adds Windows CI via GitHub Actions.

Recommendation: COMMENT — 2 critical issues + 1 recommended + 2 nitpicks

@AgentScopeJavaBot AgentScopeJavaBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Review

This PR fixes workspace/project file list path normalization by introducing Project.getStoragePath() to store the original storagePath value, and changing Workspace.getPath() return type from String to Path. It also fixes PathMatcher glob compatibility issues on Windows (FileSystemExceptionInvalidPathException) and adds Windows CI via GitHub Actions.

Recommendation: COMMENT — 2 critical issues + 1 recommended + 2 nitpicks

@AgentScopeJavaBot AgentScopeJavaBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Review

This PR fixes workspace/project file list path normalization by introducing Project.getStoragePath() to store the original storagePath value, and changing Workspace.getPath() return type from String to Path. It also fixes PathMatcher glob compatibility issues on Windows (FileSystemExceptionInvalidPathException) and adds Windows CI via GitHub Actions.

Recommendation: COMMENT — 2 critical issues + 1 recommended + 2 nitpicks

@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.48649% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...cope/harness/agent/workspace/WorkspaceManager.java 86.48% 2 Missing and 3 partials ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core/tool Tool, skill, RAG abstractions area/harness agentscope-harness (test/runtime support) bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants