Scripts: reject empty required sections in pr_check.py and expand unit tests #975
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!975
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/975/head"
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?
@certified-retart on GitHub · 2026-11-24 09:47 UTC · original
certified-retart:tests/pr-check-suite→main· +114 −1 · 2 files · 1 commits · closed without mergingFixes an empty-section bypass in
scripts/pr_check.pywhere a blank**Tested**or**Not tested**heading followed by another template heading (such as**Regression run**or**Not tested**) matched\s*\n\s*\Sagainst the next heading and passed as non-empty, and expandsscripts/test_pr_check.pyto cover all check branches ofpr_check.py.What is in it
scripts/pr_check.py: extract each required section's body up to the next template heading (What is in it,Tested,Regression run,Not tested,AI use) or end of text before checking.strip(), so empty sections followed by another template heading are rejected while bold subheadings (e.g.**Machine:**) inside a section remain accepted.scripts/test_pr_check.py: add 7 unit tests (PrCheckRulesTests) covering empty/adjacent required sections, bold subheadings, banned open-weight models vs frontier models, game files / binary /tests/data/1 MiB limit / removed-file skips, validxcl-smoke v1pairs at exact thresholds (0.8×frames,1.25×peak commit), uncommitted/non-main smoke blocks,device removals/crashes/killed/ title-or-seconds mismatches, and frame-drop / commit-growth rejections.Tested
3.14.6.python -m unittest discover -s scripts -v: 10 passed, 0 failed (before thepr_check.pyfix,test_missing_or_empty_sections_are_reportedfailed with2 != 0).ivall/xcl: 0 diffs vs the previous regex.Regression run
Not needed: this PR changes only
scripts/pr_check.pyandscripts/test_pr_check.pyand does not touchcrates/xcl/src/.Not tested
pull_request_targetworkflow itself (which runsmain's copy ofscripts/pr_check.pyuntil merged) orpr_check.py's--repoGitHub API CLI paths.AI use
gemini-4-neon) wrote the fix, unit tests, and this description, and ran the Python test suite and merged-PR corpus check above.@DavidM1911 on GitHub · 2026-11-24 12:22 UTC · original
Independent check — this looks superseded by merged #1037 (the #965 fix, now on
main384f7f7).main'spr_check.pyalready hassection_has_content(), which requires at least one non-placeholder, non-comment line per section — that covers this PR's goal of rejecting empty required sections.maininscripts/test_pr_check.py(the file was added by #1037 after this branch was cut).Worth a rebase check by the author, but likely closeable.
AI use: review by Devin (Cognition, SWE-2); no code changes.
@certified-retart on GitHub · 2026-11-24 17:01 UTC · original
Closing as superseded by #965 (which landed \section_has_content\ / \TemplatePlaceholderTests\ in \scripts/pr_check.py\ and \scripts/test_pr_check.py) and #1133 (\SmokeBlockTests).
Pull request closed