Skip to content

PR checks: reject untouched PR template placeholders (#965) - #1037

Merged
ivall merged 1 commit into
xcl-dev:mainfrom
ksanjeev284:pr-965-template-placeholders
Nov 24, 2026
Merged

ivall merged 1 commit into
xcl-dev:mainfrom
ksanjeev284:pr-965-template-placeholders

Conversation

@ksanjeev284

Copy link
Copy Markdown

Fixes #965.

Previously scripts/pr_check.py checked required sections with \*\*<section>\*\*\s*\n\s*\S, so an untouched .github/pull_request_template.md passed Tested, Not tested, and AI use because the template's placeholder lines and bare - bullet matched \S.

What is in it

  • scripts/pr_check.py: add section_has_content() to extract each required section up to the next template heading, strip HTML comments and leading bullet markers, and ignore the verbatim placeholder lines from .github/pull_request_template.md.
  • scripts/test_pr_check.py: add TemplatePlaceholderTests verifying that the untouched .github/pull_request_template.md fails all three required sections, bare bullets/comments alone fail, and sections with real content pass.

Tested

  • Host: Windows 11, Python 3.12.6
  • python -m unittest discover -s scripts -v: 8 passed, 0 failed
  • Checked section_has_content() against the 20 most recently merged PRs on ivall/xcl: 0 false positives (only README: point the Discord invite at discord.gg/xcl #771 lacked an **AI use** heading altogether).
  • python scripts/pr_check.py --local on this PR's description and changed files: description ok

Regression run

  • Not needed: changes only scripts/pr_check.py and scripts/test_pr_check.py (no files under crates/xcl/src/).

Not tested

  • Live GitHub Actions pull_request_target execution (uses main's copy of scripts/pr_check.py until merged).
  • Rust workspace build/tests and retail title smoke run (scripts-only change).

AI use

  • Antigravity (Gemini 3.1 Pro) implemented the fix, unit tests, corpus check, and PR description under author review.

Fixes xcl-dev#965. Extract each required section up to the next template heading, strip HTML comments and bare bullet markers, and ignore verbatim placeholder lines from .github/pull_request_template.md.
Copilot AI balanced review requested due to automatic review settings November 24, 2026 10:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@ivall
ivall merged commit dc6a283 into xcl-dev:main Nov 24, 2026
1 check passed
@ivall

ivall commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

Merged in dc6a283 – thanks. It conflicted with #995's builds_runtime() next to runtime(); both are kept. Checked on the merged tree: python scripts/test_pr_check.py 9 tests OK; the untouched template gets all three section problems; and the new section check gives the same answer as the old one on the last 40 PR descriptions except #1039, which is an untouched template.

Rareuncommon added a commit to Rareuncommon/xcl that referenced this pull request Nov 24, 2026
… removed first

Rebuilt on main after ivall#965 / ivall#1037, which took over the empty-section and template-placeholder part of this
change. What is left:

- A section name in bold at the end of a sentence was taken for the section's heading. When the sentence
  came before the real section, the real one was never read: a filled description was reported empty.
- The heading search could start inside an HTML comment, so a section commented out as a whole passed.
- An unclosed <!-- hides the rest of the description on GitHub but was still read as text.

section_texts() returns what is under each heading (comments removed, heading lines of their own at both
ends); section_has_content() keeps main's placeholder rule over it.

scripts/test_pr_check.py: SectionHeadingTests, seven tests; three fail on main's check.

Assisted-by: Claude Code (Claude Fable 5.2)
CalvyPZ pushed a commit to CalvyPZ/xcl that referenced this pull request Nov 24, 2026
xcl-dev#1037 made the hint lines of .github/pull_request_template.md count as
empty, but the outline in CONTRIBUTING.md ("PR description") has hint
lines of its own, and AGENTS.md tells agents to write to that outline.
Pasted unedited, it passed the Tested, Not tested and AI use checks.
Its six hint lines under those sections are placeholders now too.

Checked against the descriptions of 1,200 PRs of this repository: no
verdict changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

PR checks: an untouched PR template passes the Tested and AI use checks

3 participants