Skip to content

fix(cli): agent list shows the installed version; imported skills don't fail skill list - #5601

Merged
kovtcharov-amd merged 3 commits into
amd:mainfrom
kovtcharov:kalin/fix-5576-cli-polish
Oct 23, 2026
Merged

kovtcharov-amd merged 3 commits into
amd:mainfrom
kovtcharov:kalin/fix-5576-cli-polish

Conversation

@kovtcharov

Copy link
Copy Markdown
Contributor

Three CLI messages told a new user something untrue. gaia agent list showed gaia 0.3.0 [installed] when 0.3.1 was installed. gaia skill list exited 4 because a skill in someone else's ~/.claude/skills had a non-SemVer version, and the agent logged it at ERROR on every turn. install.sh said gaia init "asks for your password", which it doesn't on macOS or Linux. Each now says what's true.

Found testing v0.25.1-rc5 on macOS. Part of #5576.

Test plan

  • pytest tests/unit/test_skills_cli.py tests/unit/test_skills_manager.py tests/installer: 105 passed, 11 skipped; the 5 new tests fail on main.
  • Live on the rc5 install: gaia agent list → gaia 0.3.1+v0.25.1-rc5 [installed; catalog latest 0.3.0]; gaia skill list exit 4 → 0, with the three broken imported skills listed on stderr.
  • sh -n and shellcheck clean on install.sh.
🔍 Technical details

A broken skill under the read-only claude-import roots is a warning (stderr, import_errors in --json, logged once per process); one in GAIA's own user or agent-bundled roots still exits 4. discovery_errors still returns every error, so the Agent UI and the agent's list tool keep showing them. install.sh also drops the "one step later needs your password" warning: gaia init installs the embedded Lemonade without sudo on both platforms.

…'t fail skill list

`gaia agent list` printed the catalog's latest version beside `[installed]`, so a
machine running gaia 0.3.1 read "gaia 0.3.0 [installed]". It now shows the version
on disk and names the catalog's latest when the two releases differ.

`gaia skill list` exited 4 whenever a skill under the read-only ~/.claude/skills
import root failed to parse, e.g. another tool's non-SemVer `version: '1.0'`. Those
folders are now listed as a warning (and as `import_errors` in --json) and the
command exits 0; a malformed skill in GAIA's own roots still exits 4. Discovery logs
each broken import once per process at WARNING instead of at ERROR on every turn.

install.sh no longer says `gaia init` needs a password: init installs GAIA's own
embedded Lemonade on Linux and macOS with no sudo.

Part of amd#5576
@github-actions github-actions Bot added documentation Documentation changes installer Installer changes cli CLI changes tests Test changes labels Oct 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve with suggestions

This fixes three CLI messages that told new users something untrue. gaia agent list now shows the version actually installed. A broken skill in another tool's ~/.claude/skills folder is now a warning instead of making gaia skill list exit 4, and it is logged once instead of on every turn. And install.sh no longer says gaia init will ask for a password. The logic is right, and every doc that describes the exit-code rule was updated in the same change. Nothing blocks merge.

Two small cleanups, both optional:

  • The new installer test fails if the word "password" ever shows up anywhere in install.sh, even in an unrelated comment. Matching the two removed phrases would be safer.
  • When the catalog entry has no version, an installed agent shows [installed; catalog latest ?].

Real-world evidence

N/A: no evidence bundle was produced for this run. The PR description includes live output from the rc5 install (gaia agent list → gaia 0.3.1+v0.25.1-rc5 [installed; catalog latest 0.3.0], and gaia skill list going from exit 4 to exit 0), which covers the CLI surfaces. I couldn't re-run the tests here because pytest isn't installed on this runner, so the verdict rests on static review plus the author's results.

🔍 Technical details

Issues found

🟢 Brittle negative assertion (tests/unit/installer/test_install_scripts_terminal_hub.py:424): "password" not in sh_text.replace("no password needed", "") fails on any later, legitimate use of the word, such as a comment about a sudo-free path. Asserting on the removed claims pins the regression without that false-positive risk:

    assert "asks for your password" not in sh_text
    assert "needs your password" not in sh_text
    assert "via sudo" not in sh_text

🟢 Missing catalog version reads as a mismatch (src/gaia/cli.py:8578): ver falls back to "?", so an installed agent whose catalog entry has no latest_version shows [installed; catalog latest ?]. A ver != "?" guard on the mismatch branch would show a plain [installed] in that case.

Checked and fine

  • gaia init takes the embedded-Lemonade path by default (_start_embedded_server in init_command.py). The sudo paths in lemonade_installer.py are only for a user-managed install, so the new "no password needed" line is accurate.
  • discovery_errors still returns every error. The Agent UI and the agent's list tool keep seeing broken imports, and the CLI is the only place they get demoted. Nothing in src/, hub/ or tui/ reads the errors key from skill list --json, so splitting out import_errors breaks no consumer.
  • The once-per-process warning is guarded by a lock. The (path, message) key means a skill that breaks in a new way warns again, which is the right behavior.

Strengths

  • The exit-4 behavior for GAIA's own roots is kept and tested side by side with a broken import (test_list_still_fails_on_a_broken_user_skill_beside_a_broken_import), so the fail-loudly contract is narrowed exactly, not weakened.
  • All three docs that state the exit-code rule (cli.mdx, agent-skills.mdx, skill-format.mdx) were updated together.
  • The build-metadata comparison (0.3.1+v0.25.1-rc5 vs 0.3.1) has its own test, so an rc install doesn't show a false "catalog latest" mismatch.

Also narrow the install.sh test to the two removed phrases, so an
unrelated mention of "password" can't fail it.
@kovtcharov

Copy link
Copy Markdown
Contributor Author

The four installer-journey failures aren't from this PR's install.sh change: every phase passes on all three rows (install, launch, health, preflight, uninstall, leftovers — mac-x64, ubuntu22 install-sh and tui-deb). The rows fail only on the stale known-bug entries for #5526 and #5529 ("known bug … no longer reproduces"), which #5606 removes. A re-run after #5606 merges should go green.

kovtcharov-amd pushed a commit that referenced this pull request Oct 23, 2026
…5606)

The installer journeys now fail every PR that runs them, with "known bug
#5526 no longer reproduces" (ubuntu22 install-sh and tui-deb) and "known
bug #5529 no longer reproduces" (mac-x64 install-sh). Both bugs are
fixed — #5526 is closed and #5529 was fixed by #5546 — but their entries
in `known_failures.json` still expect the old failure. This removes
those two entries, as the file's own instructions ask.

## Test plan
- [x] `pytest tests/unit/installer/test_installer_headless.py` passes.
- [ ] The installer journeys go green on this PR (they failed on #5597
and #5601 with the messages above).

Co-authored-by: Kalin Ovtcharov <[email protected]>
@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Oct 23, 2026
Merged via the queue into amd:main with commit 440e80b Oct 23, 2026
77 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the kalin/fix-5576-cli-polish branch October 23, 2026 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI changes documentation Documentation changes installer Installer changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants