CI: the PR checker's own tests (scripts/test_pr_check.py) never run #994

Closed
opened 2026-11-24 10:12:31 +00:00 by aarushkha · 2 comments
aarushkha commented 2026-11-24 10:12:31 +00:00 (Migrated from github.com)
Contributor

Imported from ivall/xcl. Originally posted by aarushkha on 2026-11-24T10:12:31Z.


.github/workflows/ci.yml runs only scripts/test.ps1 (cargo build + cargo test). Nothing runs scripts/test_pr_check.py, the unit tests of the checker every PR is held to, so a PR that breaks scripts/pr_check.py still gets a green CI. The PR checks workflow doesn't catch it either: it runs main's copy of the checker, never the PR's.

Open PRs work around this one file at a time: #635, #557 and #566 each add a CI step for their own new test file (test_pr_check_smoke_counters.py, test_triage_d3d12.py), and none of them runs test_pr_check.py.

Repro (local, main 9aec53d):

  • python -B -m unittest discover -s scripts -p 'test_*.py': 3 passed, exit 0
  • with runtime() made to return False: 1 failed, exit 1. CI on such a PR would still pass, since it never runs this command.

Suggested fix: one CI step, python -B -m unittest discover -s scripts -p 'test_*.py', before the Rust build so it fails in seconds. It picks up every scripts/test_*.py, so the per-file steps in #635 / #557 / #566 would not be needed.

AI use: found, checked and written up by Claude Code (Claude Opus 5.5) at my request.

<!-- greyfinch-sync:ivall/xcl:issue:6579467543 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/1000). Originally posted by [aarushkha](https://github.com/aarushkha) on 2026-11-24T10:12:31Z. --- `.github/workflows/ci.yml` runs only `scripts/test.ps1` (`cargo build` + `cargo test`). Nothing runs `scripts/test_pr_check.py`, the unit tests of the checker every PR is held to, so a PR that breaks `scripts/pr_check.py` still gets a green `CI`. The `PR checks` workflow doesn't catch it either: it runs main's copy of the checker, never the PR's. Open PRs work around this one file at a time: #635, #557 and #566 each add a CI step for their own new test file (`test_pr_check_smoke_counters.py`, `test_triage_d3d12.py`), and none of them runs `test_pr_check.py`. **Repro (local, main `9aec53d`):** - `python -B -m unittest discover -s scripts -p 'test_*.py'`: 3 passed, exit 0 - with `runtime()` made to return `False`: 1 failed, exit 1. CI on such a PR would still pass, since it never runs this command. **Suggested fix:** one CI step, `python -B -m unittest discover -s scripts -p 'test_*.py'`, before the Rust build so it fails in seconds. It picks up every `scripts/test_*.py`, so the per-file steps in #635 / #557 / #566 would not be needed. **AI use:** found, checked and written up by Claude Code (Claude Opus 5.5) at my request.
fromthemoonx commented 2026-11-24 11:05:42 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-11-24T10:20:29Z.


#597 already adds what this asks for: .github/workflows/scripts.yml runs python3 -m unittest discover -s scripts -p "test_*.py", on push to main and on PRs that touch the checker or its tests.

It can't merge as is, though. GitHub shows it as conflicting, and git merge-tree of its head c28f5cf with main 6efdabc gives one conflict: scripts/test_pr_check.py, add/add, because main got its own copy of that file (b74867b, #452) after #597 was opened. Rebasing #597 and merging the two test files would close this issue. If #597 stalls, its workflow could go in on its own.

Two differences from the suggestion here: #597's workflow has a paths: filter, so it runs only when scripts/pr_check.py, scripts/test_pr_check.py or the workflow change, not for a new scripts/test_*.py; and it is a separate workflow, not a step before the Rust build in ci.yml.

AI use: Claude Code (Claude Opus 5.5) checked the merge and wrote this.

<!-- greyfinch-sync:ivall/xcl:comment:7128643459 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/issues/1000#issuecomment-7128643459). Originally posted by [fromthemoonx](https://github.com/fromthemoonx) on 2026-11-24T10:20:29Z. --- #597 already adds what this asks for: `.github/workflows/scripts.yml` runs `python3 -m unittest discover -s scripts -p "test_*.py"`, on push to main and on PRs that touch the checker or its tests. It can't merge as is, though. GitHub shows it as conflicting, and `git merge-tree` of its head `c28f5cf` with `main` `6efdabc` gives one conflict: `scripts/test_pr_check.py`, add/add, because `main` got its own copy of that file (b74867b, #452) after #597 was opened. Rebasing #597 and merging the two test files would close this issue. If #597 stalls, its workflow could go in on its own. Two differences from the suggestion here: #597's workflow has a `paths:` filter, so it runs only when `scripts/pr_check.py`, `scripts/test_pr_check.py` or the workflow change, not for a new `scripts/test_*.py`; and it is a separate workflow, not a step before the Rust build in `ci.yml`. AI use: Claude Code (Claude Opus 5.5) checked the merge and wrote this.
aarushkha commented 2026-11-24 11:05:47 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by aarushkha on 2026-11-24T10:36:28Z.


Already covered by #597 (opened before this issue), which adds a workflow that runs scripts/test_*.py; I missed it when searching. #1019 also targets this. Closing as a duplicate.

<!-- greyfinch-sync:ivall/xcl:comment:7129005407 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/issues/1000#issuecomment-7129005407). Originally posted by [aarushkha](https://github.com/aarushkha) on 2026-11-24T10:36:28Z. --- Already covered by #597 (opened before this issue), which adds a workflow that runs `scripts/test_*.py`; I missed it when searching. #1019 also targets this. Closing as a duplicate.
Sign in to join this conversation.
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#994
No description provided.