fix(scan): emit POSIX separators in Windows inventory - #303
Draft
SAYUTIM wants to merge 1 commit into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #302.
Summary
--path-separator /to ripgrep when generating the shared in-scope inventory.Root cause
On Windows, ripgrep prints paths with the platform-native
\separator by default. The inventory helper preserved that output, while the existing parser rejects backslashes and expects repository-relative paths separated with/, causing setup validation to fail before discovery.Selecting
/at the producer aligns the generated representation with the existing parser without changing its validation rules.Impact
The reproduced repository-wide Deep Scan inventory can pass bundled path validation on native Windows instead of being rejected for its separator representation before discovery.
Regression coverage
The focused regression invokes the shipped Python helper against a temporary repository, checks complete inventory rows, verifies the ignored nested file remains included, and passes the portable inventory through the bundled parser validation logic. It verifies repeated output is byte-identical and uses a separate POSIX producer control to confirm that literal backslash and colon filename characters are not rewritten.
The regression failed against the unmodified implementation, passed with the fix, failed again when only the production option was temporarily removed, and passed after restoration.
Verification
bun test --timeout 30000 ./tests-ts/runtime.test.ts -t "generates canonical scoped security inventory paths"on native Windows — 1 passed, 109 filtered, 0 failedbun test --timeout 30000 ./tests-ts/runtime.test.tson native Windows — 86 passed, 24 skipped, 0 failedcorepack pnpm run types— passedcorepack pnpm run format— passedcorepack pnpm run build— passedpython -m py_compile _bundled_plugin/scripts/generate_in_scope_files.py— passedcorepack pnpm run check:package ../../dist/*.tgzunder Git Bash — 198 entries and the installed package validatedcorepack pnpm run test:package— installed-package smoke test passedgit diff --check— passedScope
This change does not modify repository-path validation, traversal or drive-prefix checks, Deep Scan orchestration, dependencies, lockfiles, or release configuration.
Remaining limitations
The local complete SDK run finished with 888 passed, 54 skipped, and 10 environment-only failures that reproduce on the untouched base: Windows symlink creation is unavailable,
jqis absent from the local Git Bash environment, and one control-character filename fixture fails with the local Python/Windows combination. This PR is initially a draft pending the repository's cross-platform CI results.