Skip to content

ci(release): one command stamps and checks every version field - #5508

Merged
kovtcharov-amd merged 3 commits into
mainfrom
ci/release-versions
Oct 21, 2026
Merged

kovtcharov-amd merged 3 commits into
mainfrom
ci/release-versions

Conversation

@kovtcharov-amd

@kovtcharov-amd kovtcharov-amd commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

A release bump means hand-editing versions in about a dozen files (the Agent UI package, the hub component manifests, the docs navbar, the agents' core floors), and nothing catches a missed one until a release fails. Now python util/release_versions.py --stamp writes them all from their source of truth, and lint fails on drift, naming the file, the value it found, the value it expected, and the command that fixes it. This is Phase 1 of the release train (#5172, plan in #5492). It's tooling only: no release workflow changes, and no file the flagship 0.3.1 binary is built from is touched, so it's safe before the v0.25.1 final.

The flagship (0.3.1) and chat (0.2.0) agents keep their own versions for now. Two known drifts are reported as HELD rather than fixed: the chat agent's __init__.py says 0.1.0, and the flagship npm lockfile's root says 0.1.0. Fixing either would change the inputs the v0.25.1 final checks against the flagship 0.3.1 tag. They get fixed when the agents join core's version.

🔍 Technical details
Source Fields that must match it
src/gaia/version.py __version__ webui package.json + lock root (npm spelling when RC-stamped); hub/components/{agent-ui,terminal-hub} version; docs.json navbar label
same, base version flagship + chat amd-gaia>= (pyproject and manifest) and min_gaia_version; the minimum core in the flagship npm README.md and SKILL.md
LEMONADE_VERSION docs.json navbar label
flagship gaia_agent/__init__.py its pyproject.toml, gaia-agent.yaml, npm/package.json, binaries.lock.json (agentVersion, sidecar componentVersion, baseUrl)
chat pyproject.toml chat gaia-agent.yaml
  • Each field must match exactly the expected number of times, so a moved or duplicated field is an error, not a guess. Stamping is all-or-nothing and keeps each file's line endings.
  • terminal-hub's min_gaia_version is not stamped. check_component_core_api.py governs it.
  • bump-ui-version.mjs, stamp_version.py and release_tag.py stamp are unchanged, because workflows still call them.
  • lint.yml now also triggers on util/release_versions.py, util/release_tag.py and docs/docs.json.
  • The gaia-release skill, dev.mdx, README.md, installer/README.md and the Agent UI SDK page now describe the new command.

Test plan

  • python util/release_versions.py --check passes on current main (core 0.25.1, flagship 0.3.1), with 2 held fields
  • pytest tests/unit/test_release_versions.py: 72 tests. Every enforced field drifted on its own fails and names the file; --stamp restores the bytes. Also covered: missing file or source, unparseable versions, 0.25.1rc2 / 0.25.1-rc.2 trees, a floor below or above core, agent mismatch, CRLF and LF, and duplicate fields
  • --stamp v0.26.0-rc1 on a copy matches release_tag.py stamp byte for byte
  • PYTHONPATH=src python util/lint.py --all: Release Versions passes; every other check matches main (mypy warn-only)
  • Related suites pass: test_release_tag, test_docs_json_release, test_check_flagship_release, chat floor tests

Versions were hand-synced in about a dozen places across core, the Agent UI,
the hub components, the docs navbar, and the flagship and chat agents, and
nothing caught drift until a release failed. util/release_versions.py now
writes every field from its source of truth (--stamp), writes an RC's
versions exactly as release_tag.py stamp does (--stamp vX.Y.Z-rcN), and
fails lint on any drift, naming the file, the value found, the value
expected, and the fix command (--check).

It encodes today's rules: core fields and the first-party agents' amd-gaia
floors follow src/gaia/version.py, and the flagship and chat agents keep
their own versions. Two known drifts (the chat agent's __init__ version and
the flagship npm lockfile's root version) are reported as held, not fixed,
because the v0.25.1 final checks that the flagship 0.3.1 build inputs don't
change. Phase 1 of the release train (#5172).
@github-actions github-actions Bot added documentation Documentation changes installer Installer changes devops DevOps/infrastructure changes tests Test changes labels Oct 21, 2026
@github-actions

github-actions Bot commented Oct 21, 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.

@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve with suggestions

This adds one command that writes every version field from its source, plus a lint check that names any field that drifts. It runs clean on the current tree, and the all-or-nothing write and the held-drift handling are well thought out. One gap breaks the "one command" promise on the next release: the stamp raises the flagship's minimum core version, but not the two npm docs that a hub test pins to that version.

  • Stamping leaves the flagship's npm README and SKILL quoting the old minimum core. I stamped a copy of the tree with the core set to 0.26.0. The manifest moved to min_gaia_version: "0.26.0", but the npm README and SKILL still say 0.25.1, and test_npm_doc_min_version.py requires them to match. The next release PR will fail that test, or a release manager will chase it by hand after the skill told them the stamp covers the floors. Add both as stamped fields. The CHANGELOG can stay manual because it gets a new entry anyway.

Real-world evidence

N/A: this is release tooling, docs and CI, with no user-facing CLI/API/UI surface, and no evidence bundle was produced. Beyond static review, I ran python util/release_versions.py --check on the PR head: 20 OK, 2 HELD, exit 0. I also ran --stamp on a scratch copy with the core bumped to 0.26.0: it stamped 11 fields, which is how the gap above showed up. pytest isn't installed on this runner, so I couldn't run the 67 new unit tests. The verdict relies on the author's test plan and CI for those.

🔍 Technical details

🟡 npm docs' minimum core not stamped (util/release_versions.py:121-132)

hub/agents/gaia/python/tests/test_npm_doc_min_version.py asserts that npm/README.md (Python CLI **X.Y.Z or newer**) and npm/SKILL.md (must also be **X.Y.Z+**) equal gaia-agent.yaml's min_gaia_version. --stamp moves the manifest to the new core but leaves both docs unchanged. The v0.25.1 release PR (#5474) had to bump them by hand for this reason. Each pattern matches exactly once today, so they fit the existing count=1 contract:

    Target(
        "hub/agents/gaia/python/gaia-agent.yaml",
        "min_gaia_version",
        _YAML_MIN_GAIA,
        "core-floor",
    ),
    Target(
        "hub/agents/gaia/npm/README.md",
        "minimum core",
        re.compile(r"(Python CLI \*\*)(\d+\.\d+\.\d+)( or newer\*\*)"),
        "core-floor",
    ),
    Target(
        "hub/agents/gaia/npm/SKILL.md",
        "minimum core",
        re.compile(r"(must also be \*\*)(\d+\.\d+\.\d+)(\+\*\*)"),
        "core-floor",
    ),

Then add one line to step 5 of the gaia-release skill: the newest npm/CHANGELOG.md entry must quote the new minimum core, because the test reads the first Python CLI X.Y.Z+ on PATH match.

🟢 Skill could name the frozen-input consequence (.claude/skills/gaia-release/SKILL.md, step 5)

Stamping the floors edits hub/agents/{gaia,chat}/python, and check_flagship_release.py treats those as frozen inputs. So every core release that raises the floor also needs a flagship rebuild, as happened in 0.25.1. That isn't new behavior, but step 5 now does it silently. One sentence pointing at the Phase 3 flagship procedure would save a surprise.

Strengths

  • Each field must match an exact number of times, and a stamp writes all fields or none. That turns a moved field into a loud error instead of a silent miss, which fits the fail-loudly rule.
  • HELD handles the two known drifts without blocking lint, and it doesn't touch the flagship 0.3.1 frozen inputs ahead of the v0.25.1 final.
  • Writing with newline="" keeps each file's line endings, and the tests cover both CRLF and LF.

Stamping raised the flagship's min_gaia_version but left the minimum core
quoted in its npm README and SKILL, which test_npm_doc_min_version.py pins
to the manifest, so the next release PR would have failed that test. Both
are now stamped. The skill notes that the CHANGELOG line is hand-written per
entry, and that raising the floors means a flagship release for the final.
@kovtcharov-amd

Copy link
Copy Markdown
Collaborator Author

Fixed in 6551d44: the flagship npm README and SKILL minimum-core lines are now stamped with the floors, so a core bump keeps test_npm_doc_min_version.py green. The CHANGELOG line stays hand-written because the test reads its first match, which sits in an older entry, and stamping it would rewrite a past release. The skill's step 5 now says so, and also notes that raising the floors means a flagship release for the final.

Resolves conflicts with #5509 and #5514. The agent-ui hub manifest is no
longer published (#5509), so it no longer follows core and is dropped from
the stamped fields. The workflow path filters take main's util/** blocks;
lint.yml adds docs/docs.json and test_unit.yml adds hub/agents/gaia/npm/**
so the path-coverage guard covers every file the version check reads.
@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Oct 21, 2026
Merged via the queue into main with commit cee6a47 Oct 21, 2026
30 of 31 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the ci/release-versions branch October 21, 2026 18:46
grtninja pushed a commit to grtninja/gaia that referenced this pull request Oct 22, 2026
Today the only way to find out whether a release builds is to tag one,
and the flagship agent, the terminal and the Windows setup are each
built by a different workflow at a different version. With this PR a
maintainer can dispatch one workflow on a branch and get every
first-party artifact of its commit built twice: once as the release
candidate, and once as the final twin a final would promote. Each one is
verified and listed with where a real train would publish it, and
nothing is published. This is Phase 2 of the release train (amd#5172, plan
in amd#5492). It runs Phase 1's version check (amd#5508).

The shared build workflows only gain optional inputs that default to
empty, so publish.yml, release_components.yml, the agent releases and
the PR gates build exactly what they did before. This PR's own
build-installers, terminal and Windows-setup PR gates run them with
those defaults. The dry run only builds the commit it's dispatched on.
An earlier version took a `ref` to build, and CodeQL rightly flagged
that it would run other code with main's cache scope, which later
release builds restore. The dry run's token is read-only except in the
two Agent UI installer jobs, because build-installers.yml declares
`contents: write` and `id-token: write` and GitHub won't call it with
less. Nothing in the dry run can use those grants: no secret is passed,
`publish_to_release` is false, and a test pins both. Removing the grant
means changing build-installers.yml in a way that isn't additive, so
that waits until after v0.25.1 final.

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

**Run it:** `gh workflow run release_train_dryrun.yml --ref main -f
rc_tag=v0.25.1-rc3`

**What verify checks**
- SHA-256 for every artifact, plus `SHA256SUMS` and
`gaia-tui-SHA256SUMS.txt` (install.sh/ps1 read the latter) for each
build.
- Version stamps: wheel METADATA, sdist PKG-INFO, npm `package.json`,
Electron `latest*.yml`, and the string embedded in each terminal binary.
The final twin must not carry the RC string.
- `binaries.lock.json` generated from this run's sidecar and terminal
builds instead of the committed `PENDING` placeholders, packed into the
flagship npm tarball, and checked against the built bytes.
- Twin-diff of the wheel, sdist, `@amd-gaia/agent-ui` tarball and the
`.deb`'s `app.asar`, once versions and Vite chunk hashes are normalised.
- One terminal target rebuilt from scratch to prove the Go build is
reproducible.
- Every build's existing smoke jobs must pass (Electron
structural/distro/userns, DMG, MCP harness, frozen-sidecar smoke,
`.pkg`/`.deb`/`.rpm` and Windows setup clean-runner installs, flagship
npm vitest), plus a clean-venv `pip install` and `npm install` of the
core packages on Linux, Windows and macOS.

**Additive edits to shared workflows** (every new input is `required:
false`, default `''`;
`test_new_callee_inputs_are_optional_and_empty_by_default` pins it)
- `build-installers.yml`: `artifact_prefix`, plus `ref`, because `tag`
names a version that isn't a tag yet. An empty prefix leaves artifact
names and the concurrency group unchanged, and an empty `pattern:`
downloads every artifact as before.
- `tui_installers.yml`: `artifact_prefix`, and a new `sidecar: artifact`
mode. The default is still `pinned`.
- `windows_setup.yml`: `artifact_prefix`, and `agent_ui_artifact` as a
third desktop-app source, with the same name, PE and size checks.
- publish.yml, release_components.yml, release_agent_*.yml,
build_flagship_sidecar.yml and test_agent_gaia_npm.yml are untouched.

**What the train would publish vs v0.25.1-rc2**
- Renamed: terminal binaries use one scheme, `gaia-{linux,darwin}-x64`
and `gaia-win-{x64,arm64}.exe`, instead of publish.yml's `-amd64` /
`gaia-windows-*`. The Windows ones also gain their icon and version
resources, and `gaia version` prints `0.25.1-rc.2` rather than
`v0.25.1-rc2`. install.sh/ps1 (amd#5509) fetch the old names, so Phase 5
has to pick one scheme for both.
- Added: `SHA256SUMS` and `release-manifest.json`. A final would also
gain the four terminal packages, the combined Windows setup and the
flagship sidecars as GitHub assets.
- Not built here: the two Sigstore bundles, which are signed at publish
time.
- Unchanged: the wheel and sdist have the same file contents as the
published rc2 ones, and the Agent UI installers, `latest*.yml`, Windows
setup and flagship RC manifest keep their names.
- npm and hub: `@amd-gaia/agent-ui` is unchanged. The flagship tarball
is still `@amd-gaia/gaia` (renamed `@amd-gaia/agent` with a `gaia-agent`
bin in Phase 5). The hub only gets what the lock pins: the four sidecars
and six raw terminal binaries (amd#5509).
</details>

## Test plan
- [x] Dry run of this branch (main + this change) as `v0.25.1-rc3`:
green, 51 artifacts, 48 checks, 27 min wall, 81 runner-minutes
([run](https://github.com/amd/gaia/actions/runs/39658446607))
- [x] Dry run of the rc2 code (`0b14d740d` plus these workflow files,
branch `ci/release-train-dryrun-rc2`) as `v0.25.1-rc2`: green, 51
artifacts, 41 min wall (the best-effort Intel Mac sidecar leg is the
critical path), 100 runner-minutes
([run](https://github.com/amd/gaia/actions/runs/39658548991)). Green
again with the final verify code: 25 min, 81 runner-minutes
([run](https://github.com/amd/gaia/actions/runs/39666011626))
- [x] Before the `ref` removal, the same workflow was green on the rc2
commit and on main
([rc2](https://github.com/amd/gaia/actions/runs/39650641777),
[main](https://github.com/amd/gaia/actions/runs/39650668099), [rc2
again](https://github.com/amd/gaia/actions/runs/39655245308))
- [x] CodeQL passes: the 22 cache-poisoning alerts from the first
version are closed as fixed
- [x] `pytest tests/unit/test_release_train.py
tests/unit/test_release_train_dryrun_workflow.py`: 50 tests. Each of
`npm publish`, a secret, a push trigger, an environment, a write grant,
a publish.yml callee and `publish_to_release: true` added to the
workflow fails the guard, and so does checking out another ref. An
altered twin, a wrong stamp, a stale lock, a missing platform and an
unreadable archive each fail verify.
- [x] `python util/lint.py --all` and `actionlint` pass on every touched
workflow and its live callers
- [x] This PR's build-installers (including the AppImage distro and DMG
smokes) and build_tui (tui_installers + windows_setup clean-runner
installs) gates pass with the default inputs
- [ ] After merge: `gh workflow run release_train_dryrun.yml --ref main
-f rc_tag=v0.25.1-rc3`

The branch runs used a temporary push trigger, because a dispatch needs
the file on main. It is reverted in this branch.
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 installer Installer changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant