Skip to content

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

Merged
LearningGp merged 5 commits intoagentscope-ai:mainfrom
jujn:fix_1000
Mar 26, 2026
Merged

fix(core): ignore hidden files when loading skill resources#1002
LearningGp merged 5 commits intoagentscope-ai:mainfrom
jujn:fix_1000

Conversation

@jujn
Copy link
Contributor

@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 78.37838% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ntscope/core/skill/util/SkillFileSystemHelper.java 78.37% 6 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

@LearningGp
Copy link
Collaborator

@fang-tech PTAL

Copy link
Collaborator

@LearningGp LearningGp left a comment

Choose a reason for hiding this comment

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

LGTM

@LearningGp LearningGp mentioned this pull request Mar 24, 2026
Copy link
Contributor

@fang-tech fang-tech left a comment

Choose a reason for hiding this comment

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

LGTM

@LearningGp LearningGp merged commit 06cd3db into agentscope-ai:main Mar 26, 2026
6 checks passed
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

4 participants