Skip to content

Scripts: pr_check accepts markdown headings and any case for the sections - #1645

Draft
Diskuss wants to merge 1 commit into
xcl-dev:mainfrom
Diskuss:scripts/pr-check-heading-forms
Draft

Diskuss wants to merge 1 commit into
xcl-dev:mainfrom
Diskuss:scripts/pr-check-heading-forms

Conversation

@Diskuss

@Diskuss Diskuss commented Nov 24, 2026

Copy link
Copy Markdown

scripts/pr_check.py found a required section only as the template's bold **Tested**, case-sensitively. Descriptions that use markdown headings (## Tested, ## Not Tested, ## AI Use) were refused with "the Tested section is missing or empty" though the sections were there and filled, e.g. #1633, #1634, #1635. A section heading is now **Name** as before, or a markdown heading on a line of its own, with the name in any case.

What is in it

  • scripts/pr_check.py: heading() matches **Name** or #..###### Name (the name may be in bold), case-insensitive. section_has_content() uses it for the section's start and for the next heading that ends it; the AI use text read by the banned-model check starts at the same heading, so a model named under ## AI use is still refused. Empty sections and template placeholders still fail. +11 -8.
  • scripts/test_pr_check.py: HeadingFormTests, 5 tests: markdown headings and other cases pass, empty markdown sections fail, a markdown heading ends the section before it, ## Tested things is not a heading, a banned model under ## AI Use is refused. +33.
  • Not in it: a section heading directly followed by the next heading with no blank line between them still reads the next heading as the section's text, as on main (PR checks: a section with nothing under it is refused as empty #527 handles where a section ends).

Tested

Regression run

  • n/a: scripts-only, no runtime change.

Not tested

  • The Rust workspace was not built or tested: this PR changes no Rust.
  • The PR checks workflow on GitHub's runner (it runs main's copy of the checker, so this PR's own check uses the old rules).

AI use

  • Written by Claude Code (Claude Opus 5.5); the user reviews before marking ready.

🤖 Generated with Claude Code

…ions

The PR description check found a section only as the template's bold
`**Tested**`, case-sensitively. Descriptions written with markdown
headings (`## Tested`, `## Not Tested`, `## AI Use`) were refused with
"the **Tested** section is missing or empty" though the sections were
there and filled; about 20 open PRs fail only on this.

A section heading is now `**Name**` as before, or a markdown heading
`#`..`######` on a line of its own (optionally with the name in bold),
with the name in any case. The same heading form starts the **AI use**
text the banned-model check reads, so a model named under `## AI use`
is still refused. Empty sections and template placeholders still fail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RobertAndreiGit

Copy link
Copy Markdown

Tested on Apple Silicon (arm64 macOS), Python 3.14.7. cd scripts && python3 -B -m unittest test_pr_check: 13/13 passed on base c160d86ef2efe3a07e4dfb473e4fa72eafb413c0; 18/18 passed on head 2068275e7affa79096d78eacd1c1fa47dbb1b7c6. No skips on either.

In direct check() comparisons, filled mixed-case ATX headings worked on head. Two other inputs changed from rejected on base to accepted on head:

Input Base Head
Otherwise filled template ending with **AI use**, ### Tools, then Qwen on separate lines Flagged the model name No problem reported
A fenced Markdown example containing all three filled ATX sections, with no sections outside the fence Reported three missing sections No problem reported

Not tested: Windows runtime, GPU, or the hosted workflow. These results are for the Python checker only.

AI use: OpenCode (GPT-6.2 Astra) ran the comparisons and wrote this report.

@DavidM1911

Copy link
Copy Markdown
Contributor

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~22 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified main.)

Thanks!

@ivall ivall added the off-goal Does not bear on the current goal (world loading); waits until it is reached label Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

off-goal Does not bear on the current goal (world loading); waits until it is reached

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants