Tests: unit tests for scripts/pr_check.py, run when it changes #597
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!597
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-597"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Kaairim on GitHub · 2026-11-24 02:19 UTC · original
Kaairim:pr-check-tests→main· +182 −0 · 2 files · 1 commits · draftscripts/pr_check.pyis the merge gate, has no tests, and several open PRs change it (#536, #527, #513, #507, #497). These unit tests pin its current rules so a change to it shows what it changes. They callcheck()directly with a fakeis_main_ancestor: no GitHub, no git. A small workflow runs them when the checker or its tests change.What is in it
scripts/test_pr_check.py: 23 tests – sections, refused models (only inside AI use), game data and binaries (tests/data limit), what counts as runtime, and the regression-run rules: head and main blocks, uncommitted runs, device removals / crashes, killed runs, same title and time, the 80 % frames and 125 % peak-commit limits on both sides.github/workflows/scripts.yml:python3 -m unittest discover -s scripts -p "test_*.py"on pushes to main and PRs touching those filesTested
python -m unittest discover -s scripts -p "test_*.py" -v: 23 passed, 0 failedNot tested
AI use
Improvements by William "kaairim" Deivid (wdcore).
🤖 Generated with Claude Code
@anes66 on GitHub · 2026-11-24 03:59 UTC · original · edited 2026-11-24 16:19 UTC
Verified
c28f5cff119bf9f6938fc2631b19d0a7bafd8e22on Windows 10 Pro (build 19045), Ryzen 7 9800X3D, Python 3.11.4.Tested
python -m unittest discover -s scripts -p "test_*.py" -v: 23 passed, 0 failed, 0 errors, 0 skipped.f4ce27ceb6d1b0576d0c659b713b674778bf1968.test_only=Truewaives smoke while preserving the section, game-data and model checks.The newer
test_onlyparameter is not covered by this PR's suite. When rebasing, it would be useful to add permanent tests showing that the waiver applies only to smoke checks. The probes above were external checks, not additions to the PR.Not tested
GitHub Actions on Ubuntu, the Rust workspace, GPU tests or retail titles.
AI use
Codex (GPT-6; exact variant unavailable) inspected the changes, wrote and ran the external verification harness, and drafted this report.
Integration follow-up
Main
f4ce27calready contains threeTestOnlyApprovalTestsinscripts/test_pr_check.py; this PR currently has an add/add conflict on that path. My earlier coverage suggestion concerns the PR snapshot, not missing coverage on main.I tested a main-based layout that keeps main's file unchanged and puts this PR's 23 tests in
scripts/test_pr_check_rules.py. Updating both path filters inscripts.ymltoscripts/test_pr_check*.pylets discovery run all 26 tests: 26 passed, 0 failed. This preserves the existing approval checks without rewriting either test set. No checker/runtime changes are needed. This is a local integration proposal, not a merge or a second PR.Current-main integration available
511572f integrates this head onto
main b7aa9f3while retaining main's existingscripts/test_pr_check.py. Your 23 rule tests are inscripts/test_pr_check_rules.py; only the filename and the discovery command in its docstring change. Checker code and test assertions are unchanged.python -B -m unittest discover -s scripts -p 'test_pr_check*.py' -v: 36 passed / 0 failed (main's 13 plus these 23), Windows 10, CPython 3.11.4.The workflow uses that same discovery pattern and its path filters cover both test modules. Local YAML parsing checked both event filters and the read-only contents permission. The GitHub Actions job itself was not run.
An external in-memory mutation harness ran both suites against seven controlled changes: lower frame threshold, higher memory threshold, acceptance of dirty head runs/non-main baselines, checking removed assets, oversized fixtures, and unfilled templates. All seven produced assertion failures, with no test errors. The on-disk checker stayed unchanged. No Rust/GPU/title run for this test/workflow-only integration.
AI use: Codex (GPT-6; exact variant unavailable) resolved the integration, checked discovery and the workflow, ran the mutation probes, and prepared this update. Your original commit remains in the merge history.
@DavidM1911 on GitHub · 2026-11-25 13:06 UTC · original
Verification on RTX 3060 Ti (Windows 11): merge conflict with current
main— needs a rebase before it can be tested.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.