Repository navigation
fix(updater): exclude prerelease tags from stable channel git resolution - #86424
1052326311 wants to merge 1 commit into
Conversation
…l resolution Introduce isPrereleaseTag covering alpha, beta, rc, canary, dev, nightly, and preview suffixes. Change isStableTag to use !isPrereleaseTag so the git updater no longer checks out prerelease tags on the stable channel. Closes openclaw#86218
|
Codex review: needs real behavior proof before merge. Reviewed May 25, 2026, 5:43 AM ET / 09:43 UTC. Summary PR surface: Source +4, Tests +26, Docs +1. Total +31 across 3 files. Reproducibility: yes. from source inspection: current main treats stable as not-beta and the git updater checks out the first sorted stable match, so a newer alpha tag can win over the true stable tag. I did not run a live updater repro in this read-only review. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance: Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land the narrow tag-classification fix after real git-update proof or maintainer-run live proof confirms stable git updates choose the stable tag while preserving legacy numeric patch tags. Do we have a high-confidence way to reproduce the issue? Yes from source inspection: current main treats stable as not-beta and the git updater checks out the first sorted stable match, so a newer alpha tag can win over the true stable tag. I did not run a live updater repro in this read-only review. Is this the best way to solve the issue? Yes, the patch directly tightens the shared stable-tag predicate and adds focused regression coverage without changing npm registry resolution. The solution still needs real git-update proof before merge. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 4737e1905871. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +4, Tests +26, Docs +1. Total +31 across 3 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
ClawSweeper PR egg 🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat. Where did the egg go?
|
|
Thanks for the careful fix here. I picked #86260 as the canonical PR for this bug because it has the same stable-tag classifier change plus an I refreshed #86260 on current |
|
Thanks @steipete — totally fair call, #86260 has the broader Already lined up the next batch of queueable-fixes from our enterprise OpenClaw deployments — keeping each PR narrow, proof-backed, and minimal so the maintainer queue stays clean. More incoming. |
Summary
openclaw updateon git installs with thestablechannel can check out alpha tags (e.g.v2026.5.24-alpha.1) becauseisStableTagonly excludesbeta— every other prerelease suffix passes the stable filter. The git updater then sorts allv*tags descending and picks the firstisStableTagmatch, which can be an alpha tag newer than the latest stable release.This PR widens the stable gate by introducing
isPrereleaseTag(matchesalpha,beta,rc,canary,dev,nightly,previewsuffixes) and changesisStableTagto exclude all prereleases, not just beta. No changes to npm registry resolution — only the git tag filter is affected.Closes #86218.
Change Type
Scope
Linked Issue
Real behavior proof
Behavior or issue addressed: On a git-based install configured for the
stablechannel,openclaw updatechecks outv2026.5.24-alpha.1instead ofv2026.5.22becauseisStableTagonly rejects beta tags and lets alpha tags through.Real environment tested: macOS Darwin 25.4.0 arm64, Node v22.22.0, openclaw branch
fix/git-updater-stable-excludes-alpharebased on upstream main commit9afbfc1b63cde5e152e24f280f2132d8957bc50f.Exact steps or command run after this patch:
node scripts/run-vitest.mjs run src/infra/update-channels.test.ts— focused tag classification tests.node scripts/run-vitest.mjs run test/scripts/install-sh.test.ts test/scripts/install-cli.test.ts— Sweeper acceptance criteria.update-channels.test.ts— new tests fail on missingisPrereleaseTagexport.pnpm exec oxfmt --check src/infra/update-channels.ts src/infra/update-channels.test.tspnpm exec oxlint src/infra/update-channels.ts src/infra/update-channels.test.tsEvidence after fix:
Drift proof (patch reverted):
Observed result after fix:
isStableTag("v2026.5.24-alpha.1")now returnsfalse. Tags withalpha,rc,canary,dev,nightly, orpreviewsuffixes are correctly excluded from stable channel resolution. Pure version tags likev2026.5.22still returntrue. The git updater will no longer check out prerelease tags on the stable channel.What was not tested: A live
openclaw updateon a real git clone with alpha tags present was not executed; the fix is verified through focused unit tests covering all prerelease suffix variants and the Sweeper-specified acceptance test suite.Root Cause
isStableTaginsrc/infra/update-channels.ts:40is defined as!isBetaTag(tag), whereisBetaTagonly matches the substring "beta". Alpha, rc, canary, dev, nightly, and preview tags pass through the stable filter. The git updater (src/infra/update-runner.ts:293) sorts allv*tags descending and returns the firstisStableTagmatch, so an alpha tag with a higher version number is selected over the true latest stable release.Regression Test Plan
src/infra/update-channels.test.tswith alpha, rc, canary, preview, andv2026.5.24-alpha.1(the exact tag from Git updater on stable channel checked out alpha tag instead of npm latest #86218) cases, each assertingstable: false.excludes prerelease tags from stabletest covering all 7 prerelease suffixes (alpha,beta,rc,canary,dev,nightly,preview) plus 3 stable tags as negative controls.User-visible / Behavior Changes
openclaw updateon git installs configured for thestablechannel will no longer check out alpha/rc/canary/preview tags. Only pure version tags (e.g.v2026.5.22) are considered stable.Scope boundary
isStableTagsemantics insrc/infra/update-channels.tsare changed;isBetaTagretains its original meaning for the beta channel.update-runner.ts,update-cli.ts, or any channel other than stable git tag resolution.Prior art
No prior PR found targeting #86218 at the time of this submission. The
isStableTag = !isBetaTagdefinition dates back to the initial updater channel implementation.