Skip to content

fix: compare Windows scheduled-import paths case-insensitively#582

Open
chuenchen309 wants to merge 1 commit into
nashsu:mainfrom
chuenchen309:fix/scheduled-import-windows-case
Open

fix: compare Windows scheduled-import paths case-insensitively#582
chuenchen309 wants to merge 1 commit into
nashsu:mainfrom
chuenchen309:fix/scheduled-import-windows-case

Conversation

@chuenchen309

Copy link
Copy Markdown
Contributor

Why

The scheduled-import self-import guard compares normalized paths case-sensitively. On Windows, the same project can therefore appear unrelated when a drive-letter or UNC path uses different casing, allowing a project-managed directory to be selected as an external scheduled-import root.

What

Reuse the existing scheduled-import database path key for both sides of containment checks. That key case-folds drive-letter and UNC paths while leaving POSIX paths case-sensitive.

Tests

  • Added regression coverage for drive-letter paths, UNC paths, and POSIX case sensitivity
  • Parent commit repro: 1 failed / 12 passed (false, expected true)
  • npm run test:mocks -- src/lib/scheduled-import.test.ts (13 passed)
  • npm run test:mocks (115 files, 1676 tests passed)
  • npm run typecheck
  • npm run build

Disclosure: this focused change was produced with AI assistance and validated with the regression test, full mock suite, typecheck, and production build.

Reuse the scheduled-import database path key for containment checks so drive-letter and UNC paths follow Windows case-insensitive filesystem semantics.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant