Scripts: pr_check refuses smoke blocks without a title, time or frames #1133

Manually merged
github merged 1 commit from gh-pr/1133/head into gh-pr/1133/base 2026-11-26 04:44:32 +00:00
Owner

@⁠emirduran707 on GitHub · 2026-11-24 12:16 UTC · original
emirduran707:pr-check-smoke-fields → main · +38 −2 · 2 files · 1 commits · merged 2026-11-24 15:51 UTC

check() compares the main and PR xcl-smoke blocks through number(), which returns None for a missing field. The comparisons let None pass, and the title / seconds match compares None == None. So two blocks holding only xcl-smoke v1 and commit: <sha> pass every regression check.

CONTRIBUTING.md, item 3, asks for "at least 80 % of main's frames", with blocks "of the same title for the same time". Neither can be checked on such a block.

What is in it

  • scripts/pr_check.py:
    • field_problems reports a smoke block that lacks a title, seconds or frames shown line, or has a non-number in one of the last two;
    • each message names the field and the block's commit;
    • it runs on the PR's block, and on the main block that matches it (on every main block when none matches).
  • Scope, to avoid overlapping open PRs:
    • the crash and device-removal counts are left to #635, which requires numeric counts;
    • peak commit is left to #1103.
  • scripts/test_pr_check.py:
    • blocks with only commit lines are refused for each of the three fields, in both blocks;
    • a non-numeric frames shown is named;
    • the two blocks in one fence fixture gets full blocks.

Tested

  • Windows 11 Pro 26300, Python 3 (python -I).
  • python -I -m unittest discover -s scripts -p "test_*.py": 11 tests, OK.
  • With main's pr_check.py and these tests: FAILED (failures=2), the two new tests.

Not tested

  • The PR checks workflow itself on a PR with such a block; only the function, locally.
  • Merge order with #635 / #1103: both touch nearby lines, and #1103 also edits the same test fixture. Whichever lands second has a small rebase.

AI use

  • Claude Code with Claude Opus 5.5:
    • a sub-agent found and demonstrated this in an audit of pr_check.py;
    • another wrote the fix and tests;
    • I reviewed them, narrowed them to what #635 / #1103 do not cover, and made an empty commit line safe.

🤖 Generated with Claude Code

**@⁠emirduran707** on GitHub · 2026-11-24 12:16 UTC · [original](https://github.com/xcl-dev/xcl/pull/1133) `emirduran707:pr-check-smoke-fields` → `main` · +38 −2 · 2 files · 1 commits · merged 2026-11-24 15:51 UTC `check()` compares the `main` and PR `xcl-smoke` blocks through `number()`, which returns `None` for a missing field. The comparisons let `None` pass, and the title / seconds match compares `None == None`. So two blocks holding only `xcl-smoke v1` and `commit: <sha>` pass every regression check. CONTRIBUTING.md, item 3, asks for "at least 80 % of `main`'s frames", with blocks "of the same title for the same time". Neither can be checked on such a block. **What is in it** - `scripts/pr_check.py`: - `field_problems` reports a smoke block that lacks a `title`, `seconds` or `frames shown` line, or has a non-number in one of the last two; - each message names the field and the block's commit; - it runs on the PR's block, and on the `main` block that matches it (on every `main` block when none matches). - Scope, to avoid overlapping open PRs: - the crash and device-removal counts are left to #635, which requires numeric counts; - `peak commit` is left to #1103. - `scripts/test_pr_check.py`: - blocks with only commit lines are refused for each of the three fields, in both blocks; - a non-numeric `frames shown` is named; - the `two blocks in one fence` fixture gets full blocks. **Tested** - Windows 11 Pro 26300, Python 3 (`python -I`). - `python -I -m unittest discover -s scripts -p "test_*.py"`: 11 tests, OK. - With `main`'s `pr_check.py` and these tests: FAILED (failures=2), the two new tests. **Not tested** - The `PR checks` workflow itself on a PR with such a block; only the function, locally. - Merge order with #635 / #1103: both touch nearby lines, and #1103 also edits the same test fixture. Whichever lands second has a small rebase. **AI use** - Claude Code with Claude Opus 5.5: - a sub-agent found and demonstrated this in an audit of `pr_check.py`; - another wrote the fix and tests; - I reviewed them, narrowed them to what #635 / #1103 do not cover, and made an empty `commit` line safe. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
check() compares the main and PR xcl-smoke blocks through number(), which
gives None for a missing field, and the comparisons let None pass; the
title / seconds match compares None == None. Two blocks holding only
`xcl-smoke v1` and `commit: <sha>` passed every regression check, though
CONTRIBUTING asks for at least 80 % of main's frames and blocks of the same
title for the same time.

A block that lacks a `title`, `seconds` or `frames shown` line, or has a
non-number in one of the last two, is now reported, naming the field and
the block's commit: the PR's block, and the main block it is compared with
(every main block when none matches). The crash and device-removal counts
are left to #635, and the peak commit to #1103.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:44:31 +00:00
github manually merged commit 1d83fd12b8 into gh-pr/1133/base 2026-11-26 04:44:32 +00:00
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-24 14:15 UTC · original

Tested exact head 1d83fd1, script tests only, since this PR has no test report yet.

Tested

  • Windows 11 Home 26300, Python 3.14.3 with pytest 9.0.3, Windows PowerShell 5.1.26100.9818 (no PowerShell 7 here).
  • python -m pytest scripts/test_pr_check.py at the head: 11 passed.
  • The PR's test file(s) against current main's script (930e8b4): 2 failed: test_blocks_with_only_commit_lines_fail, test_non_numeric_frames_shown_fails. So the new test catches the problem the PR fixes.

Not tested

  • PowerShell 7, the CI workflow itself, a game (no runtime code changed).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-24 14:15 UTC · [original](https://github.com/xcl-dev/xcl/pull/1133#issuecomment-7134094871) Tested exact head `1d83fd1`, script tests only, since this PR has no test report yet. **Tested** - Windows 11 Home 26300, Python 3.14.3 with pytest 9.0.3, Windows PowerShell 5.1.26100.9818 (no PowerShell 7 here). - `python -m pytest scripts/test_pr_check.py` at the head: 11 passed. - The PR's test file(s) against current main's script (`930e8b4`): 2 failed: `test_blocks_with_only_commit_lines_fail`, `test_non_numeric_frames_shown_fails`. So the new test catches the problem the PR fixes. **Not tested** - PowerShell 7, the CI workflow itself, a game (no runtime code changed). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
This discussion has been locked. Commenting is limited to contributors.
No description provided.