Scripts: handle square brackets in smoke test paths #578

Open
zohaiblazuli wants to merge 1 commit from upstream-pr/583 into main
zohaiblazuli commented 2026-11-24 02:07:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by zohaiblazuli on 2026-11-24T02:07:22Z.


PowerShell treats square brackets as wildcard patterns in path arguments. This can cause scripts/smoke.ps1 to reject an existing XCL executable or miss the log and adapter report.

What is in it

  • Use literal paths in scripts/smoke.ps1, add a synthetic regression test, and document support in the README.

Tested

  • Commit e5200275f3d18af00cb6b302d05c8289bc31bad7, debug, Windows 11 Pro 26300, i5-14600K, RTX 3060 (driver 32.0.16.1742), Rust 1.94.0 MSVC, DXC 1.9.0.5512.
  • powershell.exe -NoProfile -NonInteractive -File scripts/test.ps1: 684 passed, 0 failed, 41 ignored. Two tests included in the pass count skipped native wave64: gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware.
  • powershell.exe -NoProfile -NonInteractive -File scripts/smoke-paths.tests.ps1 and pwsh.exe -NoProfile -NonInteractive -File scripts/smoke-paths.tests.ps1: one regression test passed on each shell (Windows PowerShell 5.1 and PowerShell 7.6.9). The test failed on the original script in both shells.

Not tested

  • Retail titles, optional game samples, and release builds.

AI use

  • OpenAI Codex (GPT-6.2 Sol) wrote the patch and test, ran the checks, and drafted this description.
<!-- greyfinch-sync:ivall/xcl:issue:5464713819 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/583). Originally posted by [zohaiblazuli](https://github.com/zohaiblazuli) on 2026-11-24T02:07:22Z. --- PowerShell treats square brackets as wildcard patterns in path arguments. This can cause `scripts/smoke.ps1` to reject an existing XCL executable or miss the log and adapter report. **What is in it** - Use literal paths in `scripts/smoke.ps1`, add a synthetic regression test, and document support in the README. **Tested** - Commit `e5200275f3d18af00cb6b302d05c8289bc31bad7`, debug, Windows 11 Pro 26300, i5-14600K, RTX 3060 (driver 32.0.16.1742), Rust 1.94.0 MSVC, DXC 1.9.0.5512. - `powershell.exe -NoProfile -NonInteractive -File scripts/test.ps1`: 684 passed, 0 failed, 41 ignored. Two tests included in the pass count skipped native wave64: `gpu_geometry_wave32_prefix_count_over_a_mask` and `gpu_wave32_program_in_wave64_hardware`. - `powershell.exe -NoProfile -NonInteractive -File scripts/smoke-paths.tests.ps1` and `pwsh.exe -NoProfile -NonInteractive -File scripts/smoke-paths.tests.ps1`: one regression test passed on each shell (Windows PowerShell 5.1 and PowerShell 7.6.9). The test failed on the original script in both shells. **Not tested** - Retail titles, optional game samples, and release builds. **AI use** - OpenAI Codex (GPT-6.2 Sol) wrote the patch and test, ran the checks, and drafted this description.
fladit123 commented 2026-11-24 07:05:31 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fladit123 on 2026-11-24T02:12:52Z.


Independent validation on Windows PowerShell 5.1 and PowerShell 7.6.10.

Tested

  • Windows 11 Pro build 26300.
  • Windows PowerShell 5.1.26100.10068 and PowerShell 7.6.10.
  • Base: 9ce2070eccf436d7bd38601c90407da447df34f3.
  • PR head: e5200275f3d18af00cb6b302d05c8289bc31bad7.
Configuration Base PR
Windows PowerShell 5.1 FAIL (exit 1) PASS (exit 0)
PowerShell 7.6.10 FAIL (exit 1) PASS (exit 0)
PowerShell 5.1 with extended temporary path Not tested PASS (exit 0)

The original script failed at smoke.ps1:15, incorrectly reporting that the existing [xcl]\xcl.cmd executable could not be found.

For the extended test, I set TEMP and TMP to a temporary directory named XCL Test [Regression] <GUID>, adding spaces and another pair of square brackets to the fixture path. The regression test passed.

Both PowerShell versions were invoked with -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned. No persistent execution policy changes were made.

The PR worktree remained clean after testing.

Not tested: full workspace suite, retail titles or release builds.

No blocking findings within the tested scope.

AI use: ChatGPT (GPT-6.2) assisted with diff review, test planning and report preparation. All commands were executed locally by me.

<!-- greyfinch-sync:ivall/xcl:comment:7119875288 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/583#issuecomment-7119875288). Originally posted by [fladit123](https://github.com/fladit123) on 2026-11-24T02:12:52Z. --- Independent validation on Windows PowerShell 5.1 and PowerShell 7.6.10. **Tested** - Windows 11 Pro build 26300. - Windows PowerShell 5.1.26100.10068 and PowerShell 7.6.10. - Base: `9ce2070eccf436d7bd38601c90407da447df34f3`. - PR head: `e5200275f3d18af00cb6b302d05c8289bc31bad7`. | Configuration | Base | PR | |---|---|---| | Windows PowerShell 5.1 | FAIL (exit 1) | PASS (exit 0) | | PowerShell 7.6.10 | FAIL (exit 1) | PASS (exit 0) | | PowerShell 5.1 with extended temporary path | Not tested | PASS (exit 0) | The original script failed at `smoke.ps1:15`, incorrectly reporting that the existing `[xcl]\xcl.cmd` executable could not be found. For the extended test, I set `TEMP` and `TMP` to a temporary directory named `XCL Test [Regression] <GUID>`, adding spaces and another pair of square brackets to the fixture path. The regression test passed. Both PowerShell versions were invoked with `-NoProfile -NonInteractive -ExecutionPolicy RemoteSigned`. No persistent execution policy changes were made. The PR worktree remained clean after testing. **Not tested:** full workspace suite, retail titles or release builds. No blocking findings within the tested scope. **AI use:** ChatGPT (GPT-6.2) assisted with diff review, test planning and report preparation. All commands were executed locally by me.
Alpha325 commented 2026-11-25 03:05:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Alpha325 on 2026-11-25T02:31:25Z.


I added a synthetic case with sibling folders named [xcl] and x, each containing a different log and adapter report. The launcher sits outside both folders so the test reaches log parsing independently of executable path validation.

  • Parent 9ce2070: the smoke block reported exit: 0x0, but used the wildcard match in x (97 frames, 98 PresentX calls, and the wrong adapter).
  • PR e520027: the block used the literal [xcl] files (7 frames, 8 PresentX calls, and the expected adapter). The bracketed launcher also passed.

Both results reproduced on Windows 11 build 26200 with Windows PowerShell 5.1.26100.9818 and PowerShell 7.6.9. The patch changes only the synthetic fixture.

AI use — OpenAI Codex (GPT-6) wrote and ran the fixture and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7150833101 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/583#issuecomment-7150833101). Originally posted by [Alpha325](https://github.com/Alpha325) on 2026-11-25T02:31:25Z. --- I added a synthetic case with sibling folders named `[xcl]` and `x`, each containing a different log and adapter report. The launcher sits outside both folders so the test reaches log parsing independently of executable path validation. - Parent `9ce2070`: the smoke block reported `exit: 0x0`, but used the wildcard match in `x` (97 frames, 98 PresentX calls, and the wrong adapter). - PR `e520027`: the block used the literal `[xcl]` files (7 frames, 8 PresentX calls, and the expected adapter). The bracketed launcher also passed. Both results reproduced on Windows 11 build 26200 with Windows PowerShell 5.1.26100.9818 and PowerShell 7.6.9. The patch changes only the synthetic fixture. AI use — OpenAI Codex (GPT-6) wrote and ran the fixture and drafted this report.
DavidM1911 commented 2026-11-25 14:09:57 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T13:18:39Z.


Verification on RTX 3060 Ti (Windows 11): merge conflict with current main — needs a rebase before it can be tested.

<!-- greyfinch-sync:ivall/xcl:comment:7163591545 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/583#issuecomment-7163591545). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T13:18:39Z. --- Verification on RTX 3060 Ti (Windows 11): **merge conflict with current `main`** — needs a rebase before it can be tested.
RavenCurseBurg commented 2026-11-25 19:09:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by RavenCurseBurg on 2026-11-25T18:35:53Z.


I reproduced the conflicts in README.md and scripts/smoke.ps1 and prepared a tested merge commit. Its first parent is this PR's e520027 and its second is main at 3f2777019544. The PR branch can fast-forward to it.

The artifact-saving code on main also needs literal path checks. After resolving just the textual conflicts, the smoke block read the correct adapter, but the report was missing from the bracketed artifact directory. The extended smoke-paths.tests.ps1 failed that assertion in both shells. Applying literal checks to the artifact paths made it pass.

  • On the final merge I ran scripts/smoke-paths.tests.ps1, scripts/smoke-title.tests.ps1 and scripts/test-smoke-artifacts.tests.ps1 in Windows PowerShell 5.1.26100.9711 and PowerShell 7.6.9. All passed.
  • In both shells I also ran smoke.ps1 -Xcl <stub.cmd> -Game <fixture> -OutDir <bracketed directory> -Seconds 1. With wildcard-matching siblings present, the new artifact directory received the exact report from [xcl]. After removing the source report, the next run used the simulated fallback adapter, removed the stale copy and left the sibling output untouched. The block and manifest kept the expected frame count.

Windows 11 build 26100.9711, i7-13700. Synthetic logs, reports and launcher only. No retail run, GPU or Rust suite. OpenAI Codex (GPT-6) resolved the conflicts, extended the test and ran the checks.

<!-- greyfinch-sync:ivall/xcl:comment:7171129122 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/583#issuecomment-7171129122). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T18:35:53Z. --- I reproduced the conflicts in `README.md` and `scripts/smoke.ps1` and prepared a [tested merge commit](https://github.com/RavenCurseBurg/xcl/commit/1edea7e5b65f39c0a72096725099a701b7dccd9a). Its first parent is this PR's `e520027` and its second is `main` at `3f2777019544`. The PR branch can fast-forward to it. The artifact-saving code on main also needs literal path checks. After resolving just the textual conflicts, the smoke block read the correct adapter, but the report was missing from the bracketed artifact directory. The extended `smoke-paths.tests.ps1` failed that assertion in both shells. Applying literal checks to the artifact paths made it pass. - On the final merge I ran `scripts/smoke-paths.tests.ps1`, `scripts/smoke-title.tests.ps1` and `scripts/test-smoke-artifacts.tests.ps1` in Windows PowerShell 5.1.26100.9711 and PowerShell 7.6.9. All passed. - In both shells I also ran `smoke.ps1 -Xcl <stub.cmd> -Game <fixture> -OutDir <bracketed directory> -Seconds 1`. With wildcard-matching siblings present, the new artifact directory received the exact report from `[xcl]`. After removing the source report, the next run used the simulated fallback adapter, removed the stale copy and left the sibling output untouched. The block and manifest kept the expected frame count. Windows 11 build 26100.9711, i7-13700. Synthetic logs, reports and launcher only. No retail run, GPU or Rust suite. OpenAI Codex (GPT-6) resolved the conflicts, extended the test and ran the checks.
github-actions[bot] commented 2026-11-29 20:43:28 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T20:43:28Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7262307138 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/583#issuecomment-7262307138). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T20:43:28Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 03:44:52 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T03:44:52Z.


Triage (#1607) – head e520027

#2716 makes the same -LiteralPath change for the log and report.json reads in scripts/smoke.ps1; it also covers -OutDir but not the Test-Path $Xcl check that this PR fixes, so neither contains the other.
The README addition only restates a script detail and is not needed for this fix.
The PR conflicts with main (smoke.ps1 has since gained -Title, -OutDir and a .cmd launcher branch) and needs a rebase.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7300022645 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/583#issuecomment-7300022645). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T03:44:52Z. --- **Triage (#1607)** – head e520027 #2716 makes the same `-LiteralPath` change for the log and report.json reads in scripts/smoke.ps1; it also covers `-OutDir` but not the `Test-Path $Xcl` check that this PR fixes, so neither contains the other. The README addition only restates a script detail and is not needed for this fix. The PR conflicts with main (smoke.ps1 has since gained -Title, -OutDir and a .cmd launcher branch) and needs a rebase. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/583:upstream-pr/583'
git switch 'upstream-pr/583'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/583'
git switch 'upstream-pr/583'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/583'
git switch 'upstream-pr/583'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/583'
git switch 'main'
git merge --squash 'upstream-pr/583'
git switch 'main'
git merge --ff-only 'upstream-pr/583'
git switch 'main'
git merge 'upstream-pr/583'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!578
No description provided.