Skip to content

semver: collapse a || union containing a match-all branch to * before the prerelease rule - #33739

Open
robobun wants to merge 12 commits into
mainfrom
farm/2e7244b8/semver-any-collapse
Open

semver: collapse a || union containing a match-all branch to * before the prerelease rule#33739
robobun wants to merge 12 commits into
mainfrom
farm/2e7244b8/semver-any-collapse

retrigger gate: release build infra failure

13ddb39
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jul 8, 2026 in 32m 45s

Code review found 2 potential issues

Found 1 candidates, confirmed 2. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 2
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit src/semver/SemverQuery.rs:934-954 Three consecutive pipes ('|||') set MATCH_ALL_BRANCH; regression from pre-PR Bun and npm-loose

Annotations

Check warning on line 954 in src/semver/SemverQuery.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

Three consecutive pipes ('|||') set MATCH_ALL_BRANCH; regression from pre-PR Bun and npm-loose

Gap in the b7412e5f lone-`|` fix: `is_double` only checks the byte immediately after the first `|`, then the `while` consumes the whole pipe run as one separator — so for exactly three trailing pipes (`"1.2.3-alpha.1 |||"`), `is_double` is true, all 3 are swallowed, the new branch is empty, and the post-loop check sets `MATCH_ALL_BRANCH` (Bun → `false`). npm-loose splits on `/\s*\|\|\s*/` giving `["1.2.3-alpha.1", "|"]`; the lone-`|` branch is dropped via `.filter(c => c.length)` **before** the