Skip to content

fix(flows): return one canonical path form from flow discovery - #1415

Merged
Simon Ingeson (smonn) merged 2 commits into
mainfrom
wiz-11287-normalize-glob-paths
Jul 30, 2026
Merged

fix(flows): return one canonical path form from flow discovery#1415
Simon Ingeson (smonn) merged 2 commits into
mainfrom
wiz-11287-normalize-glob-paths

Conversation

@smonn

@smonn Simon Ingeson (smonn) commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

tinyglobby emits forward slashes on win32 while the rest of the CLI joins with node:path, so remapPath in prepareRunDir compared 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 #playwright alias.

Fixed at the expandPatterns boundary rather than in remapPath: I audited eleven consumers of glob output and remapPath was the only one that mismatches, so one canonical form at the source covers it. Note the test change only fails on win32 — sep is / on POSIX — so windows-smoke is what verifies this.

Resolves WIZ-11287

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.
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

expandPatterns now resolves glob matches before adding them to the discovered-file set and logging them, keeping path separators consistent with later staging logic. Tests now assert directly against join(...)-derived paths across environment directories, multiple environments, and default JavaScript/TypeScript discovery. A changeset records a patch release for @qawolf/cli.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • qawolf/cli#1412: Updates related Windows path-separator expectations in expand.test.ts.
🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the fix but omits the required Overview, Testing, and Checklist sections from the template. Add the required section headings, concrete verification commands or steps, and the checklist items from the template.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title matches the change and follows Conventional Commits with a specific, imperative summary.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch wiz-11287-normalize-glob-paths

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 67e8ce1 and ba45b94.

📒 Files selected for processing (3)
  • .changeset/windows-glob-path-separators.md
  • src/domains/flows/expand.test.ts
  • src/domains/flows/expand.ts

Comment thread src/domains/flows/expand.test.ts Outdated
@smonn
Simon Ingeson (smonn) merged commit 2f5e7cc into main Jul 30, 2026
7 checks passed
@smonn
Simon Ingeson (smonn) deleted the wiz-11287-normalize-glob-paths branch July 30, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants