Skip to content

fix(agent): detect case-insensitive Windows configuration collisions - #268

Closed
dvd233 wants to merge 1 commit into
MiniMax-AI:mainfrom
dvd233:fix/windows-config-path-collision
Closed

dvd233 wants to merge 1 commit into
MiniMax-AI:mainfrom
dvd233:fix/windows-config-path-collision

Conversation

@dvd233

@dvd233 dvd233 commented Sep 22, 2026

Copy link
Copy Markdown

What changed

Normalize prepared configuration target paths for duplicate detection on Windows while preserving the original targetPath for file operations.

Add regression coverage for the Windows path identity helper and for two agent configuration directories that differ only by case but resolve to the same physical directory.

Why

On Windows, realpathSync can preserve the caller's casing for a missing file beneath an existing directory. Two spellings of the same configuration directory therefore produced different targetPath strings and bypassed assertDistinctConfigurationTargets, allowing one setup to overwrite another agent's configuration target.

Validation

  • npx tsc --noEmit
  • npx eslint src/ test/ (0 errors; one pre-existing warning in test/sdk/speech.test.ts)
  • git diff --check
  • Windows Node runtime probe: the unpatched path comparison returned NO_ERROR; the patched branch raised the duplicate-target error
  • bun test not run because Bun is unavailable in the validation environment

Fixes #257


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@dvd233 dvd233 closed this Sep 22, 2026
@dvd233
dvd233 deleted the fix/windows-config-path-collision branch September 22, 2026 19:35
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] Windows 下 agent setup 无法识别仅大小写不同的重复配置路径

1 participant