Skip to content

test(harness): add regression test for memory consolidation glob#1479

Open
guslegend0510 wants to merge 3 commits into
agentscope-ai:mainfrom
guslegend0510:fix/localfilesystem-glob-direct-files
Open

test(harness): add regression test for memory consolidation glob#1479
guslegend0510 wants to merge 3 commits into
agentscope-ai:mainfrom
guslegend0510:fix/localfilesystem-glob-direct-files

Conversation

@guslegend0510

Copy link
Copy Markdown
Contributor

AgentScope-Java Version

1.1.0-SNAPSHOT

Description

本 PR 新增一个回归测试,覆盖 LocalFilesystem.glob("**/*.md")memory/ 目录直下文件场景的匹配行为。

之前这个模式可能漏掉目录直接子文件,导致 MemoryConsolidator 在汇总 memory/ 下的日报时读不到新增内容,进而影响 MEMORY.md 的正常更新。

这次补上测试后,可以验证:

  • memory/ 目录直下的 .md 文件能够被正确扫描到;
  • MemoryConsolidator 能正常读取日报并完成合并;
  • 后续修改中该问题不会再次回归。

关联 issue:#1458

Checklist

  • 已使用 mvn spotless:apply 格式化代码
  • 已通过 mvn test
  • Javadoc 注释已按项目规范更新
  • 相关文档已更新(如需要)

@guslegend0510 guslegend0510 requested a review from a team May 24, 2026 04:08
@CLAassistant

CLAassistant commented May 24, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@guslegend0510 guslegend0510 force-pushed the fix/localfilesystem-glob-direct-files branch from 2dceb35 to 505d6cb Compare May 24, 2026 05:00
@jujn

jujn commented May 25, 2026

Copy link
Copy Markdown
Contributor

Thanks for addressing the MemoryConsolidator path issue. I think the same class of bug also affects MemoryMaintenanceHook, which is mentioned in the issue scope.
To be honest, I'm not quite familiar with the harness branch yet. Please wait for the core maintainer to conduct a detailed review.

@AgentScopeJavaBot AgentScopeJavaBot added area/harness agentscope-harness (test/runtime support) bug Something isn't working labels May 28, 2026
@LearningGp LearningGp requested a review from chickenlj June 4, 2026 08:10

@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 a real bug where LocalFilesystem.glob() returns absolute paths that downstream code was treating as relative paths. The fix centralizes path normalization into a new WorkspaceManager.toWorkspaceRelativePath() method and migrates the affected call sites. Two regression tests exercise the end-to-end flow with LocalFilesystem, confirming the glob-returned absolute paths are now correctly relativized.

(inline comments could not be attached — line numbers fell outside PR hunks. See archived report.)

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

Labels

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.

5 participants