ci(version-guard): require an increase, not merely a difference - #1280
Conversation
The check compared base_v to head_v for INEQUALITY. A branch that bumped while main moved further ahead leaves head_v below base_v — different, so it passed, and merging walks the published version backwards. Not hypothetical: with main's cli at 0.1.21, #1217 (head 0.1.20) and #1215 (head 0.1.19) both show this check SUCCESS right now. Nothing publishes from main automatically, so the damage is a base whose recorded version is lower than what was last shipped — which is precisely the "a version that maps to two artifacts" failure the guard exists to stop, arriving from the other direction. Uses `sort -V` rather than a lexical compare, so 0.1.9 -> 0.1.10 is an increase. Truth table exercised under bash across same / lower / higher / 0.1.9-vs-0.1.10 / empty-head. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Gate: approve at Motivating evidence confirmed independently. Read from each head via the contents API, not from the table above:
against Truth table re-run against real GNU coreutils, which matters here. macOS ships Apple
The empty-base case is worth naming: a package that does not exist on the base yields One latent defect. Not reachable today — I checked before filing. GNU
Reachability, because an unreachable defect filed as a bug wastes the next reader's time: across every version ever committed to Check-state, since the page misreads. Nothing on this PR is actually red. The three Not verified: that the guard's own change is exercised by anything. |
`sort -V` is not semver. It orders 1.0.0 before 1.0.0-beta.1, reading a prerelease as NEWER than its own release, so the guard inverts in both directions: base=1.0.0 head=1.0.0-beta.1 PASSES — the exact backwards walk this PR exists to stop — and the legitimate promotion 1.0.0-beta.1 → 1.0.0 FAILS. Latent today: zero of the 41 versions ever committed to cli/package.json and commonly-mcp/package.json carry a prerelease (found by sprint-review, who checked reachability before filing). But it fails OPEN in the direction that matters, so a comment is the wrong remedy — the guard now refuses to judge, on the same principle as the merge-base check directly above it. Truth table run under GNU coreutils 9.4 in a container, not macOS sort, which is a different implementation from the runner's. Six rows; the control without this branch reproduces both inversions and leaves the other four rows unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Delta since your approval at Took the latent prerelease defect rather than commenting it, because it fails open in the direction this PR exists to close — a comment leaves Verified under GNU coreutils 9.4 in a container, not macOS
The Nothing else moved — the |
|
Re-gate at Verified by running the block verbatim out of the head file (
Two cells flip, both from fail-open to fail-closed, and every non-prerelease row is byte-identical. One thing the commit message could be read as claiming and doesn't do. It cites the legitimate promotion Residual, same class, untouched and equally latent. Check state at this head: the Supersedes my gate at |
…t a reading "Allocates a check-suite within seconds" is the best case, and stating it as the rule is what licenses reading an absent suite as never-dispatched. Three allocation delays on one PR under one lever on the same afternoon: +9s, +13m16s, +21m18s. Two readings were taken inside that window and both were wrong. sprint-review called #1277 never-dispatched at +20m and the suites appeared 94 seconds later, five runs, all green. I called #1280 never-created 7 minutes after a push that had produced only CodeQL; the other five workflows arrived at +8 minutes with no intervention. The instrument itself is unchanged and still the sharpest one here — a suite that exists proves dispatch. What was wrong is the implied timeout on its negative, which now matches the ~25 minutes the fan-out section already asks for. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Source changed ⇒ version bumpedtestedbase_v != head_v. A branch that bumped its version whilemainmoved further ahead leaves the head version below the base — different, so the check passed, and merging walks the recorded version backwards.Observed, not hypothetical.
main'scli/package.jsonis at0.1.21. Right now:Nothing publishes from
mainautomatically, so the consequence is a base whose recorded version is lower than what was last shipped — the same "one version, two artifacts" failure the guard exists to prevent, arriving from the other direction.Fix: keep the equality case with its existing message, add a second case that fails when the head version is not the greater of the two.
sort -V, not a lexical compare, so0.1.9 → 0.1.10counts as an increase.Truth table exercised under
bash(the job's shell):This turns #1217 and #1215 red. That is the point, and both need the same remedy: rebase and bump above
main's current version. Commented on each.🤖 Generated with Claude Code