Skip to content

fix(core): ignore hidden files when loading skill resources#1002

Open
jujn wants to merge 3 commits intoagentscope-ai:mainfrom
jujn:fix_1000
Open

fix(core): ignore hidden files when loading skill resources#1002
jujn wants to merge 3 commits intoagentscope-ai:mainfrom
jujn:fix_1000

Conversation

@jujn
Copy link

@jujn jujn commented Mar 20, 2026

Description

Close #1000

Checklist

Please check the following items before code is ready to be reviewed.

  • Code has been formatted with mvn spotless:apply
  • All tests are passing (mvn test)
  • Javadoc comments are complete and follow project conventions
  • Related documentation has been updated (e.g. links, examples, etc.)
  • Code is ready for review

@jujn jujn requested review from a team and Copilot March 20, 2026 07:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses issue #1000 by updating skill resource loading to ignore hidden/dot-prefixed files, preventing unwanted artifacts (e.g., .DS_Store) from being included in AgentSkill resources.

Changes:

  • Add filtering in SkillFileSystemHelper.loadResources(...) to skip dot-prefixed and hidden/unreadable files.
  • Add a unit test to verify dot-prefixed files are excluded from loaded resources.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
agentscope-core/src/main/java/io/agentscope/core/skill/util/SkillFileSystemHelper.java Adds hidden/dotfile filtering during resource discovery when loading a skill.
agentscope-core/src/test/java/io/agentscope/core/skill/util/SkillFileSystemHelperTest.java Adds coverage for filtering dot-prefixed files out of loaded resources.

@codecov
Copy link

codecov bot commented Mar 20, 2026

Codecov Report

❌ Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ntscope/core/skill/util/SkillFileSystemHelper.java 90.90% 0 Missing and 1 partial ⚠️

📢 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]:skill resource should filter hidden file

2 participants