Skip to content

ci(release): release candidates ship and install their own flagship agent - #4939

Merged
kovtcharov-amd merged 1 commit into
mainfrom
ci/rc-flagship
Oct 11, 2026
Merged

kovtcharov-amd merged 1 commit into
mainfrom
ci/rc-flagship

Conversation

@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

Every release candidate so far has run the Agent Hub's flagship agent (gaia 0.2.0, built 2026-09-16, 445 commits before v0.25.0-rc2), because the hub has no pre-release channel. That build predates tool approvals and pulls a 0.5 GB embedding model on first answer, so RC testing never exercised the agent we are about to ship. Now an RC tag freezes the flagship from its own commit, attaches it to the GitHub pre-release, and the RC's gaia init, gaia hub install gaia and Windows setup install that build. The hub is never a substitute: a pre-release without its agent makes the install fail with the reason, and an RC whose flagship freeze fails is never offered for approval.

🔍 Technical details
  • The freeze matrix moved verbatim from release_agent_gaia.yml into build_flagship_sidecar.yml (workflow_call + workflow_dispatch); the flagship release now calls it, so both build the binary the same way. Dispatching it alone is a no-publish check that main still freezes.
  • publish.yml: rc-flagship is required by approve-publish and github-release on an RC (finals unchanged). rc-windows-setup passes sidecar: artifact, a new windows_setup.yml mode that stages this run's gaia-agent-win32-x64 after re-checking its freeze hash. util/flagship_rc_assets.py verifies every build and writes gaia-agent-release.json plus gaia-agent.yaml next to the binaries.
  • Runtime: gaia.hub.prerelease maps an RC core (0.25.0rc3) to its tag and reshapes the release file into a one-version hub manifest (0.3.0+v0.25.0-rc3). installer.install() uses it for gaia whenever no explicit version is given, so the CLI, daemon, TUI and Agent UI paths all go through it. An explicit --version still means the hub.
  • gaia init on an RC compares the installed flagship's sha256 with the candidate's and reinstalls on mismatch, so a tester who already has the hub's 0.2.0 gets replaced.
  • Builds on ci(release): attach the combined Windows setup to release-candidate pre-releases #4934 (RC Windows setup): only its sidecar: input changes.

Test plan

  • pytest tests/unit/test_hub_prerelease.py tests/unit/test_flagship_rc_assets.py (end to end: packager output → RC resolver → the real installer, plus a refused hub fallback, malformed release files, init replace/keep, workflow wiring)
  • pytest hub/agents/gaia/python/tests/test_freeze_required_modules.py tests/unit/test_hub_install_sidecar_contract.py tests/unit/installer/ tests/unit/test_init_command.py tests/unit/test_publish_workflow_contract.py
  • actionlint on the four workflows; util/check_workflow_ancestor_skip.py clean for publish.yml; python util/lint.py --black --isort
  • Dispatch Build flagship sidecar on this branch and confirm all three required platforms freeze and pass the smoke test (first freeze of current main since 0.2.0)
  • On the next RC: gh release view v0.25.0-rcN lists gaia-agent-* and gaia-agent-release.json; on a clean machine pip install amd-gaia==0.25.0rcN && gaia init installs 0.2.0+v0.25.0-rcN (or the bumped version), and the Agent UI can approve a file write

…gent

Release candidates ran the Agent Hub's flagship (gaia 0.2.0), built on
2026-09-16 from code 445 commits older than v0.25.0-rc2, because the hub has
no pre-release channel. Testers got an agent without tool approvals that
downloads a 0.5 GB embedding model on first answer. Now an RC tag freezes
the flagship from its own commit, attaches it to the GitHub pre-release,
and the RC core installs it from there for `gaia init`, `gaia hub install
gaia` and the Windows setup. The hub is never used as a substitute: a
pre-release without its agent fails the install with the reason, and an RC
whose freeze fails is never approved for publish.

- The freeze matrix moves to build_flagship_sidecar.yml so the RC and the
  flagship release build the binary the same way; it can also be dispatched
  on its own to check main still freezes, with no publish.
- `gaia init` on an RC replaces an installed flagship whose bytes are not
  the candidate's, so testers upgrading from an earlier candidate or from
  the hub's build get the right one.
@github-actions github-actions Bot added documentation Documentation changes devops DevOps/infrastructure changes tests Test changes labels Oct 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Skill audit

Skill Verdict Claimed tier Cleared tiers Findings Rules
.claude/skills/gaia-release ✅ ALLOW experimental experimental, community none —

✅ All audited skills cleared the tier they claim.

Per-finding detail is withheld here on purpose. Read it in the Security > Code scanning tab, or download the skill-audit-reports artifact from this run. Offending source text is withheld from CI everywhere — reproduce it locally with gaia skill audit <dir> --show-snippets.

@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Oct 11, 2026
Merged via the queue into main with commit c6c10be Oct 11, 2026
@kovtcharov-amd
kovtcharov-amd deleted the ci/rc-flagship branch October 11, 2026 01:26
grtninja pushed a commit to grtninja/gaia that referenced this pull request Oct 11, 2026
The Agent Hub still serves flagship agent 0.2.0, frozen on 2026-09-16,
so `gaia init` and the Windows setup would hand 0.25.0 users an agent
without tool approvals that pulls a 0.5 GB embedding model on first
answer. Hub paths are immutable per version, so the 0.25.0 agent can
only ship under a new number: this bumps it to 0.3.0 and cuts the
changelog's Unreleased section as 0.3.0. The lock's sidecar hashes
become placeholders, because they described 0.2.0's bytes; the Windows
setup and npm installer refuse to bundle anything until the 0.3.0
release commits real ones.

**Release order for 0.25.0 (manual, after this and amd#4939 / amd#4940
merge):**

1. Optional dry run: dispatch **Build flagship sidecar** on main to
confirm it still freezes (nothing is published).
2. Publish terminal-hub 0.25.0 first. The flagship release refuses to
run until the terminal-hub version its lock pins is on the hub, and that
normally only happens on the core final tag. Dispatch **Publish Hub
Components (R2)** on main with `dry_run` unchecked. Expect its agent-ui
and Windows-setup legs to fail (no v0.25.0 GitHub release yet, no 0.3.0
flagship yet); they publish nothing.
3. Tag `agent-pkg-gaia-v0.3.0` on the merge commit and approve **Release
Agent (gaia)** (scorecard gate, eval subset, then hub + npm).
4. Open a PR committing the `binaries.lock.json` that run prints under
"regenerated lock".
5. Run `python util/check_flagship_release.py` on that merge commit. Cut
the next RC and the final there. Code the binary is frozen from must not
change in between, or the gate fails and the flagship needs 0.3.1.

## Test plan
- [x] `python hub/agents/gaia/python/packaging/stamp_version.py --check`
- [x] `pytest tests/unit/test_fetch_sidecar.py
tests/unit/test_installer_artifacts.py
tests/unit/test_hub_agent_platforms.py
hub/agents/gaia/python/tests/test_gen_binaries_lock.py`
- [x] `npx vitest run test/lock.test.ts test/fetch.test.ts` in
`hub/agents/gaia/npm` (placeholders accepted, nothing fetchable)
- [ ] After step 3, `curl -A gaia-release/1
https://hub.amd-gaia.ai/agents/gaia/manifest.json` shows
`latest_version: 0.3.0`
grtninja pushed a commit to grtninja/gaia that referenced this pull request Oct 11, 2026
…md#4949)

`main` has failed
`test_an_rc_builds_the_windows_setup_for_its_own_prerelease_only` since
amd#4934 and amd#4939 both merged. amd#4934's test expected the RC Windows setup
to bundle the `pinned` flagship, and amd#4939 deliberately switched it to
`artifact`, the build that RC run freezes. Each PR passed on its own.
The test now expects `artifact`.

## Test plan
- [x] `pytest tests/unit/test_release_tag.py`: 43 passed, where `main`
has 1 failure
- [x] `python util/lint.py --black --isort`
kovtcharov pushed a commit to kovtcharov/gaia that referenced this pull request Oct 12, 2026
…md#4940)

A final core release could ship with a flagship agent built from much
older code, and nothing noticed: `gaia init`, `gaia hub install gaia`
and the Windows setup take the flagship from the Agent Hub and
`binaries.lock.json`, which only the separate `agent-pkg-gaia` release
fills. v0.25.0 was prepared with the hub still serving gaia 0.2.0,
frozen from sources that differ from main in 383 files (no tool
approvals, among others). Now a final `v*` tag fails up front unless the
flagship it pins is published as the hub's latest with the lock's hashes
and was frozen from the same sources as the release commit. Release
candidates are exempt because amd#4939 has them build their own.

<details>
<summary>🔍 Technical details</summary>

- `util/check_flagship_release.py` reads the flagship version from
`gaia-agent.yaml` at the release ref and checks: the lock pins that
sidecar version with real hashes; `agent-pkg-gaia-v<ver>` exists and
nothing differs between it and the release ref over the frozen inputs
(`src/gaia` minus `apps/`, the gaia and chat agent packages minus tests,
eval data and `*.md`, and `setup.py`); the hub manifest lists that
version as `latest_version` with matching sha256 for the three required
platforms.
- Runs in `publish.yml`'s `validate` (finals only) and in
`release_components.yml`'s `version` job on a tag (that job publishes
the Windows setup, which bundles the pinned flagship). The latter now
checks out with `fetch-depth: 0` for the tag comparison.
- Against today's main it fails with the 383-file list, which is the
v0.25.0 blocker. Fixing that is a flagship release, not a code change:
see the release skill's new pre-tag step.
</details>

## Test plan
- [x] `pytest tests/unit/test_check_flagship_release.py` (lock/hub/tag
cases plus the workflow wiring)
- [x] `python util/check_flagship_release.py --ref origin/main` fails,
listing the files changed since `agent-pkg-gaia-v0.2.0`
- [x] `actionlint` on both workflows;
`util/check_workflow_ancestor_skip.py` clean; `python util/lint.py
--black --isort`
- [ ] After the flagship is re-released and its lock committed, `python
util/check_flagship_release.py` passes on the commit to be tagged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops DevOps/infrastructure changes documentation Documentation changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant