Tests: cover PersistentLocalStorage SizeMB parsing bounds #1543

Open
pane33 wants to merge 1 commit from upstream-pr/1553 into main
pane33 commented 2026-11-24 17:35:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by pane33 on 2026-11-24T17:35:14Z.


Cover the numeric boundaries of PersistentLocalStorage/SizeMB. Negative, overflowing, and non-numeric values leave pls_mb unset. u64::MAX is accepted with surrounding whitespace.

What is in it

  • Add one table-driven test in crates/xcl/src/manifest.rs.

Tested

  • Windows 11 Pro build 26300 x64, AMD Ryzen 5 7600X, NVIDIA GeForce RTX 4060 (driver 32.0.16.2124), Rust 1.100.0 (x86_64-pc-windows-msvc), DXC from Windows SDK 10.0.26100.0, debug profile. Ran on 9e3831e1f570d3646e53ab753b19ec07eb8f1485 with the proposed test applied.
  • cargo test -p xcl --lib manifest::tests — 5 passed, 0 failed, 0 ignored, 744 filtered out.
  • .\scripts\test.ps1 --skip test_title_runs_and_game_folder_is_untouched with RUST_TEST_NOCAPTURE=1 — 776 passed as reported by Cargo, 0 failed, 41 ignored, 1 filtered out. The pass count includes the three GPU skips below.
  • GPU skips — gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware (no wave64), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • git diff --check — passed.
  • python -m unittest discover -s scripts -p test_pr_check.py -v with PYTHONDONTWRITEBYTECODE=1 — 13 passed, 0 failed, 0 skipped.

Regression run

  • This diff is confined to #[cfg(test)]. Requesting maintainer review for the test-only label.

Not tested

  • The run filtered out test_title_runs_and_game_folder_is_untouched. Tests that depend on unset XCL_SAMPLE_* variables provided no sample-data coverage.
  • Retail-title smoke runs and GPU coverage on AMD or wave64 hardware.

AI use

  • Codex (GPT-6.2-Sol) inspected the parser, wrote the test, ran the checks, and drafted this description.
<!-- greyfinch-sync:ivall/xcl:issue:5477210163 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1553). Originally posted by [pane33](https://github.com/pane33) on 2026-11-24T17:35:14Z. --- Cover the numeric boundaries of `PersistentLocalStorage/SizeMB`. Negative, overflowing, and non-numeric values leave `pls_mb` unset. `u64::MAX` is accepted with surrounding whitespace. **What is in it** - Add one table-driven test in `crates/xcl/src/manifest.rs`. **Tested** - Windows 11 Pro build 26300 x64, AMD Ryzen 5 7600X, NVIDIA GeForce RTX 4060 (driver `32.0.16.2124`), Rust `1.100.0` (`x86_64-pc-windows-msvc`), DXC from Windows SDK `10.0.26100.0`, debug profile. Ran on `9e3831e1f570d3646e53ab753b19ec07eb8f1485` with the proposed test applied. - `cargo test -p xcl --lib manifest::tests` — 5 passed, 0 failed, 0 ignored, 744 filtered out. - `.\scripts\test.ps1 --skip test_title_runs_and_game_folder_is_untouched` with `RUST_TEST_NOCAPTURE=1` — 776 passed as reported by Cargo, 0 failed, 41 ignored, 1 filtered out. The pass count includes the three GPU skips below. - GPU skips — `gpu_geometry_wave32_prefix_count_over_a_mask` and `gpu_wave32_program_in_wave64_hardware` (no wave64), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - `git diff --check` — passed. - `python -m unittest discover -s scripts -p test_pr_check.py -v` with `PYTHONDONTWRITEBYTECODE=1` — 13 passed, 0 failed, 0 skipped. **Regression run** - This diff is confined to `#[cfg(test)]`. Requesting maintainer review for the `test-only` label. **Not tested** - The run filtered out `test_title_runs_and_game_folder_is_untouched`. Tests that depend on unset `XCL_SAMPLE_*` variables provided no sample-data coverage. - Retail-title smoke runs and GPU coverage on AMD or wave64 hardware. **AI use** - Codex (GPT-6.2-Sol) inspected the parser, wrote the test, ran the checks, and drafted this description.
gut0to commented 2026-11-24 17:43:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by gut0to on 2026-11-24T17:43:44Z.

Review: COMMENTED


Tested commit cda1c881e70d2d9c000956202129a637cd55e409 on host RATO, Windows 11 build 26200, with Rust 1.98.1 / Cargo 1.98.1:

cargo test -p xcl --lib parses_persistent_local_storage_size_bounds -- --nocapture

Result: 1 passed, 0 failed, 0 ignored; 748 filtered out. The full workspace suite and GPU tests were not run. AI use: GPT-6 helped select the targeted test and draft this report; I ran the command locally and verified its output.

<!-- greyfinch-sync:ivall/xcl:review:6044403124 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1553#pullrequestreview-6044403124). Originally posted by [gut0to](https://github.com/gut0to) on 2026-11-24T17:43:44Z. **Review:** COMMENTED --- Tested commit `cda1c881e70d2d9c000956202129a637cd55e409` on host `RATO`, Windows 11 build `26200`, with Rust `1.98.1` / Cargo `1.98.1`: `cargo test -p xcl --lib parses_persistent_local_storage_size_bounds -- --nocapture` Result: `1 passed, 0 failed, 0 ignored; 748 filtered out`. The full workspace suite and GPU tests were not run. AI use: GPT-6 helped select the targeted test and draft this report; I ran the command locally and verified its output.
DavidM1911 commented 2026-11-24 21:08:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T19:19:22Z.


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

  • cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored.

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7141926118 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1553#issuecomment-7141926118). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T19:19:22Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~21 ignored. Thanks!
Toons29 commented 2026-11-24 22:06:48 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Toons29 on 2026-11-24T21:43:12Z.


Regression run of cda1c881 on the retail title, for this PR's Regression run section. Both blocks are from scripts/smoke.ps1 as printed, not edited: main on 4178e888, this PR on its head commit with no uncommitted changes, same title and time.

xcl-smoke v1
commit: 4178e888c0b5be50a2887eda45cdb832763b68a4
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1618 (PresentX 1618)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 14831 MB
xcl-smoke v1
commit: cda1c881e70d2d9c000956202129a637cd55e409
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1633 (PresentX 1634)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14684 MB

Against the limits in CONTRIBUTING.md: 101 % of main's frames, 99 % of its peak commit, no crash, no device removal.

AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, cargo build --release -p xcl, 60 s, XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.

AI use: Claude Code (Claude Opus 5.5) built both trees and ran scripts/smoke.ps1; I checked the blocks before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7145299178 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1553#issuecomment-7145299178). Originally posted by [Toons29](https://github.com/Toons29) on 2026-11-24T21:43:12Z. --- Regression run of `cda1c881` on the retail title, for this PR's **Regression run** section. Both blocks are from `scripts/smoke.ps1` as printed, not edited: `main` on `4178e888`, this PR on its head commit with no uncommitted changes, same title and time. ``` xcl-smoke v1 commit: 4178e888c0b5be50a2887eda45cdb832763b68a4 gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1618 (PresentX 1618) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 14831 MB ``` ``` xcl-smoke v1 commit: cda1c881e70d2d9c000956202129a637cd55e409 gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1633 (PresentX 1634) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14684 MB ``` Against the limits in CONTRIBUTING.md: 101 % of `main`'s frames, 99 % of its peak commit, no crash, no device removal. AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, `cargo build --release -p xcl`, 60 s, `XCL_NETWORK=0`. This is a regression check only: it does not show whether the run reaches the code this PR changes. AI use: Claude Code (Claude Opus 5.5) built both trees and ran `scripts/smoke.ps1`; I checked the blocks before posting.
github-actions[bot] commented 2026-11-29 07:40:58 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T07:40:58Z.


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:7252624484 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1553#issuecomment-7252624484). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T07:40:58Z. --- 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 06:05:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:05:33Z.


Triage (#1607) – head cda1c88

Test-only. It pins the current manifest.rs:parse behaviour for SizeMB (negative, u64 overflow, non-numeric, surrounding whitespace). #1275 and #1304 change element/text parsing in the same file but test other things, so there is no overlap.
No problems found in the diff.
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:7302470868 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1553#issuecomment-7302470868). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T06:05:33Z. --- **Triage (#1607)** – head cda1c88 Test-only. It pins the current `manifest.rs:parse` behaviour for `SizeMB` (negative, u64 overflow, non-numeric, surrounding whitespace). #1275 and #1304 change `element`/`text` parsing in the same file but test other things, so there is no overlap. No problems found in the diff. 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/1553:upstream-pr/1553'
git switch 'upstream-pr/1553'

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