Skip to content

test(agent-core): normalize skill scanner path expectations#279

Closed
haosenwang1018 wants to merge 1 commit into
MoonshotAI:mainfrom
haosenwang1018:test/skill-scanner-platform-paths
Closed

test(agent-core): normalize skill scanner path expectations#279
haosenwang1018 wants to merge 1 commit into
MoonshotAI:mainfrom
haosenwang1018:test/skill-scanner-platform-paths

Conversation

@haosenwang1018
Copy link
Copy Markdown

Related Issue

Part of #225.

Problem

resolveSkillRoots() normalizes filesystem realpaths to forward slashes before returning skill root paths. The skill scanner tests compared those returned paths against raw fs.realpath() output, which is native-path formatted on Windows and can contain backslashes. That makes the tests fail on Windows even though the product behavior is intentionally normalized.

What changed

  • Added a small normalizedRealpath() test helper that mirrors the production path normalization.
  • Updated skill-root path assertions to compare against normalized expected paths.
  • Added an empty changeset because this is test-only.

Verification

  • pnpm exec vitest run packages/agent-core/test/skill/scanner.test.ts
  • pnpm --filter @moonshot-ai/agent-core typecheck
  • pnpm --filter @moonshot-ai/agent-core test
  • pnpm changeset status --since origin/main
  • git diff --check

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 1, 2026

🦋 Changeset detected

Latest commit: beb927d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@liruifengv liruifengv closed this Jun 2, 2026
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.

2 participants