Skip to content

ci(release): fail a final release whose flagship agent predates it - #4940

Merged
kovtcharov-amd merged 4 commits into
mainfrom
ci/final-flagship-gate
Oct 12, 2026
Merged

kovtcharov-amd merged 4 commits into
mainfrom
ci/final-flagship-gate

Conversation

@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

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 #4939 has them build their own.

🔍 Technical details
  • 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.

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/main fails, listing the files changed since agent-pkg-gaia-v0.2.0
  • 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

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.
@github-actions github-actions Bot added documentation Documentation changes devops DevOps/infrastructure changes tests Test changes labels Oct 11, 2026
@github-actions

github-actions Bot commented Oct 11, 2026 •

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.

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.
@kovtcharov-amd

Copy link
Copy Markdown
Collaborator Author

I pushed a fix for the review finding: the gate now also covers the flagship's bundled skill prompts and gaia.apps.llm. It used to skip every *.md file and all of src/gaia/apps, so a change to a prompt frozen into the binary could pass. Only the web frontend is left out now, and a new test checks that against the real tree. Separately, the terminal-hub 0.25.0 component has to be published before the flagship release, as #4941 describes. The skill step this PR adds should say so, or the two releases can block each other.

@github-actions

Copy link
Copy Markdown
Contributor

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 gaia.apps.llm are included. Both workflows fetch tags before the check, and RCs are correctly exempt. No correctness or security problems found.

🟢 Two small follow-ups:

  • The new pre-tag step in the release skill doesn't mention the terminal-hub ordering. You said in your comment that terminal-hub 0.25.0 has to be published before the flagship release (chore(gaia): bump the flagship agent to 0.3.0 for GAIA 0.25.0 #4941), but the step still doesn't say so. Add one line so a release manager doesn't get stuck on the circular dependency.
  • The lock check skips the Intel Mac build. The lock pins darwin-x64, but the gate never checks it, so an Intel Mac build left at an old version would pass.
🔍 Technical details
  • .claude/skills/gaia-release/SKILL.md step 4 ("If it fails: …"): add the order explicitly. Publish terminal-hub first, then tag agent-pkg-gaia-v…, then land the regenerated lock.
  • util/check_flagship_release.py: REQUIRED_PLATFORMS = ("win32-x64", "darwin-arm64", "linux-x64"), but hub/agents/gaia/npm/binaries.lock.json also carries darwin-x64. If the hub publishes darwin-x64 for every flagship version, add it here. If not, a one-line comment saying why it's excluded would stop someone "fixing" it later.
  • Checked: FROZEN_INPUTS covers freeze.py's PATHEX (gaia, chat, src) plus SKILLS_SRC and the manifest. publish.yml validate already checks out with fetch-depth: 0. release_components.yml's tag trigger already excludes v*-rc*, so leaving out an RC condition is safe.

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`
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.
@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Oct 12, 2026
Merged via the queue into main with commit 73db852 Oct 12, 2026
@kovtcharov-amd
kovtcharov-amd deleted the ci/final-flagship-gate branch October 12, 2026 02:24
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