Repository navigation
fix: normalize Windows path keys in harness generation - #667
Open
rudycelekli wants to merge 1 commit into
Open
rudycelekli wants to merge 1 commit into
rudycelekli wants to merge 1 commit into
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.
The harness generator indexes copied files using native
path.relative()results, then looks them up using slash-separated skill paths. Windows relative paths contain backslashes, causing rendering to crash atfiles.get(path).bytes. Native disk keys would also disagree with generated keys during--check.Normalize keys to POSIX separators at both boundaries while keeping filesystem paths native. Add a regression that runs the full production check with native and actual
path.win32relative-path semantics, and run it in CI.Validation: both regression cases pass; the unchanged generator passes the native case and fails the Windows-separator case. Separate production write runs generated 139 files each, with all filenames, bytes and executable flags matching the committed tree. Tests ran on macOS; this verifies Windows path semantics, not a native Windows filesystem. AI-assisted implementation and testing.
Note
Low Risk
Build/CI script changes only; no runtime product behavior beyond fixing cross-platform harness generation.
Overview
Fixes harness tree generation and
--checkon Windows by normalizingpath.relative()map keys to POSIX (/) separators while leaving real filesystem paths native.In
generate-pstack-harness-trees.mjs, both the rendered file index and the on-disk comparison now use.split(sep).join(posix.sep)so lookups likeskills/.../SKILL.mdmatch on Windows (where relative paths use backslashes).Adds
generate-pstack-harness-trees.test.mjs, which runs the full production--checkin a VM with native paths and withnode:pathstubbed towin32.relative/win32.sep. CI runs this test invalidate-plugins.yml.Reviewed by Cursor Bugbot for commit e56550c. Bugbot is set up for automated code reviews on this repo. Configure here.