Skip to content

fix: skill fileSystem base repo source should not contain :#896

Open
fang-tech wants to merge 1 commit intoagentscope-ai:mainfrom
fang-tech:fix/skill/repo-filesysRepo-source-fault-in-windows
Open

fix: skill fileSystem base repo source should not contain :#896
fang-tech wants to merge 1 commit intoagentscope-ai:mainfrom
fang-tech:fix/skill/repo-filesysRepo-source-fault-in-windows

Conversation

@fang-tech
Copy link
Contributor

AgentScope-Java Version

[The version of AgentScope-Java you are working on, e.g. 1.0.9, check your pom.xml dependency version or run mvn dependency:tree | grep agentscope-parent:pom(only mac/linux)]

Description

close #842

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

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

Fixes Windows InvalidPathException when skill IDs are used as directory names by removing : from the default source strings produced by skill repositories.

Changes:

  • Change default source formats from filesystem:* / classpath:* to filesystem-* / classpath-*.
  • Update repository unit tests to assert the new default source formats.
  • Expand FileSystemSkillRepositoryTest with save-related tests, including a check that the computed source contains no colon.

Reviewed changes

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

File Description
agentscope-core/src/main/java/io/agentscope/core/skill/repository/FileSystemSkillRepository.java Changes default getSource() prefix to avoid : in generated skill IDs on Windows.
agentscope-core/src/main/java/io/agentscope/core/skill/repository/ClasspathSkillRepository.java Changes default source generation to use classpath- instead of classpath:.
agentscope-core/src/test/java/io/agentscope/core/skill/repository/FileSystemSkillRepositoryTest.java Updates source assertions and adds save/overwrite/resources tests plus a “no colon” assertion.
agentscope-core/src/test/java/io/agentscope/core/skill/repository/ClasspathSkillRepositoryTest.java Updates default source expectations to the new classpath-* format.

@codecov
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

❌ Patch coverage is 40.00000% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ore/skill/repository/ClasspathSkillRepository.java 25.00% 3 Missing ⚠️

📢 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]: InvalidPathException when using default FileSystemSkillRepository on Windows due to illegal character :

2 participants