Repository navigation
ci(release): one command stamps and checks every version field - #5508
Conversation
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).
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 |
|
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.
Real-world evidenceN/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 🔍 Technical details🟡 npm docs' minimum core not stamped (
Then add one line to step 5 of the gaia-release skill: the newest 🟢 Skill could name the frozen-input consequence ( Stamping the floors edits Strengths
|
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.
|
Fixed in 6551d44: the flagship npm README and SKILL minimum-core lines are now stamped with the floors, so a core bump keeps |
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.
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.
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 --stampwrites 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
HELDrather than fixed: the chat agent's__init__.pysays 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
src/gaia/version.py__version__package.json+ lock root (npm spelling when RC-stamped);hub/components/{agent-ui,terminal-hub}version;docs.jsonnavbar labelamd-gaia>=(pyproject and manifest) andmin_gaia_version; the minimum core in the flagship npmREADME.mdandSKILL.mdLEMONADE_VERSIONdocs.jsonnavbar labelgaia_agent/__init__.pypyproject.toml,gaia-agent.yaml,npm/package.json,binaries.lock.json(agentVersion, sidecar componentVersion, baseUrl)pyproject.tomlgaia-agent.yamlterminal-hub'smin_gaia_versionis not stamped.check_component_core_api.pygoverns it.bump-ui-version.mjs,stamp_version.pyandrelease_tag.py stampare unchanged, because workflows still call them.lint.ymlnow also triggers onutil/release_versions.py,util/release_tag.pyanddocs/docs.json.dev.mdx,README.md,installer/README.mdand the Agent UI SDK page now describe the new command.Test plan
python util/release_versions.py --checkpasses on current main (core 0.25.1, flagship 0.3.1), with 2 held fieldspytest tests/unit/test_release_versions.py: 72 tests. Every enforced field drifted on its own fails and names the file;--stamprestores the bytes. Also covered: missing file or source, unparseable versions,0.25.1rc2/0.25.1-rc.2trees, a floor below or above core, agent mismatch, CRLF and LF, and duplicate fields--stamp v0.26.0-rc1on a copy matchesrelease_tag.py stampbyte for bytePYTHONPATH=src python util/lint.py --all: Release Versions passes; every other check matches main (mypy warn-only)test_release_tag,test_docs_json_release,test_check_flagship_release, chat floor tests