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

Closed
opened 2026-11-24 09:37:55 +00:00 by Conrage · 1 comment
Conrage commented 2026-11-24 09:37:55 +00:00 (Migrated from github.com)
Contributor

Imported from ivall/xcl. Originally posted by Conrage on 2026-11-24T09:37:55Z.


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.

<!-- greyfinch-sync:ivall/xcl:issue:6578863954 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/966). Originally posted by [Conrage](https://github.com/Conrage) on 2026-11-24T09:37:55Z. --- `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.
ivall commented 2026-11-24 11:05:40 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by ivall on 2026-11-24T10:10:18Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7128412954 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/issues/966#issuecomment-7128412954). Originally posted by [ivall](https://github.com/ivall) on 2026-11-24T10:10:18Z. --- 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.
Sign in to join this conversation.
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#960
No description provided.