Repository navigation
ci(release): take installers from GitHub releases, stop uploading them to R2 - #5509
Conversation
…m to R2 The one-line installers fetched the terminal binary from hub.amd-gaia.ai, and every final release uploaded about 1 GB of installers (desktop app, Windows setup, .pkg/.deb/.rpm) to R2 that nothing downloaded any more: the website already links the GitHub release. Now install.sh and install.ps1 take the terminal binary from the latest GitHub release, verified against its gaia-tui-SHA256SUMS.txt, and release_components.yml uploads only the six raw terminal binaries to R2, the one thing there with a reader (the flagship agent's binaries.lock.json pins them). - The scripts resolve the latest release from GitHub's /releases/latest redirect, so there is no API rate limit, and fetch the checksums and the binary from that one tag. GAIA_RELEASE_TAG pins another. A missing checksum, a mismatch, or a malformed tag fails the install; there is no R2 fallback. - The flagship agent still comes from the Agent Hub: it ships on its own cadence, and gaia init and gaia hub install take it from there too. - The installer-attach job now runs on a dry run (checksums only, no upload), and a dry run of the hub publish needs no environment, so the whole workflow can be exercised from a branch without an approval. - Objects already on R2 stay; old install paths keep working.
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 |
…inaries A release could ship without one of its six terminal binaries if a single build leg failed, and install.sh / install.ps1 would then break on that platform until the next release. publish.yml now requires every build-tui leg and refuses to checksum anything but the exact six. - The Windows terminal binary on the release now carries its icon and version resource, stamped 0.25.1 (not v0.25.1) like the copy inside the Windows setup, and check_pe_resources.py proves it on the shipped bytes. - GAIA_RELEASE_TAG now pins the whole install: amd-gaia==X.Y.Z[rcN] from PyPI, that release's terminal binary, and for a candidate the agent frozen on its pre-release (gaia-agent-release.json), the same set an RC core uses. Any other value fails before anything installs. Documented in installer/README.md, the RC release notes and the release skill. - install.ps1 refuses a duplicate or uppercase checksum line and anchors its regexes with \z, matching install.sh. - On a dispatch the installer-attach job looks for the release once and warns if it is missing, instead of waiting three hours. - A new test reads release_components.yml and fails if any step that touches a secret, uploads, deploys or triggers a workflow loses its dry-run guard, or if the publish job's environment stops resolving to agent-publish on a real run. - docs/releases/index.mdx no longer says to bump the agent-ui manifest.
A local test run wrote its module-analysis cache into the checkout.
|
Verdict: Approve with suggestions This looks safe to merge. The one-line installers now take the terminal binary from the GitHub release, and they refuse to install it without a matching SHA-256. The release stops uploading about 1 GB of installers to R2 that nothing read. The six raw binaries that the flagship lock pins still publish to R2. Highlights:
I found no stale references to the removed 🟢 Suggestion: run the unchecked dry-run item before merging.
🔍 Technical details
|
|
The
🔍 Technical detailsLive install checks, each in a fresh temp HOME/USERPROFILE, downloading binaries only:
|
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.
…5521) Nothing in CI installed GAIA the way a user does and then checked that it works. The existing smokes build their own packages, use a stub agent, and stop at "the files landed". So a release could ship an installer that doesn't install or doesn't run, and nobody would know until a user tried it. This workflow takes a release's own installers and runs each one on a clean GitHub-hosted runner: silent install, headless launch, health check, quit, uninstall, and a check that nothing is left behind. It covers the Windows one-setup in all three choices, the desktop app's own setup, an upgrade from v0.25.0, the macOS .dmg and .pkg on both chips, Ubuntu 22.04/24.04 .deb and AppImage, Fedora .rpm, a .deb upgrade, and the new install.sh/install.ps1 (pinned to the release by `GAIA_RELEASE_TAG` since amd#5509). Every phase is timed against thresholds measured from five real runs. **On v0.25.1-rc2, 15 of 21 rows pass end to end. The other 6 hit real installer bugs, now filed:** - amd#5526: the GAIA agent won't start on Ubuntu 22.04, Debian 12 or RHEL 9 (Linux build needs glibc 2.38). The shipped v0.25.0 agent is affected too. - amd#5527: the desktop app's .deb and the terminal's .deb are both named `gaia`, so installing one removes the other. The documented `apt remove gaia-desktop` also fails. - amd#5528: `gaia-desktop` isn't on PATH after the .deb, though the docs say to run it. - amd#5529: install.sh fails on Intel Macs. `cryptography` 49+ has no Intel macOS wheel and needs Rust to build. - amd#5531: on Windows, `gaia uninstall --purge` can't delete the venv it runs from. - amd#5530 and amd#5532 (lower impact): the Windows setup ships a different gaia-tui build than the raw binaries; terminal-only installs suggest `gaia init`, which they don't have. Those five are listed in `installer/headless/known_failures.json`, so the run is green but shows "known #N". An entry fails the run again once its bug stops reproducing, so it has to be removed with the fix. This PR also adds one path to test_unit.yml's filter, which fixes main's red lint: amd#5509 added a test that reads `binaries.lock.json`, and amd#5514's coverage guard wants the lane to trigger on it. <details> <summary>🔍 Technical details</summary> **v0.25.1-rc2 results** (run 39659946919, the last of the five measurement runs). A release candidate publishes no terminal .pkg/.deb/.rpm, so those rows are rebuilt in the run from rc2's own gaia-tui and gaia-agent with the repo's build scripts. A final release must carry them. | Row | OS | Source | Download | Install | Upgrade | Launch | Health | Preflight | Quit | Uninstall | Leftovers | Findings | |---|---|---|---|---|---|---|---|---|---|---|---|---| | `fedora-tui-rpm` | Fedora (container) | rebuilt from the release's binaries | n/a | pass 16s | n/a | pass 0s | pass 4s | pass 0s | n/a | pass 0s | pass 0s | none | | `mac-arm64-agent-ui-dmg` | macOS arm64 | release | pass 2s | pass 17s | n/a | pass 10s | pass 18s | n/a | pass 2s | pass 0s | pass 0s | none | | `mac-arm64-install-sh` | macOS arm64 | release | n/a | pass 7s | n/a | pass 2s | pass 4s | pass 0s | n/a | pass 1s | pass 0s | none | | `mac-arm64-tui-pkg` | macOS arm64 | rebuilt from the release's binaries | n/a | pass 3s | n/a | pass 0s | pass 4s | pass 0s | n/a | pass 0s | pass 0s | none | | `mac-x64-install-sh` | macOS x64 | release | n/a | known amd#5529 12s | n/a | skipped (amd#5529) | skipped (amd#5529) | skipped (amd#5529) | n/a | skipped (amd#5529) | skipped (amd#5529) | none | | `mac-x64-tui-pkg` | macOS x64 | rebuilt from the release's binaries | n/a | pass 4s | n/a | pass 0s | pass 9s | pass 0s | n/a | pass 0s | pass 0s | none | | `ubuntu22-agent-ui-deb` | Ubuntu 22.04 | release | pass 1s | pass 15s | n/a | pass 10s | pass 4s | n/a | pass 2s | pass 3s | pass 0s | known amd#5527, known amd#5528 | | `ubuntu22-appimage` | Ubuntu 22.04 | release | pass 1s | pass 0s | n/a | pass 10s | pass 17s | n/a | pass 1s | pass 0s | pass 0s | none | | `ubuntu22-install-sh` | Ubuntu 22.04 | release | n/a | pass 11s | n/a | pass 5s | known amd#5526 4s | pass 0s | n/a | pass 2s | pass 0s | none | | `ubuntu22-tui-deb` | Ubuntu 22.04 | rebuilt from the release's binaries | n/a | pass 8s | n/a | pass 0s | known amd#5526 2s | pass 0s | n/a | pass 2s | pass 0s | none | | `ubuntu24-agent-ui-deb` | Ubuntu 24.04 | release | pass 1s | pass 6s | n/a | pass 10s | pass 5s | n/a | pass 1s | pass 2s | pass 0s | known amd#5527, known amd#5528 | | `ubuntu24-appimage` | Ubuntu 24.04 | release | pass 2s | pass 0s | n/a | pass 10s | pass 7s | n/a | pass 1s | pass 0s | pass 0s | none | | `ubuntu24-install-sh` | Ubuntu 24.04 | release | n/a | pass 13s | n/a | pass 4s | pass 7s | pass 0s | n/a | pass 2s | pass 0s | none | | `ubuntu24-tui-deb` | Ubuntu 24.04 | rebuilt from the release's binaries | n/a | pass 8s | n/a | pass 0s | pass 6s | pass 0s | n/a | pass 2s | pass 0s | none | | `ubuntu24-tui-deb-upgrade` | Ubuntu 24.04 | rebuilt from the release's binaries | n/a | pass 7s | pass 5s | pass 0s | pass 6s | n/a | n/a | pass 2s | pass 0s | none | | `win-agent-ui-exe` | Windows x64 | release | pass 2s | pass 20s | n/a | pass 11s | pass 42s | n/a | pass 6s | pass 2s | pass 2s | none | | `win-install-ps1` | Windows x64 | release | n/a | pass 39s | n/a | pass 8s | pass 14s | pass 1s | n/a | known amd#5531 2s | skipped (amd#5531) | none | | `win-setup-both` | Windows x64 | release | pass 2s | pass 62s | n/a | pass 11s | pass 43s | pass 46s | pass 6s | pass 3s | pass 1s | none | | `win-setup-tui` | Windows x64 | release | pass 2s | pass 34s | n/a | pass 0s | pass 28s | pass 46s | n/a | pass 1s | pass 1s | none | | `win-setup-ui` | Windows x64 | release | pass 3s | pass 40s | n/a | pass 11s | pass 48s | n/a | pass 4s | pass 3s | pass 2s | none | | `win-setup-upgrade` | Windows x64 | release | pass 3s | pass 122s | pass 37s | pass 11s | pass 10s | n/a | pass 6s | pass 2s | pass 1s | none | **Thresholds** (median / p95 / threshold in seconds; 5 samples each, runs 39656352046, 39657296287, 39658130298, 39659110158, 39659946919; runner images ubuntu22, ubuntu24, ubuntu26 (the Fedora container's host), macos26 (macos-latest, arm64), macos15 (macos-15-intel) and win25-vs2026; some images rolled to a new version during the runs, and both versions are recorded). Formula: `ceil(max(p95 × 1.5, p95 + 60))`. The +60 s floor keeps a 3 s phase from failing on one slow runner. Download is reported but not gated: p95 ran up to 2.7× the median, and it measures the CDN, not the installer. Refresh with `python installer/headless/propose_thresholds.py --runs 5 --write`. | Row | Install | First launch to healthy | Upgrade | Uninstall | |---|---|---|---|---| | `fedora-tui-rpm` | 16 / 16 / **77** | 5 / 6 / **66** | - | 0 / 0 / **61** | | `mac-arm64-agent-ui-dmg` | 17 / 19 / **80** | 21 / 28 / **88** | - | 0 / 0 / **61** | | `mac-arm64-install-sh` | 10 / 12 / **72** | 11 / 12 / **73** | - | 2 / 2 / **63** | | `mac-arm64-tui-pkg` | 3 / 3 / **64** | 4 / 7 / **67** | - | 0 / 0 / **61** | | `mac-x64-tui-pkg` | 6 / 15 / **75** | 17 / 18 / **79** | - | 0 / 0 / **61** | | `ubuntu22-agent-ui-deb` | 13 / 14 / **75** | 18 / 20 / **81** | - | 3 / 3 / **64** | | `ubuntu22-appimage` | 0 / 0 / **61** | 14 / 25 / **85** | - | 0 / 0 / **61** | | `ubuntu22-install-sh` | 8 / 13 / **74** | - | - | 2 / 2 / **62** | | `ubuntu22-tui-deb` | 11 / 31 / **92** | - | - | 3 / 3 / **63** | | `ubuntu24-agent-ui-deb` | 6 / 8 / **68** | 15 / 17 / **77** | - | 2 / 3 / **63** | | `ubuntu24-appimage` | 0 / 0 / **61** | 18 / 18 / **78** | - | 0 / 0 / **61** | | `ubuntu24-install-sh` | 10 / 12 / **73** | 11 / 11 / **72** | - | 2 / 2 / **62** | | `ubuntu24-tui-deb` | 8 / 14 / **75** | 6 / 6 / **67** | - | 2 / 2 / **63** | | `ubuntu24-tui-deb-upgrade` | 7 / 12 / **72** | 6 / 6 / **67** | 5 / 6 / **66** | 2 / 2 / **63** | | `win-agent-ui-exe` | 20 / 36 / **96** | 54 / 58 / **119** | - | 3 / 3 / **64** | | `win-install-ps1` | 35 / 39 / **99** | 22 / 24 / **84** | - | - | | `win-setup-both` | 61 / 64 / **125** | 59 / 87 / **148** | - | 3 / 5 / **65** | | `win-setup-tui` | 34 / 37 / **97** | 19 / 28 / **89** | - | 1 / 1 / **61** | | `win-setup-ui` | 40 / 44 / **104** | 45 / 58 / **119** | - | 3 / 3 / **64** | | `win-setup-upgrade` | 92 / 117 / **177** | 19 / 20 / **81** | 33 / 37 / **97** | 2 / 3 / **63** | - "Healthy": the desktop app's backend answers `/api/health` at the release's version, with `gaia init` skipped because it downloads models. The terminal completes one `gaia-tui chat --agent gaia --query` turn through the installed gaia-agent against `fake_model_server.py`. With no Lemonade it must refuse within 120 s and name the fix (Linux/macOS refuse in under 1 s; Windows, where the setup always installs Lemonade, takes about 46 s to report it isn't running). - The journey scripts refuse to run outside GitHub Actions and keep everything under `$RUNNER_TEMP`. Install-script rows run with a sandbox `HOME`/`USERPROFILE`. - Triggers: release tags (waits up to 5 h for assets, then fails naming what's missing), `workflow_dispatch` with `release_tag`, and PRs on installer, install-script and download-page paths. With no tag it uses the newest release whose assets are all attached. PRs don't build installers. - Intel macOS uses `macos-15-intel` (macos-13 was retired in Dec 2025). The Debian bookworm smoke stays in tui_installers.yml. - The measurement runs went to a scratch branch with a temporary push trigger and an rc2 pin. Neither is in this PR. </details> ## Test plan - [x] Five consecutive full runs against v0.25.1-rc2 green on the scratch branch (39656352046, 39657296287, 39658130298, 39659110158, 39659946919) - [x] `pytest tests/unit/installer/test_installer_headless.py`: 39 passed (naming, timing records, known-failure matching and staleness, thresholds, fake server, workflow/script agreement, scripts refuse outside CI) - [x] `python util/lint.py --all`: everything passes except Tool Descriptions, which fails locally only (site-packages `gaia`, as noted in amd#5514) - [x] `python util/check_ci_path_coverage.py`: passes over all tracked files - [ ] This PR's own "Installer journeys (headless)" run is green
The one-line installers downloaded the terminal binary from hub.amd-gaia.ai, and every final release also uploaded about 1 GB of installers (desktop app, Windows setup, .pkg/.deb/.rpm) to R2 that nothing read any more, since the website already links the GitHub release. With this change
install.shandinstall.ps1take the terminal binary from the latest GitHub release, checked against that release'sgaia-tui-SHA256SUMS.txt. The release now uploads only the six raw terminal binaries to R2, because the flagship agent's lock pins them there. Anything already on R2 stays, so old install paths keep working.GAIA_RELEASE_TAGpins a whole install to one release; for a candidate that also means its own frozen agent, the way an RC core installs it. Otherwise the flagship agent still comes from the Agent Hub. It ships on its own schedule, andgaia initandgaia hub installinstall it from there too.release_components.ymlchanges a lot and its first real run will be the v0.25.1 final, so please review that file closely.Test plan
install.ps1binary steps (Main stripped, temp profile), Windows PowerShell 5.1: latest (v0.25.0) andGAIA_RELEASE_TAG=v0.25.1-rc2both installgaia-tui.exeplus the agent from the hub, andgaia-tui versionruns. A missing tag fails loudly and writes nothing.install.shinstall_tui+install_flagship_agentin WSL Ubuntu with a temp HOME, against the real releases: latest and rc2 with curl+sh, and latest with wget+dash. An injected or missing tag is refused.pytest tests/unit/installer/test_install_scripts_terminal_hub.py: 61 passed on Linux, and the PowerShell functional tests pass on PS 5.1. Fake GitHub-release + hub server covering checksum mismatch, a missing SUMS entry or file, malformed tags, and pinned tags.npx vitest runfor release-assets, cross-surface, download-target and Downloads (83 passed).actionlintand the ancestor-skip/trigger checks pass.release_components.ymldry run on this branch (39642035046): no environment and no approval, and every R2 step skipped. The attach job's new steps were run locally (see comment).GAIA_RELEASE_TAG=v0.25.1-rc2against the real pre-release, on PS 5.1 and in WSL: rc2 terminal binary plus agent 0.3.1 from the pre-release;uv pip compileresolvesamd-gaia[api]==0.25.1rc2.tests/unit/test_release_components_dry_run.pyfails when a dry-run guard is stripped.