Scripts: require locked dependencies in workspace tests #2360

Open
fladit123 wants to merge 1 commit from upstream-pr/2370 into main
fladit123 commented 2026-11-25 16:54:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fladit123 on 2026-11-25T16:54:43Z.


scripts/test.ps1 now requires Cargo to use the checked-in Cargo.lock for workspace builds and tests. Cargo fails if the lockfile is missing or needs to be updated.

What is in it

  • Add --locked to both Cargo invocations in scripts/test.ps1.
  • Extend the synthetic Cargo fixture in scripts/test-native-stderr.tests.ps1 to verify both command lines and forwarded test arguments.
  • Document the lockfile requirement in README.md.

Tested

  • HEAD: 33c9081bebc486510711e986adbc891ae30b6113.
  • Tested tree: 01ff2bd414a800a89072450fa16d9d85b60c282a, identical to the committed tree.
  • Base: c160d86ef2efe3a07e4dfb473e4fa72eafb413c0.
  • Windows 11 build 26300.10075, Intel Core i5-12400F, NVIDIA RTX 4060 8 GB (driver 610.88), Rust 1.100.0 MSVC, DXC 1.8.2502.11, debug.

pwsh -NoProfile -File scripts/test-native-stderr.tests.ps1 on PowerShell 7.6.9:

  • Candidate: PASS.
  • Original runner: FAIL, as expected.
  • Removing either --locked flag individually: FAIL, as expected.
  • Separate synthetic runs confirmed build exit 17 without starting tests, and test exit 101.

./scripts/test.ps1 --show-output:

  • Workspace build: PASS.
  • Workspace tests, four threads: 858 passed, 0 failed, 42 ignored.
  • Bundled synthetic title: PASS.
  • Cargo offline, sample variables unset.
  • Cargo.lock unchanged.

Explicit GPU skips included in the passed count:

  • gpu_geometry_wave32_prefix_count_over_a_mask: no wave64.
  • gpu_wave32_program_in_wave64_hardware: no wave64.
  • heap_window_out_of_memory_falls_back_to_the_switch_form: heap windows unavailable.

Merge compatibility with main 50a9fdef81cb796b8756a31defb0648301d002ce verified using git merge-tree --write-tree, exit 0. The merged tree itself was not tested.

Not tested

  • Windows PowerShell 5.1: script execution blocked by the effective Restricted execution policy.
  • Release builds, AMD and Intel GPUs, macOS and Linux.
  • External game samples and retail smoke runs. No runtime code changed.

AI use

  • OpenAI Codex, based on GPT-6 (exact model variant unavailable), implemented the changes, ran local validation and drafted the description.
  • ChatGPT (GPT-6.2) assisted with task selection, patch review and reporting.
<!-- greyfinch-sync:ivall/xcl:issue:5495519845 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2370). Originally posted by [fladit123](https://github.com/fladit123) on 2026-11-25T16:54:43Z. --- `scripts/test.ps1` now requires Cargo to use the checked-in `Cargo.lock` for workspace builds and tests. Cargo fails if the lockfile is missing or needs to be updated. **What is in it** - Add `--locked` to both Cargo invocations in `scripts/test.ps1`. - Extend the synthetic Cargo fixture in `scripts/test-native-stderr.tests.ps1` to verify both command lines and forwarded test arguments. - Document the lockfile requirement in `README.md`. **Tested** - HEAD: `33c9081bebc486510711e986adbc891ae30b6113`. - Tested tree: `01ff2bd414a800a89072450fa16d9d85b60c282a`, identical to the committed tree. - Base: `c160d86ef2efe3a07e4dfb473e4fa72eafb413c0`. - Windows 11 build 26300.10075, Intel Core i5-12400F, NVIDIA RTX 4060 8 GB (driver 610.88), Rust 1.100.0 MSVC, DXC 1.8.2502.11, debug. `pwsh -NoProfile -File scripts/test-native-stderr.tests.ps1` on PowerShell 7.6.9: - Candidate: PASS. - Original runner: FAIL, as expected. - Removing either `--locked` flag individually: FAIL, as expected. - Separate synthetic runs confirmed build exit 17 without starting tests, and test exit 101. `./scripts/test.ps1 --show-output`: - Workspace build: PASS. - Workspace tests, four threads: **858 passed, 0 failed, 42 ignored**. - Bundled synthetic title: PASS. - Cargo offline, sample variables unset. - `Cargo.lock` unchanged. Explicit GPU skips included in the passed count: - `gpu_geometry_wave32_prefix_count_over_a_mask`: no wave64. - `gpu_wave32_program_in_wave64_hardware`: no wave64. - `heap_window_out_of_memory_falls_back_to_the_switch_form`: heap windows unavailable. Merge compatibility with main `50a9fdef81cb796b8756a31defb0648301d002ce` verified using `git merge-tree --write-tree`, exit 0. The merged tree itself was not tested. **Not tested** - Windows PowerShell 5.1: script execution blocked by the effective Restricted execution policy. - Release builds, AMD and Intel GPUs, macOS and Linux. - External game samples and retail smoke runs. No runtime code changed. **AI use** - OpenAI Codex, based on GPT-6 (exact model variant unavailable), implemented the changes, ran local validation and drafted the description. - ChatGPT (GPT-6.2) assisted with task selection, patch review and reporting.
RavenCurseBurg commented 2026-11-25 17:07:36 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by RavenCurseBurg on 2026-11-25T17:06:10Z.


I tested the proposed #2295-first order. On #2295 8bd87ea4f126ab3ec13635aef78351da2496df7f, the runner already matches #2370 33c9081bebc486510711e986adbc891ae30b6113 byte for byte. The fixture and README changes applied directly.

Follow-up commit on #2295, retaining fladit123 as author. Its diff against #2295 contains just the README and scripts/test-native-stderr.tests.ps1. I checked that the resulting runner and fixture both match the #2370 blobs.

-NoProfile -NonInteractive -ExecutionPolicy Bypass -File scripts/test-native-stderr.tests.ps1 passed on Windows PowerShell 5.1 and PowerShell 7.6.9. Against three independent local changes, each shell rejected omitting build --locked, omitting test --locked, and dropping the forwarded filter arguments (6/6). Windows 11 26100.9711, i7-13700. All Cargo calls used the checked-in stand-in. OpenAI Codex (GPT-6) prepared and tested the integration.

Earlier standalone runner checks

Windows PowerShell 5.1.26100.9711 and PowerShell 7.6.9 both passed scripts/test-native-stderr.tests.ps1 on 33c9081bebc486510711e986adbc891ae30b6113. I used -NoProfile -NonInteractive -ExecutionPolicy Bypass -File for the individual test processes.

I also formed a clean merge against main 68a284a596bd558b6bd9db6eedda6d6aa178c360 with git merge-tree --write-tree (tree 0129b363e841ed61006aa43641e338582799207b). I ran the runner and native-stderr fixture extracted from that tree. Both script blobs matched the PR head. In both shells the checked-in fixture passed. Separately, I verified three outcomes per shell on each tree using a native Cargo stand-in that logged its calls:

  • Build and test succeeded: exit 0, both commands used --locked --workspace, and test received -- --test-threads=4 --skip fixture_case --nocapture.
  • Build returned 17: the wrapper returned 17 without starting tests.
  • Test returned 101: the wrapper returned 101.

Windows 11 26100.9711, i7-13700, RTX 4060. This covers the PowerShell wrapper and its arguments on Windows 5.1 and 7. No real Cargo build, lockfile resolution, GPU or retail run. OpenAI Codex (GPT-6) ran the checks and prepared this report.

<!-- greyfinch-sync:ivall/xcl:comment:7169007101 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2370#issuecomment-7169007101). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T17:06:10Z. --- I tested the [proposed #2295-first order](https://github.com/xcl-dev/xcl/pull/2370#issuecomment-7175927917). On #2295 `8bd87ea4f126ab3ec13635aef78351da2496df7f`, the runner already matches #2370 `33c9081bebc486510711e986adbc891ae30b6113` byte for byte. The fixture and README changes applied directly. [Follow-up commit on #2295, retaining fladit123 as author](https://github.com/RavenCurseBurg/xcl/commit/048bebe1d2bd737721504385ba20709181e80cb3). Its diff against #2295 contains just the README and `scripts/test-native-stderr.tests.ps1`. I checked that the resulting runner and fixture both match the #2370 blobs. `-NoProfile -NonInteractive -ExecutionPolicy Bypass -File scripts/test-native-stderr.tests.ps1` passed on Windows PowerShell 5.1 and PowerShell 7.6.9. Against three independent local changes, each shell rejected omitting build `--locked`, omitting test `--locked`, and dropping the forwarded filter arguments (6/6). Windows 11 26100.9711, i7-13700. All Cargo calls used the checked-in stand-in. OpenAI Codex (GPT-6) prepared and tested the integration. <details><summary>Earlier standalone runner checks</summary> Windows PowerShell 5.1.26100.9711 and PowerShell 7.6.9 both passed `scripts/test-native-stderr.tests.ps1` on `33c9081bebc486510711e986adbc891ae30b6113`. I used `-NoProfile -NonInteractive -ExecutionPolicy Bypass -File` for the individual test processes. I also formed a clean merge against main `68a284a596bd558b6bd9db6eedda6d6aa178c360` with `git merge-tree --write-tree` (tree `0129b363e841ed61006aa43641e338582799207b`). I ran the runner and native-stderr fixture extracted from that tree. Both script blobs matched the PR head. In both shells the checked-in fixture passed. Separately, I verified three outcomes per shell on each tree using a native Cargo stand-in that logged its calls: - Build and test succeeded: exit 0, both commands used `--locked --workspace`, and test received `-- --test-threads=4 --skip fixture_case --nocapture`. - Build returned 17: the wrapper returned 17 without starting tests. - Test returned 101: the wrapper returned 101. Windows 11 26100.9711, i7-13700, RTX 4060. This covers the PowerShell wrapper and its arguments on Windows 5.1 and 7. No real Cargo build, lockfile resolution, GPU or retail run. OpenAI Codex (GPT-6) ran the checks and prepared this report. </details>
throny commented 2026-11-25 18:04:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-25T17:58:38Z.


Two contributors checked independently and found that #2295 solves the same problem (for #2214) in a different way: #1607, group D104. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.

This is a hint from the community triage in #1607, not a maintainer decision.

AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.

<!-- greyfinch-sync:ivall/xcl:comment:7170264355 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2370#issuecomment-7170264355). Originally posted by [throny](https://github.com/throny) on 2026-11-25T17:58:38Z. --- <!-- xcl-1607-hint:D104 --> Two contributors checked independently and found that #2295 solves the same problem (for #2214) in a different way: #1607, group D104. You may want to compare them with the other author and agree on one, or say in the PR why both are needed. This is a hint from the community triage in #1607, not a maintainer decision. AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
DavidM1911 commented 2026-11-25 19:09:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T18:50:23Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7171472174 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2370#issuecomment-7171472174). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T18:50:23Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
fladit123 commented 2026-11-25 20:08:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fladit123 on 2026-11-25T19:27:48Z.


Thanks @throny for identifying the overlap, and @RavenCurseBurg and @DavidM1911 for the independent validation!

I compared the current patches of #2370 and #2295. Both add the same two --locked flags to scripts/test.ps1.

My PR additionally extends the native Cargo fixture to verify both command lines and forwarded test arguments, and documents the lockfile requirement in the README. #2295 addresses the broader toolchain-pinning and CI changes.

@WASDeKeys, would you be open to keeping #2370 as the focused, regression-tested runner change and building the remaining toolchain changes on top of it? Alternatively, I'm happy to coordinate incorporating my regression tests into your PR if the maintainers prefer a single contribution.

I would prefer to avoid duplicate changes and unnecessary merge conflicts.

<!-- greyfinch-sync:ivall/xcl:comment:7172330402 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2370#issuecomment-7172330402). Originally posted by [fladit123](https://github.com/fladit123) on 2026-11-25T19:27:48Z. --- Thanks @throny for identifying the overlap, and @RavenCurseBurg and @DavidM1911 for the independent validation! I compared the current patches of #2370 and #2295. Both add the same two `--locked` flags to `scripts/test.ps1`. My PR additionally extends the native Cargo fixture to verify both command lines and forwarded test arguments, and documents the lockfile requirement in the README. #2295 addresses the broader toolchain-pinning and CI changes. @WASDeKeys, would you be open to keeping #2370 as the focused, regression-tested runner change and building the remaining toolchain changes on top of it? Alternatively, I'm happy to coordinate incorporating my regression tests into your PR if the maintainers prefer a single contribution. I would prefer to avoid duplicate changes and unnecessary merge conflicts.
WASDeKeys commented 2026-11-25 22:06:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by WASDeKeys on 2026-11-25T22:05:42Z.


Hi @fladit123

Thank you for your offer and for the validation from
@RavenCurseBurg , @DavidM1911 and @throny . I appreciate the
coordination help.

Given that my PR (#2295) addresses broader
toolchain-pinning and CI changes, which are more
foundational and impactful, I think it would make sense
to keep it as the primary PR. However, I understand the
value of your PR (#2370), which extends the native Cargo and makes specific
fixture and documents the lockfile requirement.

To ensure that both PRs get merged, I propose the
following approach:

  1. Merge #2295 first: This will ensure that the broader
    foundational changes are reviewed and merged first.
  2. Create a follow-up PR for #2370: The focused runner
    changes and additional documentation can be addressed
    in a separate PR after #2295 is
    merged.

I'm happy to help incorporate any additional regression
tests or documentation from #2370 into my PR if that
would be helpful. This way, we can ensure that both sets
of changes are properly reviewed and merged, and we can
avoid any unnecessary merge conflicts.

Let me know!

<!-- greyfinch-sync:ivall/xcl:comment:7175927917 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2370#issuecomment-7175927917). Originally posted by [WASDeKeys](https://github.com/WASDeKeys) on 2026-11-25T22:05:42Z. --- Hi @fladit123 Thank you for your offer and for the validation from @RavenCurseBurg , @DavidM1911 and @throny . I appreciate the coordination help. Given that my PR (#2295) addresses broader toolchain-pinning and CI changes, which are more foundational and impactful, I think it would make sense to keep it as the primary PR. However, I understand the value of your PR (#2370), which extends the native Cargo and makes specific fixture and documents the lockfile requirement. To ensure that both PRs get merged, I propose the following approach: 1. Merge #2295 first: This will ensure that the broader foundational changes are reviewed and merged first. 2. Create a follow-up PR for #2370: The focused runner changes and additional documentation can be addressed in a separate PR after #2295 is merged. I'm happy to help incorporate any additional regression tests or documentation from #2370 into my PR if that would be helpful. This way, we can ensure that both sets of changes are properly reviewed and merged, and we can avoid any unnecessary merge conflicts. Let me know!
upstream-sync closed this pull request 2026-11-25 23:08:17 +00:00
CalvyPZ commented 2026-11-25 23:09:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by CalvyPZ on 2026-11-25T22:44:31Z.


This PR has been marked as a duplicate and closed after multiple agreeing checks in #1607. If you believe this is incorrect please re-open with why.

<!-- greyfinch-sync:ivall/xcl:comment:7176732870 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2370#issuecomment-7176732870). Originally posted by [CalvyPZ](https://github.com/CalvyPZ) on 2026-11-25T22:44:31Z. --- This PR has been marked as a duplicate and closed after multiple agreeing checks in #1607. If you believe this is incorrect please re-open with why.
upstream-sync reopened this pull request 2026-11-26 00:05:00 +00:00
fladit123 commented 2026-11-26 16:48:02 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fladit123 on 2026-11-26T16:48:02Z.


Thanks for getting back to me! That approach works for me.

I'm happy to keep #2370 in draft while #2295 goes through review. Once the broader toolchain changes land, I'll check which regression tests and documentation are still needed and prepare a focused follow-up.

If incorporating those pieces directly into #2295 is preferable, I'm also happy to coordinate that.

Thanks for working together to avoid duplicated changes and merge conflicts!

<!-- greyfinch-sync:ivall/xcl:comment:7198110771 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2370#issuecomment-7198110771). Originally posted by [fladit123](https://github.com/fladit123) on 2026-11-26T16:48:02Z. --- Thanks for getting back to me! That approach works for me. I'm happy to keep #2370 in draft while #2295 goes through review. Once the broader toolchain changes land, I'll check which regression tests and documentation are still needed and prepare a focused follow-up. If incorporating those pieces directly into #2295 is preferable, I'm also happy to coordinate that. Thanks for working together to avoid duplicated changes and merge conflicts!
github-actions[bot] commented 2026-12-01 02:35:30 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-12-01T02:35:30Z.


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:7298780840 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2370#issuecomment-7298780840). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-12-01T02:35:30Z. --- 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 07:56:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:56:53Z.


Triage (#1607) – head 33c9081

#2295 makes the same --locked change to cargo build / cargo test in scripts/test.ps1 and also pins the toolchain, but it adds rust-version.workspace = true to the three crates without a rust-version in the root [workspace.package], so its manifests do not load (its CI fails). This PR is the working version of the --locked part and adds a check of the exact cargo calls in scripts/test-native-stderr.tests.ps1.
After a rebase: main's test.ps1 now also runs cargo bench -p xcl --bench '*' -- --test, so the fixture's expected call list (and its cargo.cmd, which exits 127 on bench) need that call too.
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:7304680778 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2370#issuecomment-7304680778). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T07:56:53Z. --- **Triage (#1607)** – head 33c9081 #2295 makes the same `--locked` change to `cargo build` / `cargo test` in `scripts/test.ps1` and also pins the toolchain, but it adds `rust-version.workspace = true` to the three crates without a `rust-version` in the root `[workspace.package]`, so its manifests do not load (its CI fails). This PR is the working version of the `--locked` part and adds a check of the exact cargo calls in `scripts/test-native-stderr.tests.ps1`. After a rebase: main's `test.ps1` now also runs `cargo bench -p xcl --bench '*' -- --test`, so the fixture's expected call list (and its `cargo.cmd`, which exits 127 on `bench`) need that call too. 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/2370:upstream-pr/2370'
git switch 'upstream-pr/2370'

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/2370'
git switch 'upstream-pr/2370'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2370'
git switch 'upstream-pr/2370'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2370'
git switch 'main'
git merge --squash 'upstream-pr/2370'
git switch 'main'
git merge --ff-only 'upstream-pr/2370'
git switch 'main'
git merge 'upstream-pr/2370'
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!2360
No description provided.