PR checks: build inputs outside src need a regression run #995

Manually merged
github merged 1 commit from gh-pr/995/head into gh-pr/995/base 2026-11-26 04:39:48 +00:00
Owner

@⁠aarushkha on GitHub · 2026-11-24 10:05 UTC · original
aarushkha:pr-checks-runtime-build-inputs → main · +23 −1 · 2 files · 1 commits · merged 2026-11-24 10:35 UTC

runtime() only counted paths under crates/xcl/src/, but some files outside it change what xcl.exe does, so a PR that changed only these got no Regression run requirement. They now count as runtime for that check. Fixes #964.

What is in it

  • scripts/pr_check.py: builds_runtime() counts crates/xcl/data/ (stubdb.toml, compiled in by include_str! in stubs.rs), crates/xcl/build.rs, crates/xcl/Cargo.toml, the workspace Cargo.toml (it holds [profile.release]) and Cargo.lock; check() asks for the smoke runs when any of them changes. runtime() itself is unchanged, so this does not conflict with #497's rewrite of it.
  • scripts/test_pr_check.py: each of those paths needs both smoke blocks, and the test-only approval waives them; the test title's and game DLL's manifests and build scripts still do not need them

Tested

  • NVIDIA GeForce RTX 3060 (Windows driver 32.0.16.2101), Intel Core i5-11400F, Windows 10 22H2 (build 19045), Python 3.10
  • python scripts/test_pr_check.py: 4 passed (the new test fails on main: 5 of its subtests)
  • git merge-tree of this branch with #497, #527, #952 and #988: no conflicts
  • cargo test --workspace -- --test-threads=4 on main 9aec53d (this diff touches no Rust): 724 passed, 0 failed, 41 ignored; SKIPPED gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware (no wave64)

Regression run

  • not needed: no file under crates/xcl/src changes

Not tested

  • the PR checks workflow itself on a PR that changes only one of these files

CONTRIBUTING.md (item 3 of "What a PR needs to be merged"), AGENTS.md and the PR template still describe the requirement as "crates/xcl/src outside tests"; I left their wording alone so this PR stays one change, and can follow up if you want them to name these files too.

AI use

  • Claude Code with Claude Opus 5.5: wrote the change, the test and this description; I reviewed the diff and ran the tests

🤖 Generated with Claude Code

**@⁠aarushkha** on GitHub · 2026-11-24 10:05 UTC · [original](https://github.com/xcl-dev/xcl/pull/995) `aarushkha:pr-checks-runtime-build-inputs` → `main` · +23 −1 · 2 files · 1 commits · merged 2026-11-24 10:35 UTC `runtime()` only counted paths under `crates/xcl/src/`, but some files outside it change what `xcl.exe` does, so a PR that changed only these got no **Regression run** requirement. They now count as runtime for that check. Fixes #964. **What is in it** - `scripts/pr_check.py`: `builds_runtime()` counts `crates/xcl/data/` (`stubdb.toml`, compiled in by `include_str!` in `stubs.rs`), `crates/xcl/build.rs`, `crates/xcl/Cargo.toml`, the workspace `Cargo.toml` (it holds `[profile.release]`) and `Cargo.lock`; `check()` asks for the smoke runs when any of them changes. `runtime()` itself is unchanged, so this does not conflict with #497's rewrite of it. - `scripts/test_pr_check.py`: each of those paths needs both smoke blocks, and the `test-only` approval waives them; the test title's and game DLL's manifests and build scripts still do not need them **Tested** - NVIDIA GeForce RTX 3060 (Windows driver 32.0.16.2101), Intel Core i5-11400F, Windows 10 22H2 (build 19045), Python 3.10 - `python scripts/test_pr_check.py`: 4 passed (the new test fails on main: 5 of its subtests) - `git merge-tree` of this branch with #497, #527, #952 and #988: no conflicts - `cargo test --workspace -- --test-threads=4` on main 9aec53d (this diff touches no Rust): 724 passed, 0 failed, 41 ignored; SKIPPED `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` (no wave64) **Regression run** - not needed: no file under `crates/xcl/src` changes **Not tested** - the `PR checks` workflow itself on a PR that changes only one of these files CONTRIBUTING.md (item 3 of "What a PR needs to be merged"), AGENTS.md and the PR template still describe the requirement as "`crates/xcl/src` outside tests"; I left their wording alone so this PR stays one change, and can follow up if you want them to name these files too. **AI use** - Claude Code with Claude Opus 5.5: wrote the change, the test and this description; I reviewed the diff and ran the tests 🤖 Generated with [Claude Code](https://claude.com/claude-code)
runtime() only counted paths under crates/xcl/src/, but some files
outside it change what xcl.exe does: crates/xcl/data/stubdb.toml is
compiled in with include_str! and routes imports, crates/xcl/build.rs is
its build script, and crates/xcl/Cargo.toml, the workspace Cargo.toml
(the release profile) and Cargo.lock pick its dependencies and how it is
built. A PR that changed only these got no smoke-run requirement.

They now count as runtime for the Regression run check; the test title's
and game DLL's manifests and build scripts still do not.

Fixes #964

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:39:46 +00:00
github manually merged commit ef48a1854c into gh-pr/995/base 2026-11-26 04:39:48 +00:00
Author
Owner

@⁠fromthemoonx on GitHub · 2026-11-24 10:09 UTC · original

Independent check of ef48a1854c43b4f6c104bd968367a0324ad759ae. I had claimed #964 and written the same change locally (check() asks for the runs on the same five paths). This PR went up 2 s after my claim, so I'm not opening a second one. Here is what I checked against yours instead.

Tested (Windows 11 26300, Python 3.12, RTX 3060 / Ryzen 7 5700X)

  • python -m unittest test_pr_check at the head: 4 passed. Merged onto current main 02bfd1d (no conflict): 4 passed.
  • My own test cases, run against this pr_check.py, all pass:
    • each of crates/xcl/data/stubdb.toml, crates/xcl/build.rs, crates/xcl/Cargo.toml, Cargo.toml and Cargo.lock gets both Regression run problems
    • test_only=True waives all five
    • none of crates/xcl/tests/e2e.rs, tests/testtitle/Cargo.toml, tests/testgamedll/src/lib.rs, scripts/pr_check.py, README.md, crates/xcl/datafile.md or crates/xcl/data.md needs a run, so the data/ prefix doesn't catch data.md or datafile.md
  • The command line, the way the workflow calls it (pr_check.py --body … --files files.tsv --local): with only Cargo.lock or only crates/xcl/data/stubdb.toml in files.tsv, it exits 1 and names the two missing runs; with --test-only it exits 0.
  • Old against new over the last 150 PRs (gh pr list --state all --limit 150, each with its file list): main's runtime() and this PR's runtime() or builds_runtime() give the same answer for 149 of them. The one that changes is #892 (closed), which touched only Cargo.lock.

Not tested

  • The workflow on GitHub itself. Note that main has no Dependabot config yet. If #272 adds one, its Cargo.lock PRs would hit this check, so its exemption for Dependabot matters there.

AI use

  • Claude Code (Claude Opus 5.5) wrote the local version, the extra cases and the 150-PR comparison, ran them, and wrote this.
**@⁠fromthemoonx** on GitHub · 2026-11-24 10:09 UTC · [original](https://github.com/xcl-dev/xcl/pull/995#issuecomment-7128401957) Independent check of `ef48a1854c43b4f6c104bd968367a0324ad759ae`. I had claimed #964 and written the same change locally (`check()` asks for the runs on the same five paths). This PR went up 2 s after my claim, so I'm not opening a second one. Here is what I checked against yours instead. **Tested** (Windows 11 26300, Python 3.12, RTX 3060 / Ryzen 7 5700X) - `python -m unittest test_pr_check` at the head: 4 passed. Merged onto current `main` `02bfd1d` (no conflict): 4 passed. - My own test cases, run against this `pr_check.py`, all pass: - each of `crates/xcl/data/stubdb.toml`, `crates/xcl/build.rs`, `crates/xcl/Cargo.toml`, `Cargo.toml` and `Cargo.lock` gets both **Regression run** problems - `test_only=True` waives all five - none of `crates/xcl/tests/e2e.rs`, `tests/testtitle/Cargo.toml`, `tests/testgamedll/src/lib.rs`, `scripts/pr_check.py`, `README.md`, `crates/xcl/datafile.md` or `crates/xcl/data.md` needs a run, so the `data/` prefix doesn't catch `data.md` or `datafile.md` - The command line, the way the workflow calls it (`pr_check.py --body … --files files.tsv --local`): with only `Cargo.lock` or only `crates/xcl/data/stubdb.toml` in `files.tsv`, it exits 1 and names the two missing runs; with `--test-only` it exits 0. - **Old against new over the last 150 PRs** (`gh pr list --state all --limit 150`, each with its file list): `main`'s `runtime()` and this PR's `runtime() or builds_runtime()` give the same answer for 149 of them. The one that changes is #892 (closed), which touched only `Cargo.lock`. **Not tested** - The workflow on GitHub itself. Note that `main` has no Dependabot config yet. If #272 adds one, its `Cargo.lock` PRs would hit this check, so its exemption for Dependabot matters there. **AI use** - Claude Code (Claude Opus 5.5) wrote the local version, the extra cases and the 150-PR comparison, ran them, and wrote this.
Author
Owner

@⁠DarkPanda69 on GitHub · 2026-11-24 10:18 UTC · original

Test report for head ef48a1854.

Tested on main 9aec53d with this PR's diff applied: pass.

  • python -m unittest test_pr_check (in scripts/), Python 3.12.10, Windows 11: 4 passed, including test_runtime_build_inputs_require_smoke_until_approved with all its subtests.
  • Extra cases run through check() with a complete description and no smoke blocks:
    • crates/xcl/data/stubdb.toml removed, and a new file added under crates/xcl/data/: the two regression-run problems, as expected.
    • root Cargo.toml modified: the two regression-run problems (its [profile.release] does change xcl.exe, so counting it looks right to me).
    • tests/testtitle/Cargo.toml: no problems, as expected.

One minor note, not a blocker: .cargo/config.toml and rust-toolchain.toml would also change how xcl.exe is built (rustflags, compiler version), and a PR adding either gets no regression-run requirement with this change. Neither file exists in the repo today, so this only matters if one is added later.

Not tested: the PR checks workflow on GitHub's runner; this together with #497 (both near runtime(); this one adds a separate function, so I'd expect at most a small conflict).

AI use: Claude Code (Claude Opus 5.5) ran the tests and the extra cases on this machine and wrote this report.

**@⁠DarkPanda69** on GitHub · 2026-11-24 10:18 UTC · [original](https://github.com/xcl-dev/xcl/pull/995#issuecomment-7128597735) Test report for head `ef48a1854`. Tested on `main` `9aec53d` with this PR's diff applied: pass. - `python -m unittest test_pr_check` (in `scripts/`), Python 3.12.10, Windows 11: 4 passed, including `test_runtime_build_inputs_require_smoke_until_approved` with all its subtests. - Extra cases run through `check()` with a complete description and no smoke blocks: - `crates/xcl/data/stubdb.toml` removed, and a new file added under `crates/xcl/data/`: the two regression-run problems, as expected. - root `Cargo.toml` modified: the two regression-run problems (its `[profile.release]` does change `xcl.exe`, so counting it looks right to me). - `tests/testtitle/Cargo.toml`: no problems, as expected. One minor note, not a blocker: `.cargo/config.toml` and `rust-toolchain.toml` would also change how `xcl.exe` is built (rustflags, compiler version), and a PR adding either gets no regression-run requirement with this change. Neither file exists in the repo today, so this only matters if one is added later. Not tested: the `PR checks` workflow on GitHub's runner; this together with #497 (both near `runtime()`; this one adds a separate function, so I'd expect at most a small conflict). AI use: Claude Code (Claude Opus 5.5) ran the tests and the extra cases on this machine and wrote this report.
Author
Owner

@⁠dcastell1 on GitHub · 2026-11-24 10:21 UTC · original

Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, on main@02bfd1d (baseline 727 passed, 0 failed, 41 ignored on this box; the head of this PR is based on 9aec53d, which is why the base is stated):

patch -p1 < this PR            # clean, no fuzz
cargo test --workspace -- --test-threads=4
727 passed; 0 failed; 41 ignored   (exit 0)

Same count as the baseline (a PR-check script change), nothing regresses.

Tree restored afterwards (full diff against a clean checkout), hardware adapter, no Wine, no game data. AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it.

**@⁠dcastell1** on GitHub · 2026-11-24 10:21 UTC · [original](https://github.com/xcl-dev/xcl/pull/995#issuecomment-7128678019) Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, on `main@02bfd1d` (baseline **727 passed, 0 failed, 41 ignored** on this box; the head of this PR is based on `9aec53d`, which is why the base is stated): ``` patch -p1 < this PR # clean, no fuzz cargo test --workspace -- --test-threads=4 727 passed; 0 failed; 41 ignored (exit 0) ``` Same count as the baseline (a PR-check script change), nothing regresses. Tree restored afterwards (full diff against a clean checkout), hardware adapter, no Wine, no game data. AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it.
Author
Owner

@⁠Conrage on GitHub · 2026-11-24 10:25 UTC · original

I opened #964. I read the diff: builds_runtime() covers the same five paths as the issue's repro, and check() asks for both runs when any of them changes, so this fixes it. #1003 is an overlapping fix for the same issue, so only one of the two is needed.

Since this comes from my report, could you add me as co-author when you next push?

Co-authored-by: Conrage <[email protected]>

Thanks!

AI use: diff read and comment drafted by Claude Code (Claude Opus 5.5) at my request.

**@⁠Conrage** on GitHub · 2026-11-24 10:25 UTC · [original](https://github.com/xcl-dev/xcl/pull/995#issuecomment-7128756473) I opened #964. I read the diff: `builds_runtime()` covers the same five paths as the issue's repro, and `check()` asks for both runs when any of them changes, so this fixes it. #1003 is an overlapping fix for the same issue, so only one of the two is needed. Since this comes from my report, could you add me as co-author when you next push? `Co-authored-by: Conrage <65290519+[email protected]>` Thanks! AI use: diff read and comment drafted by Claude Code (Claude Opus 5.5) at my request.
Author
Owner

@⁠ivall on GitHub · 2026-11-24 10:35 UTC · original

Merged in e74dda2. python scripts/test_pr_check.py on the merged tree: OK. Also checked through check(): crates/xcl/data/stubdb.toml and Cargo.lock get both Regression run problems, a file under tests/data/ and crates/xcl/datafile.md none. Thanks to @⁠Conrage for the report and to @⁠fromthemoonx, @⁠hkgamingdk231-prog and @⁠dcastell1 for the checks.

**@⁠ivall** on GitHub · 2026-11-24 10:35 UTC · [original](https://github.com/xcl-dev/xcl/pull/995#issuecomment-7128988981) Merged in e74dda2. `python scripts/test_pr_check.py` on the merged tree: OK. Also checked through `check()`: `crates/xcl/data/stubdb.toml` and `Cargo.lock` get both **Regression run** problems, a file under `tests/data/` and `crates/xcl/datafile.md` none. Thanks to @⁠Conrage for the report and to @⁠fromthemoonx, @⁠hkgamingdk231-prog and @⁠dcastell1 for the checks.
This discussion has been locked. Commenting is limited to contributors.
No description provided.