Skip to content

fix(skills): prefer stable releases unless prereleases are requested - #5755

Merged
kovtcharov-amd merged 1 commit into
amd:mainfrom
maheshrijal:fix/skill-prerelease-resolution
Oct 26, 2026
Merged

kovtcharov-amd merged 1 commit into
amd:mainfrom
maheshrijal:fix/skill-prerelease-resolution

Conversation

@maheshrijal

Copy link
Copy Markdown
Contributor

Summary

Prefer stable skill releases unless the version range explicitly opts into a prerelease. Unrestricted installs still accept prereleases when no stable release exists.

Why

Publishing a beta could make ordinary installs select it over the latest stable release.

Linked issue

Closes #4833

Changes

  • Apply the same prerelease rules during installation and installed-skill checks, including explicit ^ / ~ pins.
  • Add regression coverage and update the version-selection documentation.

Test plan

  • python -m pytest tests/unit/test_skills_marketplace.py tests/unit/test_skills_install.py tests/unit/test_skills_consume.py — 218 passed; 21 regression cases fail before the fix.
  • GAIA_MEMORY_DISABLED=1 python -m pytest tests/unit/ -n 4 --dist=worksteal --timeout=180 — 27,580 passed, 12 failed, 428 skipped. All 12 failures reproduce on unchanged main.
  • python util/lint.py --all — same two existing Pylint errors and type-warning count as main. The changed module passes targeted Pylint and mypy checks.

Evidence

Five cold CLI installs against a temporary local HTTP catalog passed: unrestricted, stable range, caret range, explicit release candidate, and prerelease-only catalog.

With 1.9.0 and 2.0.0-beta.1 available, gaia skill install prerelease-probe --hub-url <local-test-hub> --allow-experimental --json returned these JSON excerpts:

Before: "version": "2.0.0-beta.1"
After:  "version": "1.9.0"

Agent UI, MCP and HTTP API surfaces: N/A; this changes skill version selection.

Checklist

  • Linked an issue and explained the reason for the change.
  • Ran lint and tests locally; baseline failures are noted above.
  • Included CLI evidence and marked other surfaces N/A.
  • Updated documentation for the behavior change.

@github-actions github-actions Bot added documentation Documentation changes tests Test changes labels Oct 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve with suggestions

Publishing a beta no longer pulls ordinary skill installs onto it. Plain installs pick the newest stable release and fall back to a prerelease only when nothing stable exists. Pinned ranges admit a prerelease only when the pin names one, which is how npm-style SemVer behaves. The logic is correct, well tested, and the docs are updated in both places that described the old rule.

Nothing blocks merge. One thing to tighten:

  • The new rejection reads as a contradiction. A user with 1.3.0-rc.2 installed, or with only 2.0.0-beta.1 published, will now see "does not satisfy >=1.0.0", which looks wrong at first glance. Both error messages should say that prereleases need an explicit opt-in, and give an example pin. This matters most for anyone who already has a prerelease installed under a ranged pin: their agent will now refuse to start where it used to load.

Real-world evidence

N/A here: no evidence bundle was produced for this run. The PR description includes the author's own CLI evidence: five cold gaia skill install runs against a local catalog, with the before/after excerpt (2.0.0-beta.1 → 1.9.0). That matches the only surface this changes, and other surfaces are reasonably marked N/A. I could not run the tests in this review environment (pytest and dependencies are not installed), so beyond the author's reported runs the verdict rests on static review.

🔍 Technical details

Issues

🟢 Error messages don't explain the prerelease rule (src/gaia/skills/consume.py:150, src/gaia/skills/hub.py:261)
When the only reason for a mismatch is that the candidate is a prerelease, both messages say it "does not satisfy" a range it numerically falls inside. Add a hint along these lines (shown for hub.py, and the same idea applies to the consume conflict):

            raise SkillNotFoundError(
                f"No published version of skill '{self.name}' satisfies {wanted!r}. "
                f"Published: {', '.join(available) or '(none)'}. Prereleases match a "
                f"range only when it names one (e.g. '>=1.3.0-rc.1'). Loosen the pin, or "
                f"run 'gaia skill info {self.name} --remote' to see the versions. "
                f"See {_DOCS}"
            )

This change also matters for upgrades: a required skill installed at a prerelease and pinned by a manifest range like >=1.0.0 now raises Version conflict when the agent is constructed. That is intended, but worth one line in the release notes.

🟢 assert used for control flow (src/gaia/skills/versions.py:161)
Python drops assert under -O. It is harmless here because _OPERATOR_RE matches any non-empty clause, but _matches_clause already handles the same case with an explicit raise marked # pragma: no cover. Reusing that pattern, or letting _matches_clause return the parsed target, would keep the module consistent.

Strengths

  • Comparing ^/~ against the full target rather than its numeric core fixes a separate bug: ^1.3.0-rc.1 used to reject 1.3.0-rc.2.
  • The test matrix is thorough, covering build metadata (+build-5), cross-core prereleases (1.3.1-rc.1 vs >=1.3.0-rc.1), prerelease-only catalogs, and parse errors re-run on prerelease inputs.
  • Install (resolve) and the installed-skill check (matches) share one rule, so the CLI and agent manifests can't disagree.

@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

Thanks for catching this and for the thorough test matrix. Stable-over-prerelease selection now works for installs and for installed-skill checks, and I verified the 21 new cases fail on main and pass here.

The review bot's two notes are non-blocking polish, so I'm leaving them for a follow-up rather than re-running CI on this branch:

  • When a prerelease is rejected, the "does not satisfy" error could mention that prereleases need an explicit pin such as >=1.3.0-rc.1.
  • The assert in matches could become an explicit raise.
🔍 Technical details

The assert is unreachable in practice because _OPERATOR_RE matches any non-empty clause. Error-message hints would live in consume.py and hub.py.

@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Oct 26, 2026
Merged via the queue into amd:main with commit c30ad27 Oct 26, 2026
31 checks passed
@maheshrijal
maheshrijal deleted the fix/skill-prerelease-resolution branch October 26, 2026 10:28
@kovtcharov-amd kovtcharov-amd mentioned this pull request Oct 26, 2026
5 of 9 tasks
grtninja pushed a commit to grtninja/gaia that referenced this pull request Oct 26, 2026
## Why this matters

v0.25.2 is a bug-fix release on top of v0.25.1: setup and install no
longer stop at the first failed step, shell and file access handle
Windows paths and text encodings, the Agent UI and desktop app stop
showing misleading states, and document search, email and skills each
lose a handful of rough edges. 55 commits since v0.25.1; notes are in
`docs/releases/v0.25.2.mdx` and credit 15 outside contributors.

## Test plan

- [x] `python util/validate_release_notes.py docs/releases/v0.25.2.mdx
--tag v0.25.2` passes
- [x] `mintlify validate` (from `docs/`) passes
- [x] `python util/check_doc_links.py --internal-only`, `python
util/check_doc_versions.py` and `node
installer/version/bump-ui-version.mjs --check` pass
- [x] `python util/check_component_core_api.py --release-version 0.25.2`
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`: 156 passed
- [ ] CI green on the merge commit
- [ ] `release_train_dryrun.yml` passes on that commit before the RC tag

## Evals to re-run on the RC tag

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

- `gaia_shell` and shell/safety (amd#5794, amd#5751, amd#5768)
- `gaia_honesty` (amd#5753)
- `gaia_skills_tasks` and `gaia_skills_lifecycle` (amd#5422, amd#5755)
- `rag_retrieval` and `rag_quality` (amd#5742, amd#5754, amd#5761, amd#5817, amd#5812)
- email scenarios (amd#5767, amd#5811)
- `tool_selection` and `error_recovery` (amd#5732)
- Claude provider thinking replay (amd#5072)
- memory categories (amd#5818 merged; amd#5756 has not)

## Release checklist

- [ ] Freeze main, wait for green CI on the exact commit, pass
`release_train_dryrun.yml`, then push `v0.25.2-rc1`
- [ ] Extend the changelog if main gains commits before the tag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Documentation changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gaia skill install picks a pre-release over the latest stable version

2 participants