Skip to content

Scripts: require numeric crash and device removal counts - #635

Open
mjnhbg3 wants to merge 1 commit into
xcl-dev:mainfrom
mjnhbg3:codex/pr-smoke-counters
Open

mjnhbg3 wants to merge 1 commit into
xcl-dev:mainfrom
mjnhbg3:codex/pr-smoke-counters

Conversation

@mjnhbg3

@mjnhbg3 mjnhbg3 commented Nov 24, 2026

Copy link
Copy Markdown

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.

Missing or malformed PR smoke counters were treated as zero. Validate their decimal format before checking for a clean run, and avoid integer conversion limits for long values. Add synthetic regression cases and run them before the Rust CI build.
@RandomGithub12309

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown

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

Copy link
Copy Markdown
Contributor

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

Thanks!

@github-actions

Copy link
Copy Markdown

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.

@github-actions github-actions Bot added the stale No activity for 3 days; closed 4 days later unless something happens label Nov 29, 2026
@Foniass

Foniass commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

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.

@github-actions github-actions Bot removed the stale No activity for 3 days; closed 4 days later unless something happens label Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

off-goal Does not bear on the current goal (world loading); waits until it is reached

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants