Skip to content

fix(cli): canonicalize architecture comparison paths on Windows - #880

Merged
blafourcade merged 1 commit into
ai-driven-dev:nextfrom
kevin-lozada-santos:fix/windows-architecture-paths
Sep 20, 2026
Merged

blafourcade merged 1 commit into
ai-driven-dev:nextfrom
kevin-lozada-santos:fix/windows-architecture-paths

Conversation

@kevin-lozada-santos

Copy link
Copy Markdown
Contributor

What & why

Native Windows path separators make the architecture rules select no source files or miss import edges. This normalizes the comparison keys while leaving filesystem operations native.

How it works

helpers.ts canonicalizes sourceFiles, pluginReadmes, and relative import targets together. The separate test/port producers and diagnostic paths use the same conversion. Zero-selection assertions and debt baselines remain intact.

Eight ordinary Vitest cases cover explicit backslash inputs on any platform, nonempty source/plugin scopes, and an actual relative-import lookup.

How to verify

From cli/, run pnpm exec vitest run --project=architecture tests/architecture/paths-select-source.arch.test.ts and pnpm test:arch.

Native Windows, Node 22.23.1:

  • Eight new regressions and the affected architecture suites: 37 passed. Biome check on all six changed files passes.
  • Clean base 83b0246e: 79 passed, 21 failed, 2 collection errors. Candidate: 117 passed, 5 failed, 1 collection error, with no newly failing assertions.

Heads-up

The full architecture suite is not green: three Biome launcher checks, the workflow parser, the codebase-map fenced-block check, and mutation-covers-source still fail. Those files are unchanged. docs-do-not-lie now collects through the corrected shared command-path lookup.

The candidate was rerun with declared pnpm 12.3.4; dependencies were originally installed with 11.19.0 and --ignore-scripts, not freshly installed with 12.3.4. Linux was not run locally; explicit backslash tests are in the normal Vitest architecture project. The Biome launcher defect is tracked separately as requested.

Linked issue

Closes #863.

I certify

  • I DO CERTIFY I READ EACH LINE OF THE PULL REQUEST BECAUSE I AM A SOFTWARE ENGINEER, NOT A AI PUPPY.

@kevin-lozada-santos
kevin-lozada-santos requested a review from a team as a code owner September 17, 2026 20:04
@blafourcade
blafourcade merged commit 16c7c65 into ai-driven-dev:next Sep 20, 2026
24 checks passed
@aidd-bot aidd-bot Bot mentioned this pull request Sep 24, 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