Scripts: require numeric crash and device removal counts #630

Open
mjnhbg3 wants to merge 1 commit from upstream-pr/635 into main
mjnhbg3 commented 2026-11-24 02:44:28 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by mjnhbg3 on 2026-11-24T02:44:28Z.


Missing or malformed crashes and device removals fields were treated as zero by the PR checker. Require decimal counts before accepting a clean PR run. Leading-zero counts remain valid, and a crashing main baseline is still allowed.

This changes scripts and CI only; no game files or retail smoke runs are required.

What is in it

  • scripts/pr_check.py: reject absent, empty, negative or malformed PR counters; handle long decimal values without integer conversion limits.
  • scripts/test_pr_check_smoke_counters.py: synthetic descriptions covering both counters, zeros, positive counts, malformed values, crashing baselines and script exemptions.
  • .github/workflows/ci.yml: run these tests before the Rust build.

Tested

  • Windows 11 build 26200, Intel Core Ultra 7 265K, RTX 5070 Ti / NVIDIA 616.64, Python 3.11.9, Rust 1.97.1 MSVC; debug. Based on main 3db536e.
  • python -B -m unittest discover -s scripts -p test_pr_check_smoke_counters.py -v: 7 passed. On unchanged main, the same tests expose 22 falsely accepted subcases and 3 integer-conversion errors.
  • cargo build --workspace; cargo test --workspace --no-fail-fast -- --test-threads=1 --nocapture: 686 passed, 0 failed, 41 ignored. Four runtime skips: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware (no wave64); test_title_draws_with_a_root_signature_under_the_debug_layer, uploads_start_from_each_subresources_state (missing debug layer).
  • CI path with XCL_ADAPTER=warp: scripts/test.ps1 --skip test_title_runs_and_game_folder_is_untouched --nocapture: 685 passed, 0 failed, 41 ignored; 88 runtime skips, one filtered test. Skips are not hardware coverage.
  • git diff --check: passed.

Regression run
Not required: scripts, checker tests and workflow only; no runtime files change.

Not tested

  • Live GitHub Actions execution before opening the PR.
  • AMD, the missing debug-layer cases, optional game-data tests, and a completed four-thread hardware suite. Earlier four-thread GPU runs stalled; hardware validation above used one test thread.

AI use

  • Codex with gpt-6.1-sol: found and reproduced the bug, implemented the fix and fixtures, reviewed the diff and ran local checks.
<!-- greyfinch-sync:ivall/xcl:issue:5465098502 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/635). Originally posted by [mjnhbg3](https://github.com/mjnhbg3) on 2026-11-24T02:44:28Z. --- Missing or malformed `crashes` and `device removals` fields were treated as zero by the PR checker. Require decimal counts before accepting a clean PR run. Leading-zero counts remain valid, and a crashing main baseline is still allowed. This changes scripts and CI only; no game files or retail smoke runs are required. **What is in it** - `scripts/pr_check.py`: reject absent, empty, negative or malformed PR counters; handle long decimal values without integer conversion limits. - `scripts/test_pr_check_smoke_counters.py`: synthetic descriptions covering both counters, zeros, positive counts, malformed values, crashing baselines and script exemptions. - `.github/workflows/ci.yml`: run these tests before the Rust build. **Tested** - Windows 11 build 26200, Intel Core Ultra 7 265K, RTX 5070 Ti / NVIDIA 616.64, Python 3.11.9, Rust 1.97.1 MSVC; debug. Based on main `3db536e`. - `python -B -m unittest discover -s scripts -p test_pr_check_smoke_counters.py -v`: 7 passed. On unchanged main, the same tests expose 22 falsely accepted subcases and 3 integer-conversion errors. - `cargo build --workspace`; `cargo test --workspace --no-fail-fast -- --test-threads=1 --nocapture`: 686 passed, 0 failed, 41 ignored. Four runtime skips: `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` (no wave64); `test_title_draws_with_a_root_signature_under_the_debug_layer`, `uploads_start_from_each_subresources_state` (missing debug layer). - CI path with `XCL_ADAPTER=warp`: `scripts/test.ps1 --skip test_title_runs_and_game_folder_is_untouched --nocapture`: 685 passed, 0 failed, 41 ignored; 88 runtime skips, one filtered test. Skips are not hardware coverage. - `git diff --check`: passed. **Regression run** Not required: scripts, checker tests and workflow only; no runtime files change. **Not tested** - Live GitHub Actions execution before opening the PR. - AMD, the missing debug-layer cases, optional game-data tests, and a completed four-thread hardware suite. Earlier four-thread GPU runs stalled; hardware validation above used one test thread. **AI use** - Codex with `gpt-6.1-sol`: found and reproduced the bug, implemented the fix and fixtures, reviewed the diff and ran local checks.
RandomGithub12309 commented 2026-11-24 07:06:18 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by RandomGithub12309 on 2026-11-24T04:39:47Z.


Independent test report and review of 10ffbd908408951810df13faf9c7e775d8921319:

Tested

  • OS / Python: Windows 11 Build 26300, Python 3.14
  • Commands:
    • python -B -m unittest discover -s scripts -p test_pr_check_smoke_counters.py -v → 7 tests passed (OK, 0.003s)
    • python -B -m unittest discover -s scripts -p "test_*.py" -v → 7 tests passed (OK, 0.003s)

Review

  • re.fullmatch(r"[0-9]+", value) cleanly rejects missing, empty, negative, signed, non-decimal, and Unicode \d digits without integer-conversion limits, while keeping crashing main baselines allowed. Minor note: .github/workflows/ci.yml targets -p test_pr_check_smoke_counters.py rather than -p "test*.py". Found no bugs.

Not tested

  • Live GitHub Actions pull_request_target workflow execution

AI use

  • Antigravity with Gemini 4 Hydrogen — checked out 10ffbd9, reviewed the diff, ran the unit tests, and wrote this report.
<!-- greyfinch-sync:ivall/xcl:comment:7122224035 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/635#issuecomment-7122224035). Originally posted by [RandomGithub12309](https://github.com/RandomGithub12309) on 2026-11-24T04:39:47Z. --- Independent test report and review of `10ffbd908408951810df13faf9c7e775d8921319`: **Tested** - OS / Python: Windows 11 Build 26300, Python 3.14 - Commands: - `python -B -m unittest discover -s scripts -p test_pr_check_smoke_counters.py -v` → **7 tests passed** (`OK`, `0.003s`) - `python -B -m unittest discover -s scripts -p "test_*.py" -v` → **7 tests passed** (`OK`, `0.003s`) **Review** - `re.fullmatch(r"[0-9]+", value)` cleanly rejects missing, empty, negative, signed, non-decimal, and Unicode `\d` digits without integer-conversion limits, while keeping crashing `main` baselines allowed. Minor note: `.github/workflows/ci.yml` targets `-p test_pr_check_smoke_counters.py` rather than `-p "test*.py"`. Found no bugs. **Not tested** - Live GitHub Actions `pull_request_target` workflow execution **AI use** - Antigravity with Gemini 4 Hydrogen — checked out `10ffbd9`, reviewed the diff, ran the unit tests, and wrote this report.
futurepro62 commented 2026-11-24 07:06:20 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T04:44:11Z.


Tested exact head 10ffbd9.

Tested

  • Windows 11 Home 26300, Windows PowerShell 5.1.26100.9818 (no PowerShell 7 here), Python 3.14.3.
  • cd scripts; python -m unittest test_pr_check_smoke_counters -v: Ran 7 tests, OK.
  • Control: the same test file against the parent 3db536e's pr_check.py: FAILED (failures=22, errors=3). So the tests catch what the PR changes.

Not tested

  • The new ci.yml step on a runner (only the command it runs, locally), the PR checks workflow on a real PR.

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and the fixture runs and wrote this report. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7122290268 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/635#issuecomment-7122290268). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T04:44:11Z. --- Tested exact head `10ffbd9`. **Tested** - Windows 11 Home 26300, Windows PowerShell 5.1.26100.9818 (no PowerShell 7 here), Python 3.14.3. - `cd scripts; python -m unittest test_pr_check_smoke_counters -v`: Ran 7 tests, OK. - Control: the same test file against the parent `3db536e`'s `pr_check.py`: `FAILED (failures=22, errors=3)`. So the tests catch what the PR changes. **Not tested** - The new `ci.yml` step on a runner (only the command it runs, locally), the `PR checks` workflow on a real PR. **AI use** - Claude Code (Claude Opus 5.5) ran the tests and the fixture runs and wrote this report. I checked it before posting.
DavidM1911 commented 2026-11-25 13:05:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T12:43:43Z.


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:7162772836 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/635#issuecomment-7162772836). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T12:43:43Z. --- 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!
github-actions[bot] commented 2026-11-29 07:42:53 +00:00 (Migrated from github.com)

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


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:7252644285 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/635#issuecomment-7252644285). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T07:42:53Z. --- 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:50:13 +00:00 (Migrated from github.com)

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


Triage (#1607) – head 10ffbd9

No open or merged PR makes the same change. #1133 (merged) requires title, seconds and frames in the smoke blocks, and #1103 (open) requires peak commit. Neither covers device removals / crashes, which main still reads with number(...) or 0, so a missing or non-numeric value passes.
The stricter fullmatch(r"[0-9]+") fits what scripts/smoke.ps1 writes (plain integers). The new unittest step in ci.yml runs only this one test file, and scripts/test_pr_check.py already exists on main, so these tests could go there instead of in a new file and CI step.
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:7300112615 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/635#issuecomment-7300112615). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T03:50:13Z. --- **Triage (#1607)** – head 10ffbd9 No open or merged PR makes the same change. #1133 (merged) requires title, seconds and frames in the smoke blocks, and #1103 (open) requires peak commit. Neither covers `device removals` / `crashes`, which main still reads with `number(...) or 0`, so a missing or non-numeric value passes. The stricter `fullmatch(r"[0-9]+")` fits what scripts/smoke.ps1 writes (plain integers). The new unittest step in ci.yml runs only this one test file, and scripts/test_pr_check.py already exists on main, so these tests could go there instead of in a new file and CI step. 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/635:upstream-pr/635'
git switch 'upstream-pr/635'

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