Skip to content

fix(catalog): search ranks the real server first against the live registry (Spec fix-catalog-rank) - #1469

Merged
github-actions[bot] merged 6 commits into
mainfrom
fix-catalog-live-ranking
Oct 2, 2026
Merged

github-actions[bot] merged 6 commits into
mainfrom
fix-catalog-live-ranking

Conversation

@Dumbris

@Dumbris Dumbris commented Oct 2, 2026

Copy link
Copy Markdown
Member

What changes for users

Catalog search for github now puts GitHub's own server first on every surface. Before, the official registry's alphabetical io.github.* page decided what was fetched, so the real server never appeared.

  • Web, macOS, CLI, MCP, REST (one Go path): a typed query is fetched wide and ranked before it is cut to limit. Results are ordered by how well the name matches (the publisher equals the query, an exact name, a name prefix, a name word, a substring or description, and last a match through the namespace alone), then official source, verified publisher, popularity, title. A namespace-only match such as io.github.06ketan/slideshot ranks last.
  • Official protocol only: a typed search also asks the registry for the owner (.github/) and name-prefix (/github) queries, one page each, concurrently. The registry only matches server.name, so a multi-word query also searches its hyphenated phrase. If the main query times out, the expansion hits are still shown.
  • verified is narrower: it is true for a built-in official-protocol entry only when the publisher's namespace owns the source repository. A re-publisher or an entry that names someone else's repo is not verified. official keeps meaning "from a built-in source".
  • Titles and descriptions: the server's own title is shown ("GitHub" rather than the reverse-DNS name), and the "No description available" placeholder is now empty.
  • Stars: GitHub stars count only for the publisher's own repo. A typed query asks GitHub about at most limit repos, best-ranked first, so one search cannot spend the hourly budget.
  • Popular: de-duplicates by normalized title as well as repo (reference fetch and Docker mcp/fetch are one entry).
  • Slow registry: a fetch that outlives the 5 s budget now finishes in the background (30 s, at most 2 per source) and refreshes the listing cache, so the next search is answered from it. The "timeout after 5s" notice and the cached-fallback contract are unchanged.
  • Web and macOS cards: no per-card "Official" badge (every default source is official, so it carried no signal); they show Verified, and the Web card also shows "by " and stars or installs. macOS publisher and popularity lines are a follow-up.
  • CLI: catalog search help text describes the new order. No flag or column changed. REST and MCP wire shapes are unchanged (no field added or removed); only the values of verified, title and description and the result order change.

Audit findings fixed

C1 (catalog ranking), found not fixed in the final done-check. Also closes the SC-008 gap: the old hand-written fixture hid the live bug, so the fixture is now recorded from the live registry.

Spec

specs/109-ux-navigation-consistency (spec US5, FR-060, FR-061, SC-008, edge cases; data-model §9; contracts; research D36; plan; tasks Phase 16 T166-T175; quickstart recipe; parity matrix row 14; acceptance index SC-008). Spec 110 gets an amendment line. Docs: docs/api/rest-api.md, docs/cli/catalog-commands.md, docs/features/catalog-popularity.md.

Tests added

  • internal/registries: recorded_registry_test.go (fake registry semantics, and a test that proves the live bug on the recorded corpus), official_catalog_test.go, search_catalog_test.go, catalog_hit_signals_test.go, catalog_rank_tier_test.go, catalog_typed_test.go, catalog_warm_behind_test.go (run under -race -count=20 and GOMAXPROCS=1).
  • The SC-008 fixture catalog_github_order.json is the union of three real registry responses recorded 2026-10-02 (RECORD_LIVE_REGISTRY=1 re-records it). The REST, MCP, CLI, vitest and XCTest legs replay it.
  • Web: catalog-card-signals.spec.ts, extended add-server-catalog.spec.ts and catalog-order-parity.spec.ts. macOS: testCardShowsVerifiedNotOfficialBadge and extended parity assertions.

Deviations from the plan (recorded in research D36)

  • Namespace owner is the user of io.github.<user>, otherwise the second DNS label, not the last label. The last-label rule made com.quranmajeed.time/prayer-times an owner match for time and ranked it above the reference and Docker time; this also fixes the publisher shown on the card.
  • The internal stars flag is starsBorrowed (the negation of "eligible"), so hand-built hits stay eligible and existing tests keep their meaning.
  • catalog-order-parity.spec.ts counted every catalog-result-* node as a card; its filter now also excludes the new publisher and popularity ids.
  • TestSearchAll_PerformanceBudget closes its hung server before Close, because timed-out fetches now keep their connections until released.

Follow-ups (low)

  • The MCP search_servers tool description still says "official-first"; it is frozen by three schema goldens, so changing it means regenerating them.
  • macOS card publisher and popularity lines (FR-061 parity).
  • Docker source pagination (Spec 110 FR-005 known limitation).
  • The GitHub server's OCI package wins over its remote endpoint when installing; check whether the official-protocol install should prefer the remote.

… and name-prefix queries (Spec fix-catalog-rank)

The official registry's search matches server.name only, in byte order, 100 per
page, so a typed query never reached the real server (audit C1). Rank now puts
a name-match tier first, a typed query fetches the owner and name-prefix
queries too and ranks before truncating, verified means the publisher owns the
repository, GitHub stars count only for the publisher's own repo, and a fetch
that outlives the 5 s budget warms the listing cache in the background.
…ead of an Official badge (Spec fix-catalog-rank)
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Deploying mcpproxy-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: fa25b51
Status: ✅  Deploy successful!
Preview URL: https://e4cd342a.mcpproxy-docs.pages.dev
Branch Preview URL: https://fix-catalog-live-ranking.mcpproxy-docs.pages.dev

View logs

…ds a real owner match

R3.1 (medium, confirmed): when the main official-registry query landed inside
the 5s budget but an expansion was still running, SearchAll returned no hits
and marked the source unavailable. The progress snapshot now includes the
landed main query, and a budget expiry after the main query landed returns its
hits with no error (D36.2); the fetch keeps warming the cache behind.

O1 (medium, confirmed): publisherOwnsRepo's substring rule let com.hub verify
against github/github-mcp-server. A domain label must now equal the repo
owner, be a whole -/_ token of it, or be a 5+ character brand with a prefix or
suffix of at most 4 characters (notion of makenotion). Spec D36.5 and the REST
contract text updated.
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

📦 Build Artifacts

Workflow Run: View Run
Branch: fix-catalog-live-ranking

Available Artifacts

  • archive-darwin-amd64 (31 MB)
  • archive-darwin-arm64 (28 MB)
  • archive-linux-amd64 (19 MB)
  • archive-linux-arm64 (17 MB)
  • archive-windows-amd64 (31 MB)
  • archive-windows-arm64 (27 MB)
  • frontend-dist-pr (0 MB)
  • installer-dmg-darwin-amd64 (27 MB)
  • installer-dmg-darwin-arm64 (24 MB)
  • smart-mcp-proxymcpproxy-goWJ8EAH.dockerbuild (0 MB)

How to Download

Option 1: GitHub Web UI (easiest)

  1. Go to the workflow run page linked above
  2. Scroll to the bottom "Artifacts" section
  3. Click on the artifact you want to download

Option 2: GitHub CLI

gh run download 37025007012 --repo smart-mcp-proxy/mcpproxy-go

Note: Artifacts expire in 14 days.

@codecov-commenter

codecov-commenter commented Oct 2, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 95.62363% with 20 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/registries/official.go 93.79% 5 Missing and 3 partials ⚠️
internal/registries/catalog.go 96.77% 2 Missing and 3 partials ⚠️
internal/registries/catalog_warm_behind.go 95.16% 3 Missing ⚠️
internal/registries/search.go 96.07% 1 Missing and 1 partial ⚠️
internal/registries/testhooks.go 96.49% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved (Model B): Paperclip review verdicts = ACCEPT and qa-gate green at this head SHA. Arming auto-merge; GitHub merges when all required checks pass.

@github-actions
github-actions Bot merged commit 33a9607 into main Oct 2, 2026
62 checks passed
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.

2 participants