Skip to main content

One-tag release train

Status: Accepted. Decisions recorded 2026-10-29 (see Decisions). Phases 1 and 2 are done; nothing else below is implemented unless marked exists today. Priority: P1. Phases 3 onward target v0.26.0. Tracks: #5172 (folds in #5170; #3922 closed as its duplicate). Eval baseline: #5197.

Why

A GAIA release candidate now ships in about 30 minutes with no approval (v0.25.1-rc1 took 32 minutes, rc2 took 29). A final still takes most of a day and needs several approvals, because it runs three workflows that wait on each other in a fixed order.
  • v0.25.0 needed 19 RCs over 11 days. The final then failed its first run in 40 seconds: the flagship agent 0.3.0 had never been published, and the committed lock still held PENDING hashes.
  • Recovering the v0.25.0 final took 17 hours. The agent release failed three times, had one run cancelled, and passed on its fifth attempt (09:04 to 15:52). The core tag was moved and re-run (15:58 to 19:51), and the hub components finished at 01:30 the next day.
  • v0.25.1 hit the same issues again. The flagship has its own version (0.3.1) and tag, and check_flagship_release.py fails the final if anything the agent binary is built from changes after that tag. That freezes main.
    • rc1 and rc2 differ in 9 of those files, so the agent tag can’t go on rc1’s commit.
    • The core release PR and the agent bump PR had to merge in a set order.
    • The lock-PR branch collided with the release branch (#5473).
    • rc1 shipped without the Intel Mac agent (pymupdf 2.0, fixed in #5481).
  • What v0.25.2 cost. The final needed an agent bump PR (#6023), an agent-pkg-gaia-v0.3.2 tag plus an agent-publish approval, a bot pin-lock PR (#6032), the publish approval, and a third approval for terminal-hub. main was frozen across days.
  • Versions were hand-synced in about 11 places. Phase 1 now checks them; the chat agent’s 0.1.0/0.2.0 drift is held rather than fixed, since chat is being removed.
The train removes the order dependencies. It doesn’t add more checks on top of them.

1. Target pipeline

One vX.Y.Z-rcN or vX.Y.Z tag runs one workflow (publish.yml, which keeps its name because the PyPI and npm trusted publishers are bound to it). Artifacts (one version, one build): Publish order (the same order as #5172):
  1. GitHub draft release with every asset and SHA256SUMS.
  2. Hub R2 objects under agents/<id>/<version>/, not yet referenced by a channel.
  3. npm tarballs under a staging dist-tag.
  4. PyPI: core wheel. This is the point of no return.
  5. npm dist-tags: flip to next (RC) or latest (final).
  6. Hub channel: next (RC) or stable (final). Needs the Worker change in Phase 4.
  7. Publish the GitHub release (pre-release for an RC, latest for a final).
  8. Website redeploy (Railway, deploy_website.yml) and the post-release bot PRs.

Tag and branch model

  • release/vX.Y is cut from main when the X.Y.0 release PR merges. RCs and finals are tagged on it. main moves on to X.(Y+1).0 straight away, through the bot PR, and never freezes for a release.
    • The force-pushed release pointer branch is deleted and update-release-branch.yml retired first. Git can’t hold release and release/v0.26 together (see util/open_flagship_lock_pr.py:46). Nothing in the repo reads it; people use GitHub’s “latest release”.
  • Fixes land on main first. A backport release/vX.Y label makes a bot open a cherry-pick PR against the branch. Merges to main never touch a candidate.
  • rcN is any tag vX.Y.Z-rcN on the branch. A newer RC supersedes an older one before publishing (exists today: approve-publish runs release_tag.py superseded).
  • Patch X.Y.1 comes from the same branch: the bot opens a version bump PR to the branch, then RC, then promote.
  • Hotfix is the same as a patch. The RC is mandatory but can be promoted at once, with a recorded soak waiver. There are no four-part tags: release_tag.py:42 accepts them today, but the train drops them.

The flagship agent joins the core version

Only the flagship agent exists and ships, and its version equals core’s. The 0.3 to 0.26 jump is deliberate and safe. SemVer only asks that versions increase.
  • An integrator on ^0.3.0 stays on 0.3.x, because a caret on 0.x is minor-locked, until they switch to @amd-gaia/agent. That’s the deprecation path we want.
  • The wire contract stays independent (API_VERSION in gaia_agent/server.py, the lock schemaVersion, the daemon host API), so compatibility is still expressed where it’s real.
  • The agent CHANGELOG says this in one line.
Every other agent harness GAIA built is removed in Phase 8: the chat agent, the email agent, and the teaching templates (hello-world, word-count, connectors-demo). None of them joins the train. ChatAgent is the flagship’s base class, so its code folds into the flagship package or core. The SDK base classes in src/gaia/agents/base/ stay; they aren’t harnesses.

2. One version source

src/gaia/version.py (__version__, LEMONADE_VERSION) is the only version anyone edits. util/release_versions.py (exists today, Phase 1) replaces installer/version/bump-ui-version.mjs, hub/agents/{gaia,chat}/python/packaging/stamp_version.py and the stamping half of release_tag.py.
  • Modes:
    • write stamps the tree.
    • --check fails on any drift and runs in lint.yml and a unit test.
    • --stamp <tag> writes RC versions (0.26.0rc1 for PyPI, 0.26.0-rc.1 for npm, 0.26.0~rc1 for deb/rpm) into every generated field at build time. Today only version.py and webui are stamped (release_tag.py:159).
  • Not generated: the TUI version (already set from the tag via -ldflags), the agents Phase 8 removes (chat’s drift stays held until then), skills, and any third-party agent.
  • check_component_core_api.py stays. It already reads released daemon API versions from PyPI rather than a table.
  • The next-version bot runs after a final publishes. It opens one PR to main: navbar, a release-notes stub, and version.py bumped if main isn’t already ahead. For a patch, it opens a second PR to the branch.
    • docs.yml and test_docs_json_release.py currently resolve docs/releases/v<__version__>.mdx on main. They must accept a main that’s ahead of the latest release.

3. Promotion

A final can’t relabel RC bytes:
  • PyPI and npm versions are immutable.
  • The wheel METADATA, package.json, the Electron app, latest*.yml (which carries a sha512), the Go -X version and the PyInstaller sidecar all embed the version.
So each RC run also builds a final-stamped twin from the same checkout, verifies it, and stages it. Promotion publishes the staged twin with one approval, without rebuilding or re-running tests (decision 2).
  • Staging: the twins go on a draft GitHub release vX.Y.Z, with release-manifest.json listing the RC tag, SHA, toolchain and lockfile hashes, and each artifact’s SHA-256. Drafts don’t expire (workflow artifacts do). Each new RC replaces the draft’s assets.
  • Twin-diff:
    • Archives (wheel, sdist, npm tarballs, Electron app.asar): unpacked trees must match once version strings are normalised.
    • Native binaries: byte-level proof isn’t possible. PyInstaller, NSIS, DMG and signing timestamps aren’t reproducible. Go with -trimpath and the commit date is reproducible, so the RC run rebuilds one TUI target to prove determinism.
    • Native twins are proven by: same SHA, same lockfiles, version reports X.Y.Z, and the same clean-runner smoke the RC artifact passed.
  • Final tag vX.Y.Z:
    • validate requires the SHA to equal the RC named in the draft’s manifest. A final on any other commit fails and tells you to cut an RC.
    • One approval (publish environment), then the publish order above from the staged twins, after re-checking every hash against the manifest.
    • Release notes come from docs/releases/vX.Y.Z.mdx at the branch tip, so docs-only commits after the RC are fine. Nothing else is read from the tip.
  • Channels:
  • Electron auto-update: the forward feed isn’t live yet (electron-builder.yml:84-104, #1719). The updater shows NO_CHANNEL unless a feed URL is configured. RC pre-releases attach latest*.yml today, so RC builds must switch to the next channel before the feed ships; otherwise an RC would be offered as the stable update. At promote, the twin’s latest*.yml goes on the GitHub release, and the hub pointer is updated once #1719 lands.
  • Can’t be promoted:
    • an RC tagged [skip eval];
    • an RC whose twin build or twin-diff failed;
    • an RC older than the newest RC of its X.Y.Z;
    • any change to code. Code changes need a new RC.
  • Fallback: an explicit rebuild_final: true dispatch input exists for when staging itself is broken. It runs the full build on the final tag, and the run summary names it as a rebuild. It’s an opt-in, never automatic.

4. Eval gate

Evals inform the promotion decision and record it. They never block an RC.
  • Every RC tag runs eval_flagship.yml (exists today, eval_flagship.yml:168-171). It covers all eval/ci_lanes.json lanes and flagship-tasks, compared with tests/fixtures/eval_baselines/gaia-flagship/ under the same EVAL_MODEL, in report mode. A regression files Flagship eval did not pass on <tag>.
  • The agent release’s separate eval subset goes away with release_agent_gaia.yml. #5197’s wrong baseline directory is fixed: the subset now compares against gaia-flagship while it still exists.
  • Promote requires an eval run on the RC’s SHA that has concluded: success, or failure with the eval issue labelled release-waived by a maintainer. Cancelled or still running blocks promotion (decision 4).
    • The promote summary lists PASS→FAIL and FAIL→PASS against the baseline separately, per CLAUDE.md.
    • A lone flip gets a re-run before anyone calls it a regression.
    • There’s no score threshold: the 80% target stays a goal, not a gate.
  • A final tag doesn’t re-run the eval when its SHA already has a concluded RC run. Today v*.*.* matches the final and spends another ~3 hours of Strix Halo time on identical code (v0.25.0 final: 3 h 20 min).

5. Phases

Each phase is one mergeable PR that leaves releases working (Phase 8 is several). S ≤ 1 day, M 2–4 days, L 1–2 weeks.

6. Risks and rollback

Dry-run matrix before first real use (Phase 2’s workflow, plus a train-test-* tag pattern that only ever runs dry_run: true):
  • Full build-all + verify on main and on a release/v0.26 test branch.
  • Twin-diff passes; a hand-edited twin fails it.
  • Generated lock hashes match the uploaded artifacts.
  • A superseded RC stops before publish; two RC tags pushed a minute apart.
  • A final tag on a non-RC SHA is refused; on the RC’s SHA it takes the promote path.
  • Cancel during each publish step, then re-run: completes, no tag moves (against TestPyPI and a hub staging/ prefix).
  • A missing required platform fails verify; a missing best-effort darwin-x64 is named in the release body.

7. Decisions

Recorded 2026-10-29.
  1. Branches. RCs and finals are tagged on release/vX.Y. The force-pushed release pointer branch is deleted and update-release-branch.yml retired. Fixes land on main first; a bot backports them via a label. main never freezes for a release.
  2. Finals. A final promotes the RC’s staged, final-stamped twin with one approval and no rebuild. rebuild_final stays as the opt-in escape hatch.
  3. Agents. Only the flagship agent exists and ships, at core’s version. Every other GAIA-built agent harness is removed (Phase 8): chat, email, the teaching templates, and any other registered agent. Removal is decided, not conditional; the in-progress parity audit only sets which capabilities the flagship must gain before each removal lands. ChatAgent folds into the flagship package or core; the SDK base classes in src/gaia/agents/base/ stay. Agent wheels on PyPI (#2240) stay a separate issue.
  4. Evals. Promotion needs a finished eval run on the RC’s SHA: success, or failure with a maintainer’s release-waived label. No score threshold. A final doesn’t re-run the eval.
  5. @amd-gaia/agent bin name: gaia-agent, decided by default. gaia would shadow the core CLI on PATH; the deprecated @amd-gaia/gaia shim keeps gaia for existing scripts.

8. What’s riskier than #5172 assumes

  • “No rebuild” can’t mean byte-identical. Every channel embeds the version, so the final is a twin built alongside the RC. Native twins can only be proven by provenance and smoke tests, not by diff. Accepted in decision 2.
  • A final costs 3–4 approvals today, not 1. v0.25.2 needed three. Open until Phases 5 and 6.
    • publish and agent-publish each require 2 reviewers.
    • agent-publish gates release_components.yml’s terminal-hub, agent-ui and publish-windows-setup jobs (:366, :610, :520) and the agent release (release_agent_gaia.yml:713).
    • GitHub prompts once per batch of jobs that pend together.
  • Final GitHub releases lack the TUI installers and the combined Windows setup. Those go to R2 only. Moving website links to GitHub assets 404s for finals until Phase 5 attaches them.
  • The Worker deploys inside the final (release_components.yml:224). Resolved for v0.25.1, which shipped 2026-10-25. Still true in general: a Phase 4 merge goes live with the next final.
  • The branch model breaks every “is on main” check: publish.yml:106-112, release_agent_gaia.yml:724-736, the docs checks that read __version__, and check_release_ci.py, which needs CI runs on branch commits.
  • The v0.25.1 final froze main. Resolved: v0.25.1 shipped 2026-10-25 and v0.25.2 on 2026-10-29. The same freeze recurs every final until Phase 6.