Skip to content

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

Merged
Mavixot merged 1 commit into
xcl-dev:mainfrom
ZekkJJ:codex/test-only-pr-checks
Nov 24, 2026
Merged

Mavixot merged 1 commit into
xcl-dev:mainfrom
ZekkJJ:codex/test-only-pr-checks

Conversation

@ZekkJJ

@ZekkJJ ZekkJJ commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

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.

@PHeitor1

PHeitor1 commented Nov 24, 2026 •

Copy link
Copy Markdown

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

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.
@ZekkJJ
ZekkJJ force-pushed the codex/test-only-pr-checks branch from 302615f to b74867b Compare November 24, 2026 01:54
@ZekkJJ
ZekkJJ marked this pull request as ready for review November 24, 2026 01:59
@Mavixot
Mavixot merged commit 18c105a into xcl-dev:main Nov 24, 2026
4 checks passed
hmodymac8-droid added a commit to hmodymac8-droid/xcl that referenced this pull request Nov 24, 2026
hmodymac8-droid added a commit to hmodymac8-droid/xcl that referenced this pull request Nov 24, 2026
UncleTyrone pushed a commit to UncleTyrone/xcl that referenced this pull request Nov 27, 2026
CI: allow reviewed test-only diffs without retail smoke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants