diff --git a/scripts/pr_check.py b/scripts/pr_check.py index cb0ef3ef9e..090411825e 100644 --- a/scripts/pr_check.py +++ b/scripts/pr_check.py @@ -12,12 +12,19 @@ SECTIONS = ("Tested", "Not tested", "AI use") HEADINGS = ("What is in it", "Tested", "Regression run", "Not tested", "AI use") -# placeholder lines copied verbatim from .github/pull_request_template.md (#965) +# placeholder lines copied verbatim from .github/pull_request_template.md (#965) and from the +# outline in CONTRIBUTING.md ("PR description"), which AGENTS.md tells agents to write to TEMPLATE_PLACEHOLDERS = frozenset({ "hardware (GPU + driver, CPU), Rust version, debug / release:", "`cargo test --workspace -- --test-threads=4`: N passed, N failed, N ignored (SKIPPED GPU tests: …)", "`cargo test --workspace -- --test-threads=4`: N passed, N failed, N ignored (SKIPPED GPU tests: ...)", "none / tool and model, and what it did", + "hardware (GPU + driver, CPU), Windows build, Rust version, debug/release", + "commands run and their results, e.g. `cargo test --workspace -- --test-threads=4`: 541 passed, 0 failed, 21 ignored", + "`SKIPPED` GPU tests on your adapter, if any", + "game checked (if any), and what got better, with numbers if you have them", + "what you could not check, e.g. AMD / NVIDIA, the retail title, wave32-only GPUs", + "none / which tool and model (e.g. Claude Code with Claude Opus 5.5), and for what (see below)", }) # small / open-weight models are not accepted for code (CONTRIBUTING.md, "AI-assisted contributions") # and their family names: CodeLlama / TinyLlama, CodeQwen / QwQ, Mistral's *stral models, "Phi 4" diff --git a/scripts/test_pr_check.py b/scripts/test_pr_check.py index 8cc45d5d06..9dff26ecc9 100644 --- a/scripts/test_pr_check.py +++ b/scripts/test_pr_check.py @@ -117,6 +117,20 @@ def test_untouched_pr_template_fails_all_required_sections(self): problems, ) + def test_untouched_contributing_outline_fails_all_required_sections(self): + contributing = Path(__file__).resolve().parent.parent / "CONTRIBUTING.md" + text = contributing.read_text(encoding="utf-8") + body = text.split("### PR description", 1)[1].split("```markdown\n", 1)[1].split("```", 1)[0] + problems = check(body, HEAD, [changed("README.md")], lambda _: True) + self.assertEqual( + [ + "the **Tested** section is missing or empty", + "the **Not tested** section is missing or empty", + "the **AI use** section is missing or empty", + ], + problems, + ) + def test_filled_template_with_comments_and_real_lines_passes(self): body = ( "**Tested**\n"