Repository navigation
fix(updater): base dev builds on published tags, not main's package.json - #12376
Conversation
main's version only moves on `release:` commits, and stable patches are cut from release branches that never merge back. On 2026-08-03 main read 1.4.165-rc.0 for twenty hours while 1.4.165, 1.4.166 and 1.4.167 all shipped, so every hourly built in that window was stamped 1.4.165-hourly.* while carrying code newer than 1.4.167 — and sorted below the stable its user was already running. Resolve the base from the main repo's published tags instead, taking the patch above the highest shipped stable. package.json stays a floor for the case where main leads the tags. Co-authored-by: Orca <[email protected]>
📝 WalkthroughWalkthroughDevelopment-channel version resolution now parses published release tags, selects a numeric base version, and handles stable or prerelease versions. Adhoc and hourly identity scripts use this resolver and read published versions from the environment. macOS workflows retrieve release tags with repository tokens and pass them to the version scripts. Tests cover resolution, validation, filtering, rollovers, and environment parsing. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 26d63304-112e-4a26-9a92-493e4cbf58f5
📒 Files selected for processing (6)
.github/workflows/adhoc-mac-build.yml.github/workflows/hourly-mac-build.ymlconfig/scripts/adhoc-build-version.mjsconfig/scripts/dev-channel-base-version.mjsconfig/scripts/dev-channel-base-version.test.mjsconfig/scripts/hourly-build-version.mjs
| published="$(GH_TOKEN="$MAIN_REPO_TOKEN" gh release list \ | ||
| --repo "$GITHUB_REPOSITORY" --limit 100 --exclude-drafts \ | ||
| --json tagName --jq '.[].tagName' || true)" | ||
| ORCA_PUBLISHED_VERSIONS="$published" ORCA_ADHOC_LABEL="${LABEL:-$REF}" \ | ||
| node config/scripts/adhoc-build-version.mjs \ |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Fetch the complete published-release set before resolving the base version.
--limit 100 truncates the candidates. If more than 100 newer releases exist on lower version lines, the actual highest semantic version can be excluded. The resolver then selects a lower base and can generate a build that sorts below an already shipped release.
.github/workflows/adhoc-mac-build.yml#L164-L168: paginate the complete non-draft release history before settingORCA_PUBLISHED_VERSIONS..github/workflows/hourly-mac-build.yml#L206-L211: paginate the complete non-draft release history before settingORCA_PUBLISHED_VERSIONS.
📍 Affects 2 files
.github/workflows/adhoc-mac-build.yml#L164-L168(this comment).github/workflows/hourly-mac-build.yml#L206-L211
…son (stablyai#12376) main's version only moves on `release:` commits, and stable patches are cut from release branches that never merge back. On 2026-08-03 main read 1.4.165-rc.0 for twenty hours while 1.4.165, 1.4.166 and 1.4.167 all shipped, so every hourly built in that window was stamped 1.4.165-hourly.* while carrying code newer than 1.4.167 — and sorted below the stable its user was already running. Resolve the base from the main repo's published tags instead, taking the patch above the highest shipped stable. package.json stays a floor for the case where main leads the tags. Co-authored-by: Orca <[email protected]>
The bug
The version in front of every hourly (
1.4.164,1.4.165…) is often wrong — it does not track what has actually shipped fromstablyai/orca.package.jsononmainonly moves onrelease:commits, and stable patches are cut from release branches that never merge back. So main's version is not "the version being built", it is "the last RC someone cut from main", and it goes stale for as long as that takes.Concretely, from
git log -- package.jsonagainst the release list:package.json1.4.165-rc.01.4.165,1.4.166,1.4.167Every hourly built in those twenty hours was stamped
1.4.165-hourly.*, while containing code newer than1.4.167.Why it is not only cosmetic
1.4.165-hourly.xsorts below1.4.167. A developer on stable1.4.167who switches to the hourly channel is being offered something the updater reads as a downgrade, and the picker shows a version number three patches behind the code in the bundle.The fix
New
config/scripts/dev-channel-base-version.mjsresolves the base from the main repo's published tags:X.Y.Zamong non-draft releases1.4.168-rc.1), that is still the version being built toward — hold at1.4.168rather than inventing1.4.169package.jsonremains a floor, for the case where main legitimately leads the tagsBoth workflows now pass the tag list in via
ORCA_PUBLISHED_VERSIONS. The fetch usesgithub.tokenrather than the step's existingGH_TOKEN, which is the App token and is scoped to the dev-channel repos only. On fetch failure the list is empty and the script falls back topackage.json— stale, but never enough to fail a build.Applies to adhoc as well; it read the same stale source.
Verification
Against the live tag list (100 tags fetched):
The regression case is fixed and the already-correct case is unchanged.
oxlintandoxfmtclean.The adhoc workflow's out-of-sync guard now covers the new module too, since a branch cut between these two merges would otherwise fail with a bare
ERR_MODULE_NOT_FOUND.Made with Orca 🐋