Scripts: count merge checks that start with a byte-order mark #3542
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3542"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by throny on 2026-11-30T19:04:35Z.
scripts/triage_pr.pyignored a #3041 merge-check comment whose body started with a byte-order mark (U+FEFF) or its cp437 mojibake, because the first line was compared with exactlymerge-check. On #1230 two accounts had posted "safe to merge" checks, one of them with a BOM, and the PR keptneeds-2nd-checkandneeds:amd-test.What is in it
scripts/triage_pr.py:parse_merge_checks()strips leading BOM characters, the mojibake sequence and surrounding whitespace from the body before comparing the first line (newBOM_PREFIX_RE); one docstring line adjusted.scripts/test_triage_pr.py:TestMergeCheckParsing.test_check_starting_with_byte_order_mark_counts(a check starting with BOM + mojibake and one starting with BOM only both count as safe).Tested
python -I -m unittest discover -s scripts -p test_triage_pr.py: 11 tests, OKtriage_pr.pychange stashed: 11 tests, 1 failure (0 != 2), so the test fails without the fixRegression run
scripts/only), no smoke run needed.Not tested
auto-triageworkflow run itself on GitHub.AI use
🤖 Generated with Claude Code
Imported from ivall/xcl. Originally posted by throny on 2026-11-30T19:08:48Z.
Draft for now: every merge check this would start counting (14 open PRs: #316, #638, #655, #699, #703, #738, #739, #974, #982, #1555, #1571, #1776, #1823, #2293, plus the merged #1230) comes from one account whose checks name DeepSeek as the model, which CONTRIBUTING.md does not accept for contributions. Counting them would label those 14
ready-to-mergeon one valid check. Whether such checks count is the maintainer's call; until then the bot ignoring them is the safer outcome.AI use: Claude Code (Claude Opus 5.5) checked the affected PRs and wrote this.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T02:54:54Z.
Review (head
c18e612d, diff read, not a merge-check; draft, so not built or run):.github/workflows/auto-triage.yml:23(andtesting-feed.yml:41) only run on a comment whenstartsWith(github.event.comment.body, 'merge-check'), which a body starting with U+FEFF fails. Soneeds-2nd-check/needs:amd-teststay until the next push or edit of the PR.queue.jsonis fine, since its scheduled rebuild reads every comment. Either relax the workflow filters too (e.g.contains(..., 'merge-check')with the script as the real check), or list it under Not tested.) is stripped, not the cp1252 one (). The #1230 comments only use the cp437 one, so this is a possible gap, not a bug.Fine: the stripping only touches the start of the body,
head:/verdict:parsing is unchanged, and the new test fails without the fix (0 instead of 2 counted checks). It matches how #3041 already counts these comments.AI review: Claude Code (Claude Opus 5.5), posted for @Foniass without a human check of each point.
Imported from ivall/xcl. Originally posted by throny on 2026-12-01T04:13:22Z.
@Foniass thanks, both points are right: the workflow filters (
auto-triage.yml,testing-feed.yml) only fire on a body that starts withmerge-check, so a BOM-prefixed check would still need another event to relabel, and the cp1252 form () is not stripped. I'll add both if this goes ahead. It is a draft for the reason in my comment above: the checks it would start counting today are all from one account that names DeepSeek as its model, which CONTRIBUTING.md does not accept, so whether such checks count is the maintainer's call first.AI use: Claude Code (Claude Opus 5.5).
Imported from ivall/xcl. Originally posted by throny on 2026-12-01T06:47:08Z.
Closing: the only checks this would start counting are ones written with a model CONTRIBUTING.md does not accept, so the bot ignoring them is the better outcome for now. @Foniass's two points (workflow filters, cp1252 form) are noted here if it is needed later.
AI use: Claude Code (Claude Opus 5.5).
Pull request closed