PR checks: the template's hints are comments, so an untouched one fails #991

Closed
github-bot wants to merge 4 commits from gh-pr/991/head into gh-pr/991/base
Owner

@⁠aarushkha on GitHub · 2026-11-24 10:03 UTC · original
aarushkha:pr-checks-template-hints-in-comments → main · +134 −4 · 3 files · 4 commits · closed without merging

Stacked on #527; only the top commit (72edc50) belongs here.

The hint lines under Tested and AI use in .github/pull_request_template.md were plain text, so a description left as the template passed both section checks (#527 already catches the lone - under Not tested). With #527 a comment is not something written under a heading, so the hints move into comments and each section keeps an empty - to fill in. Fixes #965.

What is in it

  • .github/pull_request_template.md: the Tested and AI use hints are HTML comments, followed by an empty list item (same hint text)
  • scripts/pr_check.tests.py: test_untouched_template_is_refused expects all three sections refused, not only Not tested

Tested

  • NVIDIA GeForce RTX 3060 (Windows driver 32.0.16.2101), Intel Core i5-11400F, Windows 10 22H2 (build 19045), Python 3.10
  • python scripts/pr_check.tests.py on this branch: 12 passed; with the old template the changed test fails (only Not tested refused)
  • the template with one line written under each of the three sections: check() returns no problems
  • git merge-tree of this branch with main 9aec53d: no conflicts
  • cargo test --workspace -- --test-threads=4 was not rerun on this branch: the diff touches no Rust (last run on main 9aec53d: 724 passed, 0 failed, 41 ignored; SKIPPED 2, no wave64)

Regression run

  • not needed: no file under crates/xcl/src changes

Not tested

  • the PR checks workflow on a real PR opened from the new template
  • how GitHub renders the new template in the PR form (comments are hidden in the preview, as the Regression run hint already is)

AI use

  • Claude Code with Claude Opus 5.5: wrote the change, the test and this description; I reviewed the diff and ran the tests

🤖 Generated with Claude Code

**@⁠aarushkha** on GitHub · 2026-11-24 10:03 UTC · [original](https://github.com/xcl-dev/xcl/pull/991) `aarushkha:pr-checks-template-hints-in-comments` → `main` · +134 −4 · 3 files · 4 commits · closed without merging Stacked on #527; only the top commit (72edc50) belongs here. The hint lines under **Tested** and **AI use** in `.github/pull_request_template.md` were plain text, so a description left as the template passed both section checks (#527 already catches the lone `-` under **Not tested**). With #527 a comment is not something written under a heading, so the hints move into comments and each section keeps an empty `-` to fill in. Fixes #965. **What is in it** - `.github/pull_request_template.md`: the **Tested** and **AI use** hints are HTML comments, followed by an empty list item (same hint text) - `scripts/pr_check.tests.py`: `test_untouched_template_is_refused` expects all three sections refused, not only **Not tested** **Tested** - NVIDIA GeForce RTX 3060 (Windows driver 32.0.16.2101), Intel Core i5-11400F, Windows 10 22H2 (build 19045), Python 3.10 - `python scripts/pr_check.tests.py` on this branch: 12 passed; with the old template the changed test fails (only **Not tested** refused) - the template with one line written under each of the three sections: `check()` returns no problems - `git merge-tree` of this branch with main 9aec53d: no conflicts - `cargo test --workspace -- --test-threads=4` was not rerun on this branch: the diff touches no Rust (last run on main 9aec53d: 724 passed, 0 failed, 41 ignored; SKIPPED 2, no wave64) **Regression run** - not needed: no file under `crates/xcl/src` changes **Not tested** - the `PR checks` workflow on a real PR opened from the new template - how GitHub renders the new template in the PR form (comments are hidden in the preview, as the **Regression run** hint already is) **AI use** - Claude Code with Claude Opus 5.5: wrote the change, the test and this description; I reviewed the diff and ran the tests 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The check of **Tested** / **Not tested** / **AI use** looked for any
non-space character after the heading, so the next section's heading, or
the template's lone "-", counted as the section's text: the pull request
template pasted unchanged passed as "description ok". Only an empty last
section was caught.

A section now ends at the next heading of the outline, and comments and
list markers with nothing after them are not text. A line in bold that is
not one of the outline's headings still belongs to the section.

scripts/pr_check.tests.py covers it without GitHub or git (python3
scripts/pr_check.tests.py): 4 of its 8 tests fail on the old check.

Assisted-by: Claude Code (Claude Fable 5.2)
Review of #527 (shdann): the heading search could start inside an HTML comment, so a description with the
whole Tested section commented out passed, and a section name in bold at the end of a sentence was taken for
its heading.

Comments are removed from the description before the headings are looked for, and a heading has to be a line
of its own (leading and trailing spaces allowed). Two tests cover both; they fail on the commit before.

Assisted-by: Claude Code (Claude Fable 5.2)
Review of #527 (Kalmarv), points 1 and 2:

- The end of a section had no line-of-its-own rule, so a sentence under a section that began with a heading
  name in bold ended it: a filled Tested section was reported empty.
- An unclosed <!-- hides the rest of the description on GitHub but was still read as text. It now takes the
  rest of the description with it.

Two tests cover both; they fail on the commit before.

Assisted-by: Claude Code (Claude Fable 5.2)
The hint lines under **Tested** and **AI use** in the PR template were
plain text, so a description left as the template passed both section
checks. With #527 a comment is not something written under a heading:
the hints move into comments, each section keeps an empty list item to
fill in, and the template test now expects all three sections refused.

Fixes #965

Co-authored-by: Conrage <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:39:29 +00:00
github-bot closed this pull request 2026-11-26 04:39:29 +00:00
Author
Owner

@⁠Conrage on GitHub · 2026-11-24 10:25 UTC · original

I opened #965. I read the top commit: with #527's comment stripping, the hints under Tested and AI use are now comments, so an untouched template fails all three sections, which fixes it.

Since this comes from my report, could you add me as co-author on 3a1cf0e when you next push?

Co-authored-by: Conrage <[email protected]>

Thanks!

AI use: diff read and comment drafted by Claude Code (Claude Opus 5.5) at my request.

**@⁠Conrage** on GitHub · 2026-11-24 10:25 UTC · [original](https://github.com/xcl-dev/xcl/pull/991#issuecomment-7128764285) I opened #965. I read the top commit: with #527's comment stripping, the hints under **Tested** and **AI use** are now comments, so an untouched template fails all three sections, which fixes it. Since this comes from my report, could you add me as co-author on 3a1cf0e when you next push? `Co-authored-by: Conrage <65290519+[email protected]>` Thanks! AI use: diff read and comment drafted by Claude Code (Claude Opus 5.5) at my request.
Author
Owner

@⁠jmal423 on GitHub · 2026-11-24 10:39 UTC · original

Checked the clean merge of #991 head 3a1cf0e with main 6efdabc (tree 98e2edf30cc5a0ae02a412611735bda45a43c67d). One test discovery detail matters for #1019:

  • python -m unittest discover -s scripts -p "test_*.py" runs 5 tests. It misses test_untouched_template_is_refused because the stacked suite is named pr_check.tests.py.
  • python scripts/pr_check.tests.py runs 12 tests and all pass, including the untouched-template regression. Please consider renaming that suite to a distinct discoverable name such as test_pr_check_sections.py in #527; main already has a separate test_pr_check.py. Verified in an isolated local copy: changing only that filename made the same discovery command run all 17 tests successfully, including test_untouched_template_is_refused.
  • The PR checker rejected all three empty sections with the new template, and accepted it with one substantive line added to each section.

Also ran the full debug workspace on the merged tree, native Windows 11 Pro / RX 9070 XT, driver 32.0.32029.2010, Rust 1.99.1: 727 passed, 0 failed, 41 ignored. Two debug-layer skips counted as passed; retail sample variables unset.

AI use: OpenAI Codex ran the checks and wrote this note from the results.

**@⁠jmal423** on GitHub · 2026-11-24 10:39 UTC · [original](https://github.com/xcl-dev/xcl/pull/991#issuecomment-7129063302) Checked the clean merge of #991 head `3a1cf0e` with main `6efdabc` (tree `98e2edf30cc5a0ae02a412611735bda45a43c67d`). One test discovery detail matters for #1019: - `python -m unittest discover -s scripts -p "test_*.py"` runs 5 tests. It misses `test_untouched_template_is_refused` because the stacked suite is named `pr_check.tests.py`. - `python scripts/pr_check.tests.py` runs 12 tests and all pass, including the untouched-template regression. Please consider renaming that suite to a distinct discoverable name such as `test_pr_check_sections.py` in #527; main already has a separate `test_pr_check.py`. Verified in an isolated local copy: changing only that filename made the same discovery command run all 17 tests successfully, including test_untouched_template_is_refused. - The PR checker rejected all three empty sections with the new template, and accepted it with one substantive line added to each section. Also ran the full debug workspace on the merged tree, native Windows 11 Pro / RX 9070 XT, driver 32.0.32029.2010, Rust 1.99.1: 727 passed, 0 failed, 41 ignored. Two debug-layer skips counted as passed; retail sample variables unset. AI use: OpenAI Codex ran the checks and wrote this note from the results.
Author
Owner

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

Thanks. #965 is fixed by #1037 (merged in dc6a283), so this is superseded. Moving the template's hints into comments is still a good idea – it fits best together with #527 if that one goes in, as a follow-up on top of main.

**@⁠ivall** on GitHub · 2026-11-24 11:04 UTC · [original](https://github.com/xcl-dev/xcl/pull/991#issuecomment-7129623382) Thanks. #965 is fixed by #1037 (merged in dc6a283), so this is superseded. Moving the template's hints into comments is still a good idea – it fits best together with #527 if that one goes in, as a follow-up on top of `main`.

Pull request closed

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