Skip to content

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

Merged
ivall merged 1 commit into
xcl-dev:mainfrom
aarushkha:pr-checks-runtime-build-inputs
Nov 24, 2026
Merged

ivall merged 1 commit into
xcl-dev:mainfrom
aarushkha:pr-checks-runtime-build-inputs

Conversation

@aarushkha

Copy link
Copy Markdown
Contributor

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 PR checks: a runtime file whose name only contains "tests" still needs a regression run #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

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

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 xcl-dev#964

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fromthemoonx

Copy link
Copy Markdown

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 Preserve full debug symbols across release targets #892 (closed), which touched only Cargo.lock.

Not tested

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.

@DarkPanda69

Copy link
Copy Markdown

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.

@dcastell1

Copy link
Copy Markdown

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.

@Conrage

Conrage commented Nov 24, 2026

Copy link
Copy Markdown

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+Conrage@users.noreply.github.com>

Thanks!

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

@aarushkha
aarushkha marked this pull request as ready for review November 24, 2026 10:34
@ivall

ivall commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

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
ivall merged commit e74dda2 into xcl-dev:main Nov 24, 2026
2 checks passed
@upipibi upipibi mentioned this pull request Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PR checks: runtime files outside crates/xcl/src skip the regression run

6 participants