Skip to content

fix(agents): the install hint names the tag a release candidate was cut from - #4868

Merged
kovtcharov-amd merged 1 commit into
amd:mainfrom
kovtcharov:kalin/install-hint-rc-tag
Oct 6, 2026
Merged

kovtcharov-amd merged 1 commit into
amd:mainfrom
kovtcharov:kalin/install-hint-rc-tag

Conversation

@kovtcharov

@kovtcharov kovtcharov commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

On a release candidate, the command GAIA prints to install or repair an agent names a git tag that doesn't exist, so following it fails. Since #4588 the command pins to v<installed core version>; an RC installs as 0.25.0rc1 but is tagged v0.25.0-rc1 (#4856). The pin now uses the tag the core was actually released from, and a dev build, which has no tag, keeps tracking trunk. Final releases are unchanged.

This needs to be in before the first v0.25.0-rc tag, or every RC tester who needs the chat or flagship agent is handed a command that errors.

Test plan

  • pytest tests/unit/agents/test_install_hints.py — 39 passed; covers final, four-part, RC and dev versions, and checks the RC mapping against util/release_tag.py so the two can't drift
  • pytest tests/unit -k "install_hint or not_installed or source_install or release_tag" — 95 passed
  • On an RC install with no agent wheel, gaia chat prints a command ending in @v0.25.0-rc1#subdirectory=… and that command installs

@github-actions github-actions Bot added tests Test changes agents labels Oct 6, 2026
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Verdict: Approve

On a release candidate, the "install or repair this agent" command now names the git tag that actually exists (v0.25.0-rc1, not v0.25.0rc1), so RC testers get a command that works. Dev builds, which have no tag, now track trunk, and final releases behave the same as before. The change is small and correct, and a test checks the RC mapping against the release tooling so the two can't drift apart. Nothing blocks it.

The one unchecked test-plan item, running the printed command on a real RC install, can only happen once an RC tag exists. Run it on v0.25.0-rc1 before announcing the RC.

Real-world evidence

N/A: no evidence bundle was produced for this run. The verdict rests on static review alone. The changed surface is the install command GAIA prints to the CLI, and the PR leaves its end-to-end check unchecked until an RC tag exists.

🔍 Technical details

Issues found

🟢 Test-module CHAT_SPEC would render @None on an untagged core (tests/unit/agents/test_install_hints.py:33): _core_release_tag returns None for a dev/local version. Production code maps that to an empty ref, but this constant interpolates it directly, so the three tests that compare against CHAT_SPEC would fail confusingly on a .dev install. Today that can't happen, because version.py is static. Mirroring the production logic keeps it robust:

_CORE_TAG = install_hints._core_release_tag(importlib.metadata.version("amd-gaia"))
CHAT_SPEC = (
    "gaia-agent-chat @ git+https://github.com/amd/gaia.git"
    f"{'@' + _CORE_TAG if _CORE_TAG else ''}"
    "#subdirectory=hub/agents/chat/python"
)

Strengths

  • _core_release_tag mirrors FINAL_TAG_RE and RC_TAG_RE in util/release_tag.py exactly, including the four-part hotfix case and rc numbering that starts at 1.
  • test_rc_tag_agrees_with_the_release_tooling round-trips through parse_tag(...).pep440_version. That catches the real drift risk, not just a copy of the regex. The sys.modules registration and cleanup for the dataclass import is handled correctly.
  • Unrecognised versions (dev, local +g…) get no pin instead of a tag that doesn't exist, which is the right failure mode for a printed command.

…ut from

The command GAIA prints to install or repair an agent pinned to v<installed core version>. A release candidate installs as X.Y.ZrcN but is tagged vX.Y.Z-rcN, so on an RC the command named a tag that does not exist. The pin now maps the installed version to its release tag; a dev build has no tag and keeps tracking trunk.
@kovtcharov
kovtcharov force-pushed the kalin/install-hint-rc-tag branch from ab2c046 to b9a5cad Compare October 6, 2026 09:53
@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Oct 6, 2026
Merged via the queue into amd:main with commit f682f90 Oct 6, 2026
@kovtcharov-amd
kovtcharov-amd deleted the kalin/install-hint-rc-tag branch October 6, 2026 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants