PR checks: a rename out of runtime still needs smoke runs #946

Open
vedantdadhich21 wants to merge 1 commit from upstream-pr/952 into main
vedantdadhich21 commented 2026-11-24 09:25:28 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by vedantdadhich21 on 2026-11-24T09:25:28Z.


The PR checker decided whether smoke runs were required from only the destination path of each changed file. The Files API row discarded previous_filename, so renaming a runtime file into tests/ or docs/ made the change look non-runtime and bypassed the regression-run gate without maintainer approval.

What is in it

  • .github/workflows/pr-check.yml: retain GitHub's previous_filename as an optional fifth TSV column.
  • scripts/pr_check.py: represent the old side of a rename as a removed entry. Removed files remain part of the runtime scan but are still skipped by the game-data/binary checks. Four-column local TSV input remains supported.
  • scripts/test_pr_check.py: cover runtime-to-tests renames, the --test-only waiver, docs renames, legacy four-column input, and renaming game data out of the repository.

Tested

  • macOS arm64 (Darwin 27), Python 3.13.5, commit 47c120d649490c4acce3ad528e2d9ad242e3c45d, rebased onto current main.
  • python3 -B -m unittest discover -s scripts -p 'test_pr_check.py' -v: 13 passed, 0 failed, including the existing smoke-block, template-placeholder, and runtime-build-input tests.
  • Before the fix, test_rename_out_of_runtime_still_requires_smoke failed because the CLI printed description ok.
  • After the fix, the same synthetic rename exits 1 with both missing-regression-run errors; --test-only exits 0.
  • python3 -B -m py_compile scripts/pr_check.py scripts/test_pr_check.py: passed.
  • git diff --check origin/main...HEAD: passed.

Regression run

  • Not a runtime change; crates/xcl/src is untouched.

Not tested

  • The Rust workspace and GPU suite: this change is Python/workflow-only and the machine is macOS.
  • The GitHub PR checks workflow itself.

AI use

  • HungerG, an AI coding assistant (underlying model not disclosed): found the gap, wrote the fix and tests, ran the commands above, and drafted this description.
<!-- greyfinch-sync:ivall/xcl:issue:5469483104 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/952). Originally posted by [vedantdadhich21](https://github.com/vedantdadhich21) on 2026-11-24T09:25:28Z. --- The PR checker decided whether smoke runs were required from only the destination path of each changed file. The Files API row discarded `previous_filename`, so renaming a runtime file into `tests/` or `docs/` made the change look non-runtime and bypassed the regression-run gate without maintainer approval. **What is in it** - `.github/workflows/pr-check.yml`: retain GitHub's `previous_filename` as an optional fifth TSV column. - `scripts/pr_check.py`: represent the old side of a rename as a removed entry. Removed files remain part of the runtime scan but are still skipped by the game-data/binary checks. Four-column local TSV input remains supported. - `scripts/test_pr_check.py`: cover runtime-to-tests renames, the `--test-only` waiver, docs renames, legacy four-column input, and renaming game data out of the repository. **Tested** - macOS arm64 (Darwin 27), Python 3.13.5, commit `47c120d649490c4acce3ad528e2d9ad242e3c45d`, rebased onto current `main`. - `python3 -B -m unittest discover -s scripts -p 'test_pr_check.py' -v`: 13 passed, 0 failed, including the existing smoke-block, template-placeholder, and runtime-build-input tests. - Before the fix, `test_rename_out_of_runtime_still_requires_smoke` failed because the CLI printed `description ok`. - After the fix, the same synthetic rename exits 1 with both missing-regression-run errors; `--test-only` exits 0. - `python3 -B -m py_compile scripts/pr_check.py scripts/test_pr_check.py`: passed. - `git diff --check origin/main...HEAD`: passed. **Regression run** - Not a runtime change; `crates/xcl/src` is untouched. **Not tested** - The Rust workspace and GPU suite: this change is Python/workflow-only and the machine is macOS. - The GitHub `PR checks` workflow itself. **AI use** - HungerG, an AI coding assistant (underlying model not disclosed): found the gap, wrote the fix and tests, ran the commands above, and drafted this description.
DavidM1911 commented 2026-11-24 13:03:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T12:40:57Z.


Independent verification on current main 384f7f7 (branch already contains it — clean).

Machine: Windows 11, Ryzen 9 7900X; Python 3.

  • python scripts/test_pr_check.py: 13 tests OK — including the new rename-out-of-runtime cases.
  • Logic check: for status == "renamed" with a previous path, a synthetic (previous, "removed", …) entry is appended, so runtime(previous) still triggers the smoke-run requirement when runtime code moves out of crates/xcl/src. The len(parts) >= 5 guard keeps old 4-column files.tsv working.

AI use: test runs by Devin (Cognition, SWE-2); no code changes.

<!-- greyfinch-sync:ivall/xcl:comment:7131775526 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/952#issuecomment-7131775526). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T12:40:57Z. --- Independent verification on current `main` `384f7f7` (branch already contains it — clean). **Machine:** Windows 11, Ryzen 9 7900X; Python 3. - `python scripts/test_pr_check.py`: **13 tests OK** — including the new rename-out-of-runtime cases. - Logic check: for `status == "renamed"` with a previous path, a synthetic `(previous, "removed", …)` entry is appended, so `runtime(previous)` still triggers the smoke-run requirement when runtime code moves out of `crates/xcl/src`. The `len(parts) >= 5` guard keeps old 4-column files.tsv working. AI use: test runs by Devin (Cognition, SWE-2); no code changes.
DavidM1911 commented 2026-11-24 14:06:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T13:51:27Z.


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

  • scripts/test_pr_check.py: 13 tests OK, 0 failed.

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7133439774 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/952#issuecomment-7133439774). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T13:51:27Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - scripts/test_pr_check.py: 13 tests OK, 0 failed. Thanks!
futurepro62 commented 2026-11-24 15:05:45 +00:00 (Migrated from github.com)

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


Tested exact head 47c120d, script tests only, since this PR has no test report yet.

Tested

  • Windows 11 Home 26300, Python 3.14.3 with pytest 9.0.3, Windows PowerShell 5.1.26100.9818 (no PowerShell 7 here).
  • python -m pytest scripts/test_pr_check.py at the head: 13 passed.
  • The PR's test file(s) against current main's script (930e8b4): 1 failed: test_rename_out_of_runtime_still_requires_smoke. So the new test catches the problem the PR fixes.

Not tested

  • PowerShell 7, the CI workflow itself, a game (no runtime code changed).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7134076646 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/952#issuecomment-7134076646). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T14:15:11Z. --- Tested exact head `47c120d`, script tests only, since this PR has no test report yet. **Tested** - Windows 11 Home 26300, Python 3.14.3 with pytest 9.0.3, Windows PowerShell 5.1.26100.9818 (no PowerShell 7 here). - `python -m pytest scripts/test_pr_check.py` at the head: 13 passed. - The PR's test file(s) against current main's script (`930e8b4`): 1 failed: `test_rename_out_of_runtime_still_requires_smoke`. So the new test catches the problem the PR fixes. **Not tested** - PowerShell 7, the CI workflow itself, a game (no runtime code changed). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
DavidM1911 commented 2026-11-26 04:07:36 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T03:11:29Z.


Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7181477349 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/952#issuecomment-7181477349). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T03:11:29Z. --- Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
github-actions[bot] commented 2026-11-30 08:41:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-30T08:41:50Z.


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:7273229760 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/952#issuecomment-7273229760). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-30T08:41:50Z. --- 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 04:33:02 +00:00 (Migrated from github.com)

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


Triage (#1607) – head 47c120d

No open or merged PR makes the same change. #513 also changes how pr_check.py reads files.tsv, but it re-checks whether a file is binary. It does not handle renames. Main's check() still sees only the new path of a renamed file, so moving crates/xcl/src/... into crates/xcl/tests/ skips the smoke requirement.
The PR adds the previous path as a removed entry. The smoke check uses it, and the game-data check skips it as it already does for removed files. The tests cover a rename out of the runtime, --test-only, a docs rename and a game-data path renamed away. 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:7300846745 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/952#issuecomment-7300846745). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T04:33:02Z. --- **Triage (#1607)** – head 47c120d No open or merged PR makes the same change. #513 also changes how `pr_check.py` reads `files.tsv`, but it re-checks whether a file is binary. It does not handle renames. Main's `check()` still sees only the new path of a renamed file, so moving `crates/xcl/src/...` into `crates/xcl/tests/` skips the smoke requirement. The PR adds the previous path as a `removed` entry. The smoke check uses it, and the game-data check skips it as it already does for removed files. The tests cover a rename out of the runtime, `--test-only`, a docs rename and a game-data path renamed away. 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/952:upstream-pr/952'
git switch 'upstream-pr/952'

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