Skip to content

fix(harness): 统一 workspace 列表路径归一化,修复 project 目录下 file_list 异常#1719

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

fix(harness): 统一 workspace 列表路径归一化,修复 project 目录下 file_list 异常#1719
guslegend0510 wants to merge 4 commits into
agentscope-ai:mainfrom
guslegend0510:fix/issue-1704-filesystem-project-list

Conversation

@guslegend0510

Copy link
Copy Markdown

背景

在配置 LocalFilesystemSpecproject/workspace 后,file_list 相关列表接口会出现路径格式不一致的问题,导致 project 目录下的文件展示异常。

修改

  • 新增 WorkspaceManager 的列表路径归一化逻辑
  • 统一处理 knowledgememorytaskssessionsglob 结果
  • 补充回归测试,覆盖 knowledgememory 的 workspace-relative 路径输出

验证

  • 新增 WorkspaceManagerListingTest
  • 本地 mvn 验证时,仓库中已有的 Session/SessionKey 相关编译问题会先阻塞构建

@guslegend0510 guslegend0510 requested a review from a team June 11, 2026 13:49
@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 unifies workspace file list path normalization by introducing Workspace.getFilePath() and fixes SandboxProject.fileList's incorrect path resolution logic. It also removes a dangerous exists() short-circuit in saveProject().

Recommendation: COMMENT — 1 critical issue + 1 recommended + 1 nitpick

@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 unifies workspace file list path normalization by introducing Workspace.getFilePath() and fixes SandboxProject.fileList's incorrect path resolution logic. It also removes a dangerous exists() short-circuit in saveProject().

Recommendation: COMMENT — 1 critical issue + 1 recommended + 1 nitpick

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