Skip to content

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

Closed
aarushkha wants to merge 4 commits into
xcl-dev:mainfrom
aarushkha:pr-checks-template-hints-in-comments
Closed

aarushkha wants to merge 4 commits into
xcl-dev:mainfrom
aarushkha:pr-checks-template-hints-in-comments

Conversation

@aarushkha

@aarushkha aarushkha commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

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

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)
…there

Review of xcl-dev#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)
… hides the rest

Review of xcl-dev#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)
@Conrage

Conrage commented Nov 24, 2026

Copy link
Copy Markdown

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+Conrage@users.noreply.github.com>

Thanks!

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

@aarushkha
aarushkha marked this pull request as ready for review November 24, 2026 10:37
@upipibi upipibi mentioned this pull request Nov 24, 2026
@jmal423

jmal423 commented Nov 24, 2026 •

Copy link
Copy Markdown

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 PR checks: a section with nothing under it is refused as empty #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.

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 xcl-dev#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 xcl-dev#965

Co-authored-by: Conrage <65290519+Conrage@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ivall

ivall commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

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.

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

5 participants