feat(selfhost): automate daily ORB beta releases from a version manifest - #4160
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4160 +/- ##
=======================================
Coverage 93.73% 93.73%
=======================================
Files 387 387
Lines 36304 36304
Branches 13298 13298
=======================================
Hits 34031 34031
Misses 1617 1617
Partials 656 656 🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-08 09:17:46 UTC
⏸️ Suggested Action - Manual Review
Concerns raised — review before merging
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Adds orb-manifest.json as the git-tracked source of truth for the self-host container image's target release version -- mirrors how packages/gittensory-mcp/package.json's version field works for MCP, since ORB has no npm manifest of its own. scripts/orb-release-core.mjs decides whether a new beta snapshot is due by scanning commits since the last orb-v tag for image-relevant paths (src/**, migrations/**, Dockerfile, the selfhost build/deploy scripts) and computing the next orb-vX.Y.Z-beta.N tag; scripts/check-orb-release-due.mjs is the read-only CLI wrapper. Deliberately independent of scripts/mcp-release-core.mjs (no shared imports/state) so the two release paths can never regress each other. .github/workflows/orb-beta-release.yml runs this daily (or on demand via workflow_dispatch), and when due, tags + pushes the new beta and dispatches release-selfhost.yml to build and publish it. That dispatch needed two small, backward-compatible changes to release-selfhost.yml: a create_github_release opt-in input (a GITHUB_TOKEN-authored tag push doesn't fire release-selfhost.yml's own push trigger, so this workflow dispatches it explicitly instead, the same pattern publish-engine.yml / npm-publish.yml already use for the identical reason), and routing an actual beta version to a new no-required-reviewers release-beta environment so the daily cut runs fully unattended -- a stable or rc version still routes to the existing human-gated release environment. Promoting a beta to a stable release stays a manual, deliberate git tag.
… tag buildOrbReleaseReport's beta-number reset only checked that the latest orb-v tag's major.minor.patch matched targetVersion, not that the tag was itself a beta -- once a target version's stable tag is cut, parseOrbBetaVersion returns betaNumber: null for it (a stable version has no prerelease suffix at all), so the next due beta silently fell through to beta.1, a tag that already exists from before the stable promotion. anyTagIsBetaOfTargetVersion now requires betaNumber !== null, and due itself goes false once a stable tag already matches targetVersion (nothing to cut until a human moves the manifest's target forward). orb-beta-release.yml's dispatch step now also gates on the tag step having actually just created a tag, not only on due, as a backstop against ever rebuilding an already-published image tag.
d7669fb to
bffd402
Compare
…g Release PR (#5063) The ORB (self-host container image) beta channel has been fully automated since #4160, but promoting to a STABLE orb-vX.Y.Z release stayed a fully manual git tag dance with no scheduled cadence -- the one release surface in this repo not already brought up to release-please parity (MCP/engine here, plus metagraphed's own release-please setup). Adds a release-please-equivalent for ORB, hand-rolled because ORB's image-relevant scoping is cross-cutting (src/** shared with UI/MCP-only subtrees it must exclude) rather than a clean directory component the way packages/gittensory-mcp and packages/gittensory-engine are: - buildOrbStableReleaseReport (orb-release-core.mjs) infers the next stable version from conventional commits since the last stable orb-v tag, reusing the same image-relevant commit filtering the beta channel already uses. - orb-stable-release-pr.yml runs on the same schedule as mcp-release-please.yml (plus workflow_dispatch) and keeps a standing release-orb-stable branch + PR in sync with that proposal -- nothing ships until a maintainer reviews and merges it. - orb-stable-release-tag.yml fires on that PR's merge, tags orb-vX.Y.Z, and dispatches release-selfhost.yml exactly like the beta workflow does, landing on the human-gated `release` environment (not `release-beta`) for a second, independent approval. The daily, fully-unattended beta channel is unchanged.
Summary
orb-manifest.jsonas the git-tracked source of truth for the self-host container image's target release version (mirrorspackages/gittensory-mcp/package.json's role for MCP; ORB has no npm manifest of its own).scripts/orb-release-core.mjs(pure logic, deliberately independent ofscripts/mcp-release-core.mjs) +scripts/check-orb-release-due.mjs(read-only CLI): decides whether a new beta snapshot is due by scanning commits since the lastorb-vtag for image-relevant paths, and computes the nextorb-vX.Y.Z-beta.Ntag..github/workflows/orb-beta-release.yml: runs the check daily (or on demand), and when due, tags + pushes the beta and dispatchesrelease-selfhost.ymlto build and publish it.release-selfhost.ymlto support that dispatch: acreate_github_releaseopt-in input (aGITHUB_TOKEN-authored tag push doesn't fire this workflow's ownpushtrigger, so the new workflow dispatches it explicitly instead -- the same patternpublish-engine.yml/npm-publish.ymlalready use for the identical reason), and routing an actual beta version to a new no-required-reviewersrelease-betaGitHub Environment so the daily cut runs fully unattended. A stable or-rc.Nversion still routes to the existing human-gatedreleaseenvironment -- promoting a beta to a stable release stays a manual, deliberategit tag.Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.#1953/#1819, both are broader review-quality/hardening roadmaps, not release engineering); maintainer PR, so no issue was opened solely to satisfy this box.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally -- new logic lives underscripts/(notsrc/**), so it isn't Codecov-measured, buttest/unit/orb-release.test.tscovers every branch (commit-relevance filtering, semver/tag helpers including malformed-input edge cases, and the fullbuildOrbReleaseReportdecision table) anyway.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateAll of the above ran via a single full
npm run test:ci(green) plusnpm audit --audit-level=moderate(0 vulnerabilities) locally before pushing. Also verified withactionlintdirectly and a manual YAML parse on both touched workflow files, and manually exercised the new CLI (node scripts/check-orb-release-due.mjs --json) and both embedded Node heredoc steps against this repo's real current tag/commit state.Safety
UI Evidencesection below. (N/A -- no visible UI changes; table left blank intentionally.)UI Evidence
N/A -- no UI/frontend/docs changes in this PR.
Notes
release-beta(no required reviewers) was created under repo Settings so the daily beta dispatch can run unattended, distinct from the existingreleaseenvironment which still gates every stable/rc release behind a human reviewer.packages/gittensory-mcp/**orpackages/gittensory-engine/**, or their release scripts/workflows -- that automation is out of scope here.