CI: allow reviewed test-only diffs without retail smoke #507

Manually merged
github merged 1 commit from gh-pr/507/head into gh-pr/507/base 2026-11-26 04:23:51 +00:00
Owner

@⁠ZekkJJ on GitHub · 2026-11-24 01:05 UTC · original
ZekkJJ:codex/test-only-pr-checks → main · +82 −7 · 4 files · 1 commits · merged 2026-11-24 02:44 UTC

Implements the maintainer-label approach proposed in #452. A test-only edit in a runtime source file can be exempted from retail smoke after someone with repository triage access reviews the diff and applies test-only.

What is in it

  • The existing check accepts that exemption on a test-only label event when the live PR still matches the event's head, target branch, and description. Subsequent pushes and edits use normal validation until the label is reapplied.
  • The workflow keeps its read-only permissions. Required description sections, AI-use validation, and asset checks still run.

The workflow routes unrelated label changes to a separate check to preserve the last description result. Thanks to PHeitor1 for testing the waiver and reporting the label interaction.

Tested

  • Windows 11 build 26200, Ryzen 7 8845HS, RTX 4060 Laptop GPU, Rust 1.95.0, debug.
  • python -B -m unittest discover -s scripts -p test_pr_check.py -v passed 3 tests.
  • Ran the workflow's Bash step locally with mocked GitHub responses. Seven cases passed, including the valid label event, a retained label after a push, label removal, and stale head/target/description.
  • actionlint 1.7.12 passed. The GitHub Actions expression evaluator passed nine event cases from the workflow YAML. Adding or removing an unrelated label uses a separate check name and skips the description checker. Applying or removing the test-only label still runs it.
  • Workspace build and cargo test --locked --workspace --no-fail-fast -- --test-threads=4 --nocapture passed on the 2997c9a base with this patch. 676 passed, 0 failed, 41 ignored. Two wave64 cases reported runtime skips.

Not tested

  • Live label events in ivall/xcl. Trying them requires the repository label and the updated workflow on the base branch. The patch changes only CI and contributor documentation.

AI use

  • Codex (GPT-6, exact variant unavailable) implemented and tested the change and drafted this PR.
**@⁠ZekkJJ** on GitHub · 2026-11-24 01:05 UTC · [original](https://github.com/xcl-dev/xcl/pull/507) `ZekkJJ:codex/test-only-pr-checks` → `main` · +82 −7 · 4 files · 1 commits · merged 2026-11-24 02:44 UTC Implements the maintainer-label approach proposed in #452. A test-only edit in a runtime source file can be exempted from retail smoke after someone with repository triage access reviews the diff and applies `test-only`. **What is in it** - The existing check accepts that exemption on a `test-only` label event when the live PR still matches the event's head, target branch, and description. Subsequent pushes and edits use normal validation until the label is reapplied. - The workflow keeps its read-only permissions. Required description sections, AI-use validation, and asset checks still run. The workflow routes unrelated label changes to a separate check to preserve the last description result. Thanks to PHeitor1 for [testing the waiver and reporting the label interaction](https://github.com/ivall/xcl/pull/507#issuecomment-7119100998). **Tested** - Windows 11 build 26200, Ryzen 7 8845HS, RTX 4060 Laptop GPU, Rust 1.95.0, debug. - `python -B -m unittest discover -s scripts -p test_pr_check.py -v` passed 3 tests. - Ran the workflow's Bash step locally with mocked GitHub responses. Seven cases passed, including the valid label event, a retained label after a push, label removal, and stale head/target/description. - actionlint 1.7.12 passed. The GitHub Actions expression evaluator passed nine event cases from the workflow YAML. Adding or removing an unrelated label uses a separate check name and skips the description checker. Applying or removing the test-only label still runs it. - Workspace build and `cargo test --locked --workspace --no-fail-fast -- --test-threads=4 --nocapture` passed on the `2997c9a` base with this patch. 676 passed, 0 failed, 41 ignored. Two wave64 cases reported runtime skips. **Not tested** - Live label events in `ivall/xcl`. Trying them requires the repository label and the updated workflow on the base branch. The patch changes only CI and contributor documentation. **AI use** - Codex (GPT-6, exact variant unavailable) implemented and tested the change and drafted this PR.
Use the maintainer label event for the checked PR snapshot and verify it against live metadata. Keep the regular smoke requirement for later revisions and preserve the description and asset checks.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:23:50 +00:00
github manually merged commit b74867be73 into gh-pr/507/base 2026-11-26 04:23:51 +00:00
Author
Owner

@⁠PHeitor1 on GitHub · 2026-11-24 01:26 UTC · original · edited 2026-11-24 01:32 UTC

Ran this PR's scripts/pr_check.py (302615f) with --local against the two cases that motivated it, using Python 3.13.17 on Windows 11. The body is #264's description, which has no xcl-smoke blocks.

files without --test-only with --test-only
#343's fix: hle/d3d12x/vram.rs + gpu/recomp/tests.rs fails: both smoke-block problems description ok
#264 + hle/kernelx.rs (the skip line kept out of it) fails: both smoke-block problems description ok
a binary under crates/xcl/src/ (exe.rs.dll, binary) fails: game-data + smoke still fails on the game-data rule only

So the flag drops only the smoke check, as described. The PR's test_pr_check.py: 3 tests, all OK.

One gap: the job runs on every labeled / unlabeled event, but TEST_ONLY_APPROVAL is true only when the label in that event is test-only.

  • Say a maintainer applies test-only and the check goes green. If anyone later adds or removes another label (bug, gpu and so on), that event re-runs the check without --test-only, and the PR goes red again with no new push or edit.
  • The approval is lost to an unrelated label change, and the label has to be removed and reapplied to get it back.

A fix: for a labeled / unlabeled event of another label, keep the waiver when the live PR still carries test-only and the label was applied after the head commit was pushed.

  • The step could read the PR's timeline (gh api repos/$REPO/issues/$NUMBER/timeline): the last labeled event for test-only against the last head_ref_force_pushed / committed event.
  • Exiting early (exit 0) or a job-level if: would not do. Both report success, which would also turn a real failure green.

Reviewed and written with Claude Code (Claude Opus 5.5).

**@⁠PHeitor1** on GitHub · 2026-11-24 01:26 UTC · [original](https://github.com/xcl-dev/xcl/pull/507#issuecomment-7119100998) · edited 2026-11-24 01:32 UTC Ran this PR's `scripts/pr_check.py` (`302615f`) with `--local` against the two cases that motivated it, using Python 3.13.17 on Windows 11. The body is #264's description, which has no `xcl-smoke` blocks. | files | without `--test-only` | with `--test-only` | |---|---|---| | #343's fix: `hle/d3d12x/vram.rs` + `gpu/recomp/tests.rs` | fails: both smoke-block problems | `description ok` | | #264 + `hle/kernelx.rs` (the skip line kept out of it) | fails: both smoke-block problems | `description ok` | | a binary under `crates/xcl/src/` (`exe.rs.dll`, binary) | fails: game-data + smoke | still fails on the game-data rule only | So the flag drops only the smoke check, as described. The PR's `test_pr_check.py`: 3 tests, all OK. **One gap:** the job runs on every `labeled` / `unlabeled` event, but `TEST_ONLY_APPROVAL` is true only when the label in that event is `test-only`. - Say a maintainer applies `test-only` and the check goes green. If anyone later adds or removes another label (`bug`, `gpu` and so on), that event re-runs the check without `--test-only`, and the PR goes red again with no new push or edit. - The approval is lost to an unrelated label change, and the label has to be removed and reapplied to get it back. A fix: for a `labeled` / `unlabeled` event of another label, keep the waiver when the live PR still carries `test-only` and the label was applied after the head commit was pushed. - The step could read the PR's timeline (`gh api repos/$REPO/issues/$NUMBER/timeline`): the last `labeled` event for `test-only` against the last `head_ref_force_pushed` / `committed` event. - Exiting early (`exit 0`) or a job-level `if:` would not do. Both report success, which would also turn a real failure green. _Reviewed and written with Claude Code (Claude Opus 5.5)._
This discussion has been locked. Commenting is limited to contributors.
No description provided.