Skip to content

ci: restructure release branches into main, beta, and alpha - #655

Merged
ankurdotb merged 9 commits into
mainfrom
ci/release-branch-restructure
Aug 27, 2026
Merged

ankurdotb merged 9 commits into
mainfrom
ci/release-branch-restructure

Conversation

@eitjuh

@eitjuh eitjuh commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Restructures the release branch model from two branches (main/prerelease) to three: main (stable) → beta (default dev branch, npm beta) → alpha (protocol-breaking-change testing only, synced from beta, npm alpha).

  • .releaserc.cjs: branches now lists main, beta (channel/prerelease beta), alpha (channel/prerelease alpha).
  • All 12 CI workflow files: branch triggers and validate-branch gates updated from [main, prerelease] to [main, beta, alpha].
  • scripts/docs/retarget.mjs / check-target.mjs: the published GitBook doc space is now beta (not alpha) — alpha has no separate docs space.
  • scripts/docs/changelog.mjs: the "unreleased tip" changelog-page mechanism (page, functions, version-suffix matching) renamed from Alpha to Beta throughout, including its 3 test files.
  • CONTRIBUTING.md / docs/agents/gotchas.md: default PR base is now beta; alpha is documented as a protected, non-feature-PR branch.

No changes to packages/sdk or packages/react-sdk source — this is release process / CI / docs infrastructure only.

Scope

  • @zama-fhe/sdk
  • @zama-fhe/react-sdk
  • @zama-fhe/test-components
  • @zama-fhe/test-nextjs
  • @zama-fhe/test-vite
  • Examples (examples/)
  • CI/workflows
  • Docs

Validation

  • pnpm test:run — full repo suite, 168 files / 1864 tests passing
  • pnpm exec vitest run scripts/docs/__tests__/ — 4 files / 87 tests passing (includes the rewritten changelog.test.mjs, retarget.test.mjs, check-target.test.mjs)
  • pnpm docs:check-target beta — doc URLs correctly target the beta branch/space
  • pnpm docs:check-links — 111 pages, all internal links/anchors resolve
  • pnpm llm:build — LLM corpus (llms.txt, llms-full.txt, corpus-manifest.json) rebuilds cleanly
  • node -e "require('./.releaserc.cjs')" — config loads without error, branches in the correct most-stable-first order

Related

Demo (if possible)

N/A — no UI/UX changes.

@cla-bot cla-bot Bot added the cla-signed label Aug 26, 2026
@eitjuh
eitjuh changed the base branch from prerelease to main August 27, 2026 08:17
@github-actions

Copy link
Copy Markdown

Public API Changes

✅ No public API changes detected.

@github-actions

github-actions Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 93.01% (🎯 80%) 3289 / 3536
🔵 Statements 92.98% 3367 / 3621
🔵 Functions 91.82% (🎯 80%) 1056 / 1150
🔵 Branches 87.23% (🎯 80%) 1462 / 1676
File CoverageNo changed files found.
Generated in workflow #554 for commit cea3760 by the Vitest Coverage Report Action

ankurdotb and others added 6 commits August 27, 2026 11:15
The branch restructure renames `prerelease` → `beta`, so Dependabot's four
update groups (SDK core, test apps, example apps, github-actions) must target
`beta` — otherwise, once `prerelease` no longer resolves, they silently open
no PRs. Dependency bumps are protocol-compatible fixes, which belong on `beta`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Follow-up to the branch rename found by review:
- README.md: dev-release badges alpha → beta dist-tag (beta is the new dev channel)
- AGENTS.md/CLAUDE.md: "Alpha unreleased tip" → "Beta"
- docs/agents/changelog.md: note that the alpha branch is off the changelog
- docs.yml: fix stale "stable|alpha" comment → "stable|beta"; tighten two comment blocks
- retarget.mjs / changelog.mjs: condense the verbose header comments (no behavior change)
Corpus regenerated for the README change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…log selection

The rename isAlphaVersion→isBetaVersion kept the `/-beta\.\d+$/` shape, but the
model now has two prerelease channels (alpha + beta). `!isBeta` was used as the
"is shipped mainline" test in newestMainline, mainlineReleasesForActiveMajor,
betaReleasesSinceLastMainline, and the promote date lookup — so a `-alpha.N`
entry (isBeta=false) read as mainline. With `-alpha.N` above the newest mainline
(the normal alpha-cycle shape), `docs:retarget main` promoted a bogus
prerelease-named version section instead of the stable release.

Add an `isPrerelease` field (any suffix — alpha or beta) and use it for the four
"not mainline" tests; keep `isBeta` only where beta-specifically is meant
(the Beta raw-material collector now pushes beta builds and skips alpha, but
still breaks on the mainline boundary). Add a mixed-channel regression test.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… fix stale runbook ref

S3 (rename hazard): `beta` is a rename of `prerelease`, so that branch still carries
`.../sdk/prerelease/...` raw URLs and `.../sdk/alpha/...` space URLs. The trimmed
retarget/check-target alternations couldn't handle them — `docs:retarget beta` would
corrupt `alpha/`→`beta/alpha/` and leave dead `prerelease` raw links, and check-target
silently passed the prerelease raw form. Re-add the legacy `prerelease` (raw) and `alpha`
(space) forms to retargetUrls, the corpus.config rewrite, and findUrlProblems/SPACE_URL_RE
so a plain `pnpm docs:retarget beta` migrates the renamed branch cleanly. Additive and
idempotent for main↔beta (round-trip tests unchanged); safe to drop once no such URLs
remain. Adds legacy-migration regression tests.

Also fix a stale runbook reference: CONTRIBUTING.md pointed at a `Release (Manual)` /
`release-manual.yml` workflow that no longer exists (folded into release.yml); repoint the
manual-publish path at release.yml's workflow_dispatch and drop the dead trusted-publisher ref.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
oxlint's eqeqeq rule (error, no null exception) rejected the `!= null` loose
check introduced with the isPrerelease field. Normalize undefined→null via `??`
then compare with `!==`, preserving the exact semantics (unparseable → not a
prerelease) while satisfying the linter. Fixes the failing `CI / lint` job.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…s, beta space)

alpha's LLM corpus is meant to be consumed by testers of protocol-breaking builds,
so its raw.githubusercontent / corpus URLs must self-target the `alpha` branch —
otherwise an alpha tester's agent fetches beta/main content and misses alpha's docs.
Previously `docs:retarget`/`check-target` rejected/skipped alpha entirely.

Decouple the two URL dimensions:
- raw.githubusercontent + corpus.config rawGithubBaseUrl → self-target the branch
  (main|beta|alpha), so `docs:retarget alpha` produces `.../sdk/alpha/...`.
- docs.zama.org GitBook space → BRANCH_TO_SPACE (main→stable, beta/alpha→beta): alpha
  has no space of its own, so its human doc links use the beta preview site.

check-target's raw-branch check is generalized to flag any raw branch != expected
(covers main/beta/alpha + legacy prerelease) and now asserts on alpha instead of
skipping. Promotion stays main-only.

Primary paths are beta↔main and beta↔alpha (alpha syncs from beta); main↔alpha works
but is unlikely. Verified (advisor review) that every transition round-trips
byte-identically and is idempotent, and that beta↔alpha flips touch only the raw
branch (shared beta space, no `beta/beta/` double-insert). +7 unit/e2e tests,
including the beta→alpha→beta round-trip and a clean check-target-alpha fixture.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ankurdotb
ankurdotb force-pushed the ci/release-branch-restructure branch from 2152d04 to cea3760 Compare August 27, 2026 11:53
@ankurdotb
ankurdotb merged commit 3b230b5 into main Aug 27, 2026
40 of 41 checks passed
@ankurdotb
ankurdotb deleted the ci/release-branch-restructure branch August 27, 2026 12:36
ankurdotb added a commit that referenced this pull request Aug 27, 2026
Backmerge the branch-restructure (#655) from main into beta: releaserc beta/alpha
channels, workflow triggers, Dependabot→beta, and the alpha-aware docs tooling.
Resolved the corpus-artifact conflicts (llms.txt, llms-full.txt, corpus-manifest.json)
by taking main's; the following `pnpm docs:retarget beta` flips all doc/corpus URLs
from the legacy prerelease/alpha forms to beta and regenerates the corpus.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@zama-bot

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 3.5.2-beta.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@zama-bot

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 3.6.0-alpha.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@zama-bot

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 3.6.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants