Scripts: read smoke blocks from the Regression run section #2705

Open
luckyteagirl wants to merge 2 commits from upstream-pr/2715 into main
luckyteagirl commented 2026-11-26 08:09:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T08:09:43Z.


scripts/pr_check.py accepted a runtime PR's xcl-smoke blocks anywhere in its description. A Regression run section saying “Pending” could therefore pass when old example blocks appeared under Not tested. Read smoke blocks only from the visible Regression run section, as required by CONTRIBUTING.md.

What is in it

  • scripts/pr_check.py: extract template sections while ignoring headings in HTML comments and fenced examples; preserve fenced smoke reports and literal inline code, and accept a BOM before the first heading.
  • scripts/test_pr_check.py: reproduce misplaced-block acceptance, verify valid in-section blocks, and cover commented/fenced headings and inline comment markers.
  • Follow-up: check banned model disclosures against the visible AI use section. A commented-out example before that section no longer supplies the model text used by the audit.

Tested

  • Windows 11 Home build 26200, Ryzen 9 5980HX, AMD Radeon RX 6800M (driver 30.0.13002.13003), Python 3.11.9, Rust 1.99.0 MSVC.
  • Failing-first checker fixture: the unmodified checker returned no problems for two valid blocks under Not tested with Regression run pending. The new checker reports both missing runs.
  • Failing-first follow-up fixture: a hidden HTML comment naming a banned model falsely rejected an otherwise valid visible disclosure before the fix; it passes on this head.
  • python -B -m unittest discover -s scripts -p 'test_pr_check.py': 22 passed, 0 failed, exit 0.
  • python -m unittest discover -s scripts -p 'test_*.py': 34 passed, 0 failed, exit 0.
  • git diff 49a36411 HEAD --check: passed.

Not tested

  • The workspace GPU suite or a title smoke on this script-only change.

AI use

  • OpenAI Codex (GPT-6.2 Sol) reproduced the checker defect, wrote the code and fixtures, and ran the Python tests. A second GPT-6.2 Sol agent prepared and tested the visible AI disclosure follow-up. OpenAI Codex (GPT-6.2 Astra) reviewed both diffs and reran the full Python script test set.
<!-- greyfinch-sync:ivall/xcl:issue:5506330962 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2715). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-26T08:09:43Z. --- `scripts/pr_check.py` accepted a runtime PR's `xcl-smoke` blocks anywhere in its description. A **Regression run** section saying “Pending” could therefore pass when old example blocks appeared under **Not tested**. Read smoke blocks only from the visible **Regression run** section, as required by `CONTRIBUTING.md`. **What is in it** - `scripts/pr_check.py`: extract template sections while ignoring headings in HTML comments and fenced examples; preserve fenced smoke reports and literal inline code, and accept a BOM before the first heading. - `scripts/test_pr_check.py`: reproduce misplaced-block acceptance, verify valid in-section blocks, and cover commented/fenced headings and inline comment markers. - Follow-up: check banned model disclosures against the visible **AI use** section. A commented-out example before that section no longer supplies the model text used by the audit. **Tested** - Windows 11 Home build 26200, Ryzen 9 5980HX, AMD Radeon RX 6800M (driver 30.0.13002.13003), Python 3.11.9, Rust 1.99.0 MSVC. - Failing-first checker fixture: the unmodified checker returned no problems for two valid blocks under **Not tested** with **Regression run** pending. The new checker reports both missing runs. - Failing-first follow-up fixture: a hidden HTML comment naming a banned model falsely rejected an otherwise valid visible disclosure before the fix; it passes on this head. - `python -B -m unittest discover -s scripts -p 'test_pr_check.py'`: **22 passed, 0 failed**, exit 0. - `python -m unittest discover -s scripts -p 'test_*.py'`: **34 passed, 0 failed**, exit 0. - `git diff 49a36411 HEAD --check`: passed. **Not tested** - The workspace GPU suite or a title smoke on this script-only change. **AI use** - OpenAI Codex (GPT-6.2 Sol) reproduced the checker defect, wrote the code and fixtures, and ran the Python tests. A second GPT-6.2 Sol agent prepared and tested the visible AI disclosure follow-up. OpenAI Codex (GPT-6.2 Astra) reviewed both diffs and reran the full Python script test set.
Foniass commented 2026-12-01 08:47:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:47:45Z.


Triage (#1607) – head b0cd387

Main's scripts/pr_check.py still reads smoke_blocks(body) from the whole description. Nothing on main or in another open PR limits it to Regression run or skips headings inside fenced code.
The second commit overlaps #835 (stacked on #527). Both make the banned-model check read only the visible AI use section with HTML comments removed. #527/#835 do it with section_texts(), this PR with section_text() plus fence handling. Whichever merges second has to adopt the other's helper.
No problems found in the diff.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7305794795 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2715#issuecomment-7305794795). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T08:47:45Z. --- **Triage (#1607)** – head b0cd387 Main's `scripts/pr_check.py` still reads `smoke_blocks(body)` from the whole description. Nothing on main or in another open PR limits it to **Regression run** or skips headings inside fenced code. The second commit overlaps #835 (stacked on #527). Both make the banned-model check read only the visible **AI use** section with HTML comments removed. #527/#835 do it with `section_texts()`, this PR with `section_text()` plus fence handling. Whichever merges second has to adopt the other's helper. No problems found in the diff. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2715:upstream-pr/2715'
git switch 'upstream-pr/2715'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2715'
git switch 'upstream-pr/2715'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2715'
git switch 'upstream-pr/2715'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2715'
git switch 'main'
git merge --squash 'upstream-pr/2715'
git switch 'main'
git merge --ff-only 'upstream-pr/2715'
git switch 'main'
git merge 'upstream-pr/2715'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!2705
No description provided.