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

Closed
DavidM1911 wants to merge 1 commit from upstream-pr/1042 into main
DavidM1911 commented 2026-11-24 10:48:02 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T10:48:02Z.


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
<!-- greyfinch-sync:ivall/xcl:issue:6580072173 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1042). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T10:48:02Z. --- 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
upstream-sync closed this pull request 2026-11-24 11:05:32 +00:00
DavidM1911 commented 2026-11-24 11:06:00 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T10:56:21Z.


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

<!-- greyfinch-sync:ivall/xcl:comment:7129442218 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1042#issuecomment-7129442218). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T10:56:21Z. --- 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).
ivall commented 2026-11-24 11:06:03 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ivall on 2026-11-24T11:04:34Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7129622641 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1042#issuecomment-7129622641). Originally posted by [ivall](https://github.com/ivall) on 2026-11-24T11:04:34Z. --- 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

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!1035
No description provided.