PR checks: the template's placeholder lines do not count as answers #1042

Closed
github-bot wants to merge 1 commit from gh-pr/1042/head into gh-pr/1042/base
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 10:48 UTC · original
DavidM1911:prcheck-template-hints → main · +59 −1 · 2 files · 1 commits · closed without merging

The placeholder lines in .github/pull_request_template.md counted as content, so an unedited template passed the Tested and AI use checks (and a lone - passed Not tested). check() now extracts each section's text, strips HTML comments and ignores blank lines, lone - bullets and the template's hint lines; a section with nothing else is reported empty.

Fixes #965

What is in it

  • scripts/pr_check.py: section_text() + filled() replace the \S-after-heading test; PLACEHOLDER names the template's hint lines.
  • scripts/test_pr_check.py: TemplateSectionTests — untouched template refused in all three sections, filled template passes, comments/lone bullets don't count, - none under AI use is a real answer.

Tested

  • Windows 11 x64, i7-13700K, Rust stable, debug
  • python scripts/test_pr_check.py (from scripts/): 10 passed, 0 failed (6 pre-existing + 4 new)
  • Untouched template now returns all three section problems (previously [] for Tested/AI use)
  • Re-ran check() against open PR bodies #926/#930: no problems, as before

Not tested

  • The GitHub workflow itself (needs a PR to run); scripts-only change, no smoke run required
  • Overlap: #991 (stacked on #527) and #1037 take the same issue differently; whichever merges second rebases

AI use

  • Devin (Cognition), model SWE-2: wrote the change and the tests, ran them
**@⁠DavidM1911** on GitHub · 2026-11-24 10:48 UTC · [original](https://github.com/xcl-dev/xcl/pull/1042) `DavidM1911:prcheck-template-hints` → `main` · +59 −1 · 2 files · 1 commits · closed without merging The placeholder lines in `.github/pull_request_template.md` counted as content, so an unedited template passed the **Tested** and **AI use** checks (and a lone `-` passed **Not tested**). `check()` now extracts each section's text, strips HTML comments and ignores blank lines, lone `-` bullets and the template's hint lines; a section with nothing else is reported empty. Fixes #965 **What is in it** - `scripts/pr_check.py`: `section_text()` + `filled()` replace the `\S`-after-heading test; `PLACEHOLDER` names the template's hint lines. - `scripts/test_pr_check.py`: `TemplateSectionTests` — untouched template refused in all three sections, filled template passes, comments/lone bullets don't count, `- none` under AI use is a real answer. **Tested** - Windows 11 x64, i7-13700K, Rust stable, debug - `python scripts/test_pr_check.py` (from `scripts/`): **10 passed, 0 failed** (6 pre-existing + 4 new) - Untouched template now returns all three section problems (previously `[]` for Tested/AI use) - Re-ran `check()` against open PR bodies #926/#930: no problems, as before **Not tested** - The GitHub workflow itself (needs a PR to run); scripts-only change, no smoke run required - Overlap: #991 (stacked on #527) and #1037 take the same issue differently; whichever merges second rebases **AI use** - Devin (Cognition), model SWE-2: wrote the change and the tests, ran them
An unedited pull_request_template.md passed the Tested and AI use checks because the hint lines counted as content (#965). Section checks now ignore HTML comments, blank lines, lone '-' bullets and the template's placeholder hints; test_pr_check.py covers the untouched and filled template. A lone '-' under Not tested is now refused too (the part of #527 this overlaps).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:41:33 +00:00
github-bot closed this pull request 2026-11-26 04:41:33 +00:00
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 10:56 UTC · original

Note for whoever triages: two other open PRs target #965 — #991 (stacked on #527, moves the hints into HTML comments) and #1037 (placeholder detection in check(), also adds scripts/test_pr_check.py). This one is independent of #527 and covers the lone - under Not tested too; pick whichever fits.

AI use: Devin (Cognition, SWE-2).

**@⁠DavidM1911** on GitHub · 2026-11-24 10:56 UTC · [original](https://github.com/xcl-dev/xcl/pull/1042#issuecomment-7129442218) Note for whoever triages: two other open PRs target #965 — #991 (stacked on #527, moves the hints into HTML comments) and #1037 (placeholder detection in `check()`, also adds `scripts/test_pr_check.py`). This one is independent of #527 and covers the lone `-` under **Not tested** too; pick whichever fits. AI use: Devin (Cognition, SWE-2).
Author
Owner

@⁠ivall on GitHub · 2026-11-24 11:04 UTC · original

Thanks. #965 is fixed by #1037 (merged in dc6a283), which was opened first. This branch is also based on an old main (97 commits behind) and adds scripts/test_pr_check.py as a new file, which would replace the tests there now. Closing as a duplicate.

**@⁠ivall** on GitHub · 2026-11-24 11:04 UTC · [original](https://github.com/xcl-dev/xcl/pull/1042#issuecomment-7129622641) Thanks. #965 is fixed by #1037 (merged in dc6a283), which was opened first. This branch is also based on an old `main` (97 commits behind) and adds `scripts/test_pr_check.py` as a new file, which would replace the tests there now. Closing as a duplicate.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.