fix: normalize --files paths to forward-slash across platforms (FN-029)#9
Merged
Merged
Conversation
The Windows CI matrix caught a bug invisible to Linux-only local runs: --files glob expansion used str(Path.relative_to), which yields backslash separators on Windows and wrote them into the committed docs/TASKS.md scope block. The drive-check scope gate matches that block against git output (always forward-slash), so Windows-declared scopes silently failed to match their own changed files, and TASKS.md was not portable across machines. Patterns are now normalized to forward-slash BEFORE globbing (so a Windows 'src\\dir\\*.ts' still expands) and all stored paths use Path.as_posix(), including the done-report backlinks in TASKS.md/PROGRESS.md. The FN-021 regression test feeds a backslash pattern and asserts the committed Allowed scope has no backslash, enforcing the contract even on Linux (76 total). Co-authored-by: v0 <it+v0agent@vercel.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
The Windows CI matrix caught a bug invisible to Linux-only local runs.
--filesglob expansion usedstr(Path.relative_to), which yields backslash separators on Windows and wrote them into the committeddocs/TASKS.mdscope block. The drive-check scope gate matches that block againstgitoutput (always forward-slash), so Windows-declared scopes silently failed to match their own changed files, and TASKS.md was not portable across machines.Patterns are now normalized to forward-slash BEFORE globbing (so a Windows
src\dir\*.tsstill expands) and all stored paths usePath.as_posix(), including done-report backlinks in TASKS.md/PROGRESS.md. The FN-021 regression test feeds a backslash pattern and asserts the committed Allowed scope has no backslash, enforcing the contract even on Linux (76 total).Co-authored-by: v0 it+v0agent@vercel.com