Skip to content

fix(ci): drop stale gaia-emr smoke check + make PyPI publish idempotent - #1563

Merged
kovtcharov-amd merged 1 commit into
mainfrom
fix/publish-smoke-gaia-emr
Jun 10, 2026
Merged

kovtcharov-amd merged 1 commit into
mainfrom
fix/publish-smoke-gaia-emr

Conversation

@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

Why this matters

The v0.20.1 publish shipped the package to PyPI/npm but skipped creating the GitHub Release — the post-publish smoke test ran gaia-emr --help and failed with command not found (exit 127). gaia-emr moved to the standalone gaia-agent-emr hub package during the hub migration and is no longer a core-wheel console_script, so this check fails on every release now, and because the GitHub Release job needs the smoke test to pass, the release got skipped (had to be created manually).

Before: every release post-hub-migration fails the smoke test → no GitHub Release.
After: the smoke test only verifies core-wheel entry points (gaia, gaia-mcp), so it passes and the release publishes.

Also makes the PyPI publish idempotent (skip-existing: true): today a failure in any later stage can't be recovered by re-running the workflow, because the publish step dies on a duplicate upload of an already-published version. With skip-existing, a re-run skips the existing files and proceeds to the downstream stages (smoke test, GitHub Release).

Test plan

  • python -c "import yaml; yaml.safe_load(open('.github/workflows/publish.yml'))" — valid YAML
  • Confirmed gaia-emr is absent from core console_scripts (setup.py) — it ships with hub/agents/python/emr (gaia_agent_emr.cli:main)
  • Next release exercises the full publish → smoke → GitHub Release path end-to-end

Note: npm publish has the same non-idempotency (no clean skip-existing), left out of scope here.

The post-publish smoke test ran 'gaia-emr --help', but gaia-emr moved to
the standalone gaia-agent-emr hub package and is no longer a core-wheel
console_script -- so the step failed (exit 127) on every release after the
hub migration, which cascaded to skip the GitHub Release job (it needs
post-publish-smoke to succeed). Drop the gaia-emr check.

Also add skip-existing: true to the PyPI publish so a re-run after a
later-stage failure skips the already-uploaded version instead of dying on
a duplicate upload -- the publish steps were not idempotent, which is why a
failed run could not simply be re-run.
@github-actions github-actions Bot added the devops DevOps/infrastructure changes label Jun 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Review: fix(ci): drop stale gaia-emr smoke check + make PyPI publish idempotent

Approve. Two small, correct CI fixes that unblock the release pipeline — both verified against the actual codebase, no blocking issues.

Summary

The post-publish smoke test ran gaia-emr --help, but gaia-emr left the core wheel during the hub migration, so the check failed with exit 127 on every release and (because the GitHub Release job needs the smoke test) silently skipped the release. Dropping that line and keeping only gaia + gaia-mcp is exactly right: those are the only core-wheel console_scripts (setup.py:284-286). The skip-existing: true addition makes the PyPI publish re-runnable after a downstream-stage failure. Both changes are minimal, well-commented, and scope-clean.

Issues Found

None blocking.

🟢 Minor — gaia-cli not smoke-tested (.github/workflows/publish.yml:459) — setup.py also ships gaia-cli as a console_script. It shares the gaia.cli:main entry point with gaia, so verifying both is redundant and the omission is harmless — noting only for completeness, no change needed.

Strengths

  • Verified, not assumed. The claim that gaia-emr is no longer a core entry point checks out — setup.py:283-287 lists only gaia, gaia-cli, gaia-mcp, matching the comment's reference to the hub migration.
  • skip-existing: true is the correct idempotency primitive here, not a silent fallback in the CLAUDE.md sense. PyPI versions are immutable, so a re-run can only ever skip identical already-uploaded files — it can't mask a divergent upload — and it lets the smoke + GitHub Release stages recover from a transient downstream failure without a manual release.
  • Comments earn their place — each explains the why (what moved where, why re-runs need to be idempotent) rather than restating the YAML.
  • PR description correctly scopes out the parallel npm non-idempotency rather than over-reaching.

Verdict

Approve — ready to merge. The one open test-plan item (full publish → smoke → GitHub Release path) can only be exercised by the next real release, which is the natural validation point.

@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Jun 10, 2026
Merged via the queue into main with commit ab96d9f Jun 10, 2026
23 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the fix/publish-smoke-gaia-emr branch June 10, 2026 20:12
itomek added a commit that referenced this pull request Jun 10, 2026
Catch up with main (eval cost/TTFT harness #1546, OIDC publish-test fix #1576,
PyPI publish idempotency #1563). No conflicts.
noamsto pushed a commit to noamsto/nix-amd-ai that referenced this pull request Sep 5, 2026
…emoved (#111)

The wrapper pinned amd-gaia 0.17.6 (PyPI, 2026-05-07) and hard-coded five
console scripts. Two of them no longer exist.

Checked against the published wheels' entry_points.txt:

  0.17.6 - 0.20.0   gaia gaia-cli gaia-code gaia-emr gaia-mcp
  0.21.0 - 0.23.0   gaia gaia-cli gaia-mcp

gaia-emr and gaia-code went away in 0.21.0 (changelog: "drop stale gaia-emr
smoke check", amd/gaia#1563), so bumping the version alone would have kept
generating two wrappers that fail at run time with "executable not found".

Why the bump matters beyond the version number:

- 0.23.0 is an explicit security release. The confirmation gate that pauses an
  agent before it sends mail, writes a file or runs a command previously
  "worked only inside the Agent UI; from a terminal, the local API, or an MCP
  tool call those actions could run unprompted" -- and CLI entry points are
  exactly what this package exposes. It also binds the MCP bridge to 127.0.0.1
  instead of every interface, enforces its --auth-token instead of ignoring it,
  launches MCP servers without a shell, and blocks model-supplied SQL from
  reaching the database agent.
- 0.18.0 fixes a RAG-on-PDF timeout its notes attribute by name to 0.17.6, the
  version pinned here.
- 0.20.0 adds the NPU path (--device npu, gaia init --profile npu, FLM
  backend) and fixes a corrupt-model misdiagnosis that triggered a destructive
  ~25 GB re-download.

The [ui] extra and Requires-Python (>=3.10) are unchanged between the two
versions, also read from the wheel metadata.

Tested: nix build .#gaia yields gaia-0.23.0 with exactly those three scripts,
and each one runs -- gaia --help, gaia-cli --help and gaia-mcp --help all exit
0 against a throwaway uv cache. gaia-mcp now advertises --host and
--auth-token, matching the release notes.

Not included: adding gaia to scripts/check-updates.sh. It is untracked today,
which is how it drifted 121 days, but a version-only sed like the other
packages get would silently reintroduce this exact bug the next time upstream
changes its entry points. That needs a call on how much to automate, so it
belongs in an issue rather than riding along here.

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops DevOps/infrastructure changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants