Skip to content

fix(release): read released daemon APIs from PyPI, drop the hand-kept table - #5394

Merged
kovtcharov-amd merged 3 commits into
amd:mainfrom
kovtcharov:kalin/released-daemon-api-auto
Oct 19, 2026
Merged

kovtcharov-amd merged 3 commits into
amd:mainfrom
kovtcharov:kalin/released-daemon-api-auto

Conversation

@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

Every core release, someone had to remember to add a row to a table in the component publish guard. It was missed for v0.23.1, v0.24.0 and v0.24.1, and it's stale again for v0.25.0. A stale row means the guard checks a shipped version against this tree, which is the drift it was built to catch. Now the guard reads the release list and each wheel's daemon API version straight from PyPI on every run, so there's nothing to edit. If PyPI can't be reached, or the manifest names a version that was tagged but never published, the guard fails with an error instead of quietly checking against this tree.

Test plan

  • python -m pytest tests/unit/test_check_component_core_api.py tests/unit/test_remote_disconnected_handling.py passes (new release, PyPI down or malformed, tag without a release, yanked releases, pre-releases, backport cut)
  • python -m pytest tests/integration/test_component_core_api_pypi.py passes against live PyPI
  • python util/check_component_core_api.py --release-version 0.25.1 prints terminal-hub: min_gaia_version 0.23.0 ships daemon host API 1.1 (per the published amd-gaia==0.23.0 wheel) and exits 0
  • Dispatch release_components.yml with dry_run: true and check that the "Assert each component's declared minimum core can serve it" step passes

Refs #3922

… table

The component publish guard answered "what did each core release ship" from a
table someone had to edit after every release; it was missed for v0.23.1,
v0.24.0 and v0.24.1, and is stale again for v0.25.0. The guard now reads the
release list and each wheel's DAEMON_API_VERSION from PyPI on every run.

- PyPI unreachable or returning a malformed/empty index is a hard error, never
  "everything is unreleased, ask the tree".
- A min_gaia_version below the newest release that PyPI does not have (a tag
  that never shipped, a yanked release, a typo) is a hard error; only the
  version being cut, or one above every release, resolves from the tree.
- --verify-released is gone: with no table there is nothing to audit.

Refs amd#3922
@github-actions github-actions Bot added devops DevOps/infrastructure changes tests Test changes labels Oct 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve

The component publish guard no longer depends on someone adding a row to a table after every core release. It now reads the release list and each wheel's daemon API version from PyPI on every run, and fails loudly when PyPI is unreachable, returns garbage, or the manifest names a version that was tagged but never shipped. That fixes the drift it was missed for in v0.23.1, v0.24.0, v0.24.1 and v0.25.0, and the change is clean.

Nothing blocks merge. There are two small edge cases below, neither reachable with today's manifests.

Real-world evidence

N/A: this is release tooling plus tests, with no gaia CLI, API, MCP or Agent UI surface, and no evidence bundle was produced. The verdict rests on static review. I couldn't run the tests here because the runner has no pytest. The PR's test plan (live-PyPI integration test, --release-version 0.25.1 run, release_components.yml dry-run dispatch) is still unchecked; please tick it off before merging.

🔍 Technical details

Issues found

🟢 Very old releases now hard-error instead of reading as "pre-daemon" (util/check_component_core_api.py, resolve_daemon_api). Dropping FIRST_CORE_RELEASE_WITH_DAEMON means a min_gaia_version below 0.22.0 always fetches that release's wheel. A pre-wheel release with only an sdist now raises no unyanked wheel where it used to return None with "predates the daemon". That is still loud and correct under the fail-loudly rule, and no committed manifest is that old. It's worth a one-line note in the module docstring so the next reader doesn't think it's a regression.

🟢 released_versions can silently collide keys (util/check_component_core_api.py, released_versions). parse_version truncates to three parts, so a PyPI key like 0.23.0.1 (or both 0.23 and 0.23.0) maps to the same tuple, and whichever comes last wins the raw slot. amd-gaia has never published such a version, so this is theoretical. Skipping keys with more than three parts would make it impossible:

        if not re.fullmatch(r"\d+(\.\d+){0,2}", raw):
            continue

Checked and fine

  • --verify-released has no remaining callers. release_components.yml is the only workflow that runs the script, and nightly-patch-release.yml only installs its deps. Removing the flag breaks nothing.
  • The network marker is registered in pyproject.toml (--strict-markers is on), so the new integration test collects cleanly.
  • tests/unit/test_remote_disconnected_handling.py only touches _fetch and PYPI_JSON_URL, both unchanged.
  • The cutting handling is right: a published wheel still outranks the tree, a backport below latest falls through to the tree, and an unrelated cut doesn't rescue a missing tag.

Strengths

  • The autouse no_network fixture makes any unplanned PyPI read fail the unit suite, so these tests can't quietly turn into live-network tests.
  • An empty or malformed index is rejected rather than read as "zero releases". Reading it that way would have quietly sent every version to the tree, the exact failure this guard exists to catch.
  • FakePyPI runs the real index-JSON then wheel-bytes path, and the live integration test pins the wheel layout the parser assumes. Together they cover both halves of the contract (CLAUDE.md "mocks prove we called it, not that the call is valid").

The new integration test was named by no CI lane, which failed Run Code
Quality Checks; it now runs beside the other live-upstream checks in the unit
workflow, and a guard-only change triggers that workflow. A four-part PyPI key
can no longer overwrite its three-part release in the released map.
@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Oct 19, 2026
Merged via the queue into amd:main with commit c5cfa83 Oct 19, 2026
36 of 53 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the kalin/released-daemon-api-auto branch October 19, 2026 18:28
@kovtcharov-amd kovtcharov-amd mentioned this pull request Nov 7, 2026
6 of 12 tasks
kovtcharov-amd added a commit to rezamuliawijaya/gaia that referenced this pull request Nov 7, 2026
## Why this matters

v0.26.0 makes the first reply in a new chat much faster by loading tools
on demand (amd#6449), and adds long recordings and video links (amd#6451),
read aloud in both apps (amd#6489), a live system usage strip (amd#6548),
cloud spend in the composer (amd#6775), local problem reports for failed
model calls (amd#6665) and GAIA on stock GNOME without a tray (amd#6868).
Among the fixes, a duplicated edit can no longer damage a file and
long-running agents on macOS keep answering. 31 commits since v0.25.4;
the notes are in `docs/releases/v0.26.0.mdx` and credit 4 outside
contributors.

This is a minor: 7 `feat` commits, and dynamic tool loading drops two
environment variables and the old Beta toggle (listed under Breaking
Changes). Merging it moves main to 0.26.0 so `v0.26.0-rc1` can be tagged
right after v0.25.4 publishes. The changelog is regenerated before the
final.

## Test plan

- [x] `python util/validate_release_notes.py docs/releases/v0.26.0.mdx
--tag v0.26.0` passes, and with `--tag v0.26.0-rc1`
- [x] `mintlify validate` (from `docs/`) passes; the notes have no
unescaped `<` or `{`
- [x] Narrative word count is 391, under the 600 cap for a minor
- [x] `python util/release_versions.py --check`, `python
util/check_doc_links.py --internal-only` and `python
util/check_doc_versions.py` pass
- [x] `python util/check_component_core_api.py --release-version 0.26.0`
passes
- [x] `pytest tests/unit/test_docs_json_release.py
tests/unit/test_check_component_core_api.py
tests/unit/test_release_tag.py tests/unit/test_hub_core_version_gate.py
tests/unit/test_release_versions.py
hub/agents/gaia/python/tests/test_npm_doc_min_version.py`: 232 passed
- [ ] CI green on the merge commit
- [ ] `release_train_dryrun.yml` passes on that commit before the RC tag

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

- `test_release_versions.py` simulated a core bump to a hard-coded
`0.26.0`, which is a no-op once the tree is on 0.26.0. It now bumps to
the next minor above whatever the tree declares.
- The flagship agent stays at 0.3.5; its `amd-gaia` floors and
`min_gaia_version` move to 0.26.0 through `--stamp`, and its npm
CHANGELOG's `[Unreleased]` quotes the new minimum.
`hub/components/agent-ui/` is no longer published and is left alone.
- `RELEASED_DAEMON_API` no longer exists (amd#5394); the core API guard
reads released versions from PyPI.
</details>

## Evals to re-run on the RC tag

LLM-affecting PRs merged without per-PR evals; run these on
`v0.26.0-rc1`:

- `gaia_tool_selection`, `tool_selection`, `gaia_core` and
`context_retention` for dynamic tool loading (amd#6449, amd#6842)
- `gaia_media` and `gaia_voice` (amd#6451, amd#6489, amd#6825)
- `gaia_data` and `gaia_honesty` (amd#6828, amd#6831, amd#6817)
- `gaia_files` (amd#6844)
- `adversarial` (amd#6837)
- `memory` and `gaia_memory` (amd#6828, amd#6843)
- `gaia_email` (amd#6842)

## Release checklist

- [ ] Merge once v0.25.4 has published; amd#6114 (flagship follows core) is
not part of this release PR
- [ ] Freeze main, wait for green CI on the exact commit, pass
`release_train_dryrun.yml`, then push `v0.26.0-rc1` (the RC freezes its
own flagship; no agent release needed)
- [ ] Before the final: release the flagship from the release commit
(`agent-pkg-gaia-v<next>`), merge its pin-lock PR, and pass
`check_flagship_release.py`
- [ ] Regenerate the changelog if main gains commits before the final
tag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops DevOps/infrastructure changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant