PR checks: a section with nothing under it is refused as empty #527
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!527
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-527"
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?
@Rareuncommon on GitHub · 2026-11-24 01:20 UTC · original
Rareuncommon:scripts/pr-check-empty-sections→main· +73 −13 · 2 files · 1 commits · openRebuilt on main
930e8b4after #965 / #1037, which took over the empty-section and template-placeholder part of this PR. What is left is where a section starts and ends: a section name in bold at the end of a sentence was taken for its heading, the heading search could start inside an HTML comment, and an unclosed<!--was read as text.What is in it
scripts/pr_check.py:section_texts()– comments are removed first (an unclosed one takes the rest of the description), and a heading, at the start or the end of a section, has to be a line of its own.section_has_content()keeps main's placeholder rule over that text. +16 −13.scripts/test_pr_check.py:SectionHeadingTests, seven tests on hand-written descriptions. +57. The separatescripts/pr_check.tests.pyof the earlier commits is gone; the tests are in main's file.5bdaffa) replacesdc6fa59and the two before it. The review points of @shdann and @Kalmarv (1 and 2) are in it.Tested
cd scripts && python3 -m unittest test_pr_check: 16 passed (main's 9 and the 7 new). Against main'spr_check.py: 3 of the 7 new fail (a heading at the end of a sentence, a section inside a comment, an unclosed comment).check()compared on the descriptions of 1,029 PRs of this repository (all states): two differences, #686 and #991. Both name Not tested in a sentence before their real section; main reads the sentence, finds nothing under it and reports the section empty, this PR reads the real section.930e8b4: 25 tests pass.Regression run
Not tested
23a208danddc6fa59, not on5bdaffa; this PR changes no Rust.PR checksworkflow on GitHub's runner.AI use
@arcwiser on GitHub · 2026-11-24 01:29 UTC · original
Tested exact head
23a208d2f5f68e6c532f0e188de4f57d084ac4ddon Windows.python scripts/pr_check.tests.py: 8 passed, 0 failed..\scripts\test.ps1: workspace build passed; 676 passed, 0 failed, 41 ignored.no wave64):gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware. These skips are not counted as coverage.XCL_SAMPLE_*variables were unset, so optional game-data tests did not run.Machine: Windows 11 Home build 26200; AMD Ryzen 5 7500F; NVIDIA GeForce RTX 4070 SUPER 12 GB, driver 610.88; Rust 1.100.0 MSVC; DXC 1.9.2602.17 from Windows SDK 10.0.28000.0; debug profile.
AI use: OpenAI Codex with GPT-5 selected the verification scope, ran the commands, and drafted this report; I am posting only the measured results above.
@arcwiser on GitHub · 2026-11-24 01:34 UTC · original
Retested after the review fix at exact head
92c9282a3fa85a48fffd80da858240e56a447729; this supersedes my earlier report for23a208d.python scripts/pr_check.tests.py: 10 passed, 0 failed..\scripts\test.ps1: workspace build passed; 676 passed, 0 failed, 41 ignored.no wave64):gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware. These skips are not counted as coverage.XCL_SAMPLE_*variables were unset, so optional game-data tests did not run.Machine: Windows 11 Home build 26200; AMD Ryzen 5 7500F; NVIDIA GeForce RTX 4070 SUPER 12 GB, driver 610.88; Rust 1.100.0 MSVC; DXC 1.9.2602.17 from Windows SDK 10.0.28000.0; debug profile.
AI use: OpenAI Codex with GPT-5 selected the verification scope, ran the commands, and drafted this report; I am posting only the measured results above.
@Rareuncommon on GitHub · 2026-11-24 01:36 UTC · original
Thanks, both reproduce. Fixed in
92c9282: comments are removed before the headings are looked for, and a heading has to be a line of its own. Two tests cover the two cases (they fail on the commit before). Across the 374 PR descriptions in this repo the check gives the same answer before and after. AI use: Claude Code (Claude Fable 5.2) wrote the fix and this reply.@Kalmarv on GitHub · 2026-11-24 02:02 UTC · original
I ran 92c9282's
check()and main's (508a0c7) on 33 PR descriptions: 13 open ones and the 20 most recently merged. They give the same result on all 33. On the untouched template it now refuses the bare-under Not tested, which main lets through. Your 10 tests pass, and 6 of them fail against main'spr_check.py. It also merges cleanly with #497, and both test files pass on the merge.A line under a section that starts with a heading name ends the section, even mid-sentence.
startrequires the heading on a line of its own;enddoes not. With this under Tested:the check reports "the Tested section is missing or empty". Giving
endthe same shape asstartfixes it. With the line below, your 10 tests still pass and none of the 33 descriptions change:An unclosed
<!--hides the rest of the description on GitHub, but the check still reads it. A Tested section holding only<!-- results to come, with the rest of the description after it, passes (main also passes it).re.sub(r"<!--.*?(?:-->|\Z)", "", body, flags=re.S)refuses it, with no change to the tests or the 33 descriptions.The banned-model check (line 74) still looks for the first
**AI use**anywhere in the raw body. The two cases92c9282fixes forfilled()therefore still reach it. Each of these passes with- Qwen3-Coderunder AI use (the same on main):<!-- see **AI use** at the end -->at the top of the description;In the other direction,
<!-- not qwen or llama -->under AI use is refused. Also, a bold line inside the section ends the scan:**also** Qwen3 for the testspasses. Question: is this for this PR or a follow-up? Checking the same comment-stripped section text thatfilled()reads would cover all four cases.Question: no workflow runs
scripts/pr_check.tests.py, because pr-check.yml checks out onlypr_check.py. #497 adds its tests asscripts/pr_check_tests.py, so if both merge there will be two test files with different names. Should they be one file?🤖 Claude Opus 5.5
@Rareuncommon on GitHub · 2026-11-24 03:10 UTC · original
Thanks for running it. 1 and 2 are in
dc6fa59with a test each (12 pass; 7 fail on main'spr_check.py). On 478 descriptions it differs from main on two, #625 and #648, both a bare-under Not tested. 3: agreed, and I'd rather do it as a follow-up so this PR stays one change; I'll open it once this lands, reading the same comment-stripped section text. 4: happy to fold these tests intoscripts/pr_check_tests.pyif #497 lands first; maintainer's call on the name. AI use: Claude Code (Claude Fable 5.2) wrote the fix and this reply.@upipibi on GitHub · 2026-11-24 05:15 UTC · original
Full-suite run on this PR's head
dc6fa59, for the counts CONTRIBUTING.md item 2 asks for (the description has thepr_checktests only):Tested
cargo build --workspacethencargo test --workspace --no-fail-fast -- --test-threads=4: 676 passed, 0 failed, 41 ignored (16 test binaries, the e2e title included)gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64)Not tested: AMD / wave64; no retail title (this PR changes only
scripts/, so no regression run is needed).AI-assisted (Claude Code).
@jmal423 on GitHub · 2026-11-24 11:43 UTC · original
I tested a conflict resolution against main at
47efa2ewith this PR atdc6fa59. The untouched template is a useful regression case after #1037: the PR head alone treats the hints under Tested and AI use as filled. Main rejects those hints, but accepts a Tested heading inside an HTML comment. The combined checker passed all 9 tests from main and all 12 section tests from this PR.The diff below applies to main at
47efa2e. It keeps the PR's heading and comment handling and checks each candidate line against main's template placeholders. Only the Python checker was tested on the combined version. AI use: Codex prepared and tested this resolution.Suggested resolution for scripts/pr_check.py
@DavidM1911 on GitHub · 2026-11-25 13:43 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.