Skip to content

fix(agent-server): share marketplace snapshot cache - #4785

Draft
Epochex wants to merge 1 commit into
OpenHands:mainfrom
Epochex:fix/4665-marketplace-skills
Draft

Epochex wants to merge 1 commit into
OpenHands:mainfrom
Epochex:fix/4665-marketplace-skills

Conversation

@Epochex

@Epochex Epochex commented Aug 31, 2026 •

Copy link
Copy Markdown

HUMAN:


AGENT:

Why

The skills marketplace path checked for marketplaces/default.json before manifest discovery. The current extensions repository publishes .plugin/marketplace.json, so a cold skills request could return an empty catalog while the plugins endpoint successfully loaded the same repository. The two endpoints also fetched and cached separate views.

Summary

  • Preserve successful public-skills sync invalidation across the shared skills/plugins snapshot after rebasing.

  • Add one manifest-first marketplace snapshot loader with explicit-path fallback.

  • Cache only successful snapshots and serialize cold loads to avoid duplicate fetches.

  • Derive skills and plugins from the same snapshot while computing installed state on every request.

Issue Number

Fixes #4665

How to Test

Validated on Linux after rebasing onto 59b2831c:

  • uv run pytest tests/agent_server/test_marketplace_snapshot.py tests/agent_server/test_skills_service.py tests/agent_server/test_plugins_service.py tests/agent_server/test_skills_router.py tests/agent_server/test_plugins_router.py -q — 113 passed, 1 failed. The existing TestSyncPublicSkills::test_sync_public_skills_reports_unreachable_origin fails at origin.rename(...) with a filesystem PermissionError; the same isolated test reproduces identically using an archived, unmodified upstream agent-server source tree.
  • The same five-file command with -k 'not test_sync_public_skills_reports_unreachable_origin' — 113 passed, 1 deselected.
  • uv run pre-commit run --files for all six changed Python files — all hooks passed.
  • Added success/failure sync regression: before the invalidation fix, successful sync returned the stale plugin name; after the fix, both skills and plugins catalogs refresh only on success.

The shared cache preserves upstream's strict sync behavior and invalidates all marketplace snapshots only after successful synchronization. Previous reviewer evidence against a real OpenHands/extensions checkout remains in the review; the current checks above use local manifests and mocks for repository fetching.

Video/Screenshots

Not applicable; this is backend catalog loading.

Design Doc

Not applicable; the change consolidates two existing private caches without changing REST schemas.

Type

  • Bug fix
  • Feature
  • Refactor
  • Breaking change
  • Docs / chore

Notes

The five-minute in-process TTL is unchanged. Failed fetches or parses are not cached, so the next request retries.

@enyst enyst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm an AI agent reviewing on behalf of Engel.

No code-level blocking finding in this draft. I ran the focused service suites (56 passed) and also exercised this head against a real checkout of OpenHands/extensions at 39fc25a: .plugin/marketplace.json loaded with no marketplaces/default.json, produced 64 skill-catalog entries and 8 true-plugin entries, and the two service calls shared one fetch. The successful-snapshot-only cache and fresh installed-state derivation match the issue acceptance criteria.

Before this leaves draft, the human author still needs to replace the HUMAN: placeholder in their own words, then run the full CI set. I did not edit that reserved section.

Co-authored-by: openhands <openhands@all-hands.dev>
@Epochex
Epochex force-pushed the fix/4665-marketplace-skills branch from ed16c7c to 504e8f8 Compare October 18, 2026 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Skills marketplace returns empty against the current extensions manifest layout

2 participants