PR checks: two xcl-smoke blocks pasted in one code fence are read as one #966

Closed
opened 2026-11-26 04:38:31 +00:00 by github-bot · 1 comment
Owner

@⁠Conrage on GitHub · 2026-11-24 09:37 UTC · original

smoke_blocks() reads a block from xcl-smoke v1 up to the next code fence:

github.com/ivall/xcl@077ce40/scripts/pr_check.py (L31)

If both blocks (main's and the PR's) are pasted inside one fenced block, the first match takes both. The second block's keys overwrite the first's (commit becomes the PR's), and the check then reports that the main run is missing.

Repro (run locally):

from pr_check import smoke_blocks
body = """```
xcl-smoke v1
commit: 1111111aaaa
title: G
seconds: 60

xcl-smoke v1
commit: abc1234def
title: G
seconds: 60
```"""
print(len(smoke_blocks(body)))   # 1, expected 2

Suggested fix: end a block at the next xcl-smoke v1 line as well as at a fence, e.g. r"xcl-smoke v1\s*\n(.*?)(?=xcl-smoke v1|```|\Z)".

AI use: found, checked and written up by Claude Code (Claude Opus 5.5) at my request.

**@⁠Conrage** on GitHub · 2026-11-24 09:37 UTC · [original](https://github.com/xcl-dev/xcl/issues/966) `smoke_blocks()` reads a block from `xcl-smoke v1` up to the next code fence: https://github.com/ivall/xcl/blob/077ce40/scripts/pr_check.py#L31 If both blocks (main's and the PR's) are pasted inside one fenced block, the first match takes both. The second block's keys overwrite the first's (`commit` becomes the PR's), and the check then reports that the main run is missing. **Repro (run locally):** ````python from pr_check import smoke_blocks body = """``` xcl-smoke v1 commit: 1111111aaaa title: G seconds: 60 xcl-smoke v1 commit: abc1234def title: G seconds: 60 ```""" print(len(smoke_blocks(body))) # 1, expected 2 ```` **Suggested fix:** end a block at the next `xcl-smoke v1` line as well as at a fence, e.g. `r"xcl-smoke v1\s*\n(.*?)(?=xcl-smoke v1|```|\Z)"`. **AI use:** found, checked and written up by Claude Code (Claude Opus 5.5) at my request.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:38:31 +00:00
Author
Owner

@⁠ivall on GitHub · 2026-11-24 10:10 UTC · original

Fixed by #988 (6efdabc): a block now also ends at the next xcl-smoke v1 line, so two blocks pasted in one fence are read as two. Thanks for the repro.

**@⁠ivall** on GitHub · 2026-11-24 10:10 UTC · [original](https://github.com/xcl-dev/xcl/issues/966#issuecomment-7128412954) Fixed by #988 (6efdabc): a block now also ends at the next `xcl-smoke v1` line, so two blocks pasted in one fence are read as two. Thanks for the repro.
This discussion has been locked. Commenting is limited to contributors.
No description provided.