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

Closed
opened 2026-11-26 04:39:52 +00:00 by github-bot · 2 comments
Owner

@⁠aarushkha on GitHub · 2026-11-24 10:12 UTC · original

.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.

**@⁠aarushkha** on GitHub · 2026-11-24 10:12 UTC · [original](https://github.com/xcl-dev/xcl/issues/1000) `.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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:39:52 +00:00
Author
Owner

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

#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.

**@⁠fromthemoonx** on GitHub · 2026-11-24 10:20 UTC · [original](https://github.com/xcl-dev/xcl/issues/1000#issuecomment-7128643459) #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.
Author
Owner

@⁠aarushkha on GitHub · 2026-11-24 10:36 UTC · original

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.

**@⁠aarushkha** on GitHub · 2026-11-24 10:36 UTC · [original](https://github.com/xcl-dev/xcl/issues/1000#issuecomment-7129005407) 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.
This discussion has been locked. Commenting is limited to contributors.
No description provided.