Repository navigation
ci(release): fail a final release whose flagship agent predates it - #4940
Conversation
The flagship agent users install (`gaia init`, `gaia hub install gaia`, the Windows setup) comes from the Agent Hub and the committed binaries.lock.json, which only the separate agent-pkg-gaia release fills. Nothing tied it to a core release, so v0.25.0 was prepared with the hub still serving gaia 0.2.0, frozen from code that differs from main in 383 source files. A final core tag now fails in publish.yml and release_components.yml unless the committed flagship version is published as the hub's latest with the lock's hashes, and its agent-pkg-gaia tag was frozen from the same sources as the release commit. Release candidates skip it; they build their own. util/check_flagship_release.py runs the same check before tagging, and the release skill's pre-tag phase now calls it with the steps to fix a failure.
Skill audit
✅ 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 |
The final-release gate skipped every *.md and all of src/gaia/apps, but the freeze bundles the flagship's skill prompts and gaia.agents imports gaia.apps.llm, so a prompt change after the agent tag would pass. Only the web frontend is excluded now; a test checks the real tree.
|
I pushed a fix for the review finding: the gate now also covers the flagship's bundled skill prompts and |
|
Verdict: Approve with suggestions A final release can no longer ship a flagship agent built from older code. The gate checks that the lock, the agent tag, and the hub's latest version all agree with the release commit. The list of files it compares matches what the freeze actually bundles, now that skill prompts and 🟢 Two small follow-ups:
🔍 Technical details
|
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`
The release skill's flagship step could deadlock: release_agent_gaia.yml waits for the pinned terminal-hub on the hub, which normally publishes only on the final tag this gate now blocks. The step now says to dispatch release_components.yml first. The hub fetch also catches a dropped connection, which the URLError guard test requires, and the darwin-x64 omission is noted as deliberate.
A final core release could ship with a flagship agent built from much older code, and nothing noticed:
gaia init,gaia hub install gaiaand the Windows setup take the flagship from the Agent Hub andbinaries.lock.json, which only the separateagent-pkg-gaiarelease 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 finalv*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 #4939 has them build their own.🔍 Technical details
util/check_flagship_release.pyreads the flagship version fromgaia-agent.yamlat 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/gaiaminusapps/, the gaia and chat agent packages minus tests, eval data and*.md, andsetup.py); the hub manifest lists that version aslatest_versionwith matching sha256 for the three required platforms.publish.yml'svalidate(finals only) and inrelease_components.yml'sversionjob on a tag (that job publishes the Windows setup, which bundles the pinned flagship). The latter now checks out withfetch-depth: 0for the tag comparison.Test plan
pytest tests/unit/test_check_flagship_release.py(lock/hub/tag cases plus the workflow wiring)python util/check_flagship_release.py --ref origin/mainfails, listing the files changed sinceagent-pkg-gaia-v0.2.0actionlinton both workflows;util/check_workflow_ancestor_skip.pyclean;python util/lint.py --black --isortpython util/check_flagship_release.pypasses on the commit to be tagged