fix(flows): return one canonical path form from flow discovery - #1415
Conversation
tinyglobby emits forward slashes on win32. The rest of the CLI joins paths with node:path and gets backslashes. prepareRunDir's remapPath compares the two spellings with a literal sep, so the guard never matched. It returned the unstaged source path, and flows ran outside the prepared run dir. Measured on windows-latest for WIZ-11287.
Walkthrough
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/domains/flows/expand.test.ts`:
- Around line 147-148: Update the comment near the path assertions in the expand
tests to state that glob output uses forward slashes while join-derived expected
paths use platform-native separators, including backslashes on win32.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: b76b2840-83ab-4855-9976-bf37ec2a0463
📒 Files selected for processing (3)
.changeset/windows-glob-path-separators.mdsrc/domains/flows/expand.test.tssrc/domains/flows/expand.ts
tinyglobby emits forward slashes on win32 while the rest of the CLI joins with
node:path, soremapPathinprepareRunDircompared two spellings of the same path and never matched. Staging silently fell through and flows ran from the user's tree, outside the prepared run dir — bypassing the pinned executor and the#playwrightalias.Fixed at the
expandPatternsboundary rather than inremapPath: I audited eleven consumers of glob output andremapPathwas the only one that mismatches, so one canonical form at the source covers it. Note the test change only fails on win32 —sepis/on POSIX — sowindows-smokeis what verifies this.Resolves WIZ-11287