Skip to content

fix(skills-hub): deduplicate search results by identifier, not name#29441

Closed
EloquentBrush0x wants to merge 2 commits into
NousResearch:mainfrom
EloquentBrush0x:fix/browse-sh-dedup-v2
Closed

fix(skills-hub): deduplicate search results by identifier, not name#29441
EloquentBrush0x wants to merge 2 commits into
NousResearch:mainfrom
EloquentBrush0x:fix/browse-sh-dedup-v2

Conversation

@EloquentBrush0x

@EloquentBrush0x EloquentBrush0x commented May 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • unified_search(), do_browse(), and browse_skills() all used r.name as the dedup key when merging results from multiple skill sources
  • Browse.sh exposes skills by task name (e.g. search-listings), which is not unique — Airbnb, Booking.com, Zillow, and dozens of other sites all publish skills with the same task name
  • This caused silent data loss: only the first skill with a given name survived; every other site's variant was discarded

Root cause (three locations):

# before — r.name is "search-listings" for every browse-sh site
if r.name not in seen:
    seen[r.name] = r

Fix — use r.identifier, which is always globally unique:

# after — r.identifier is "browse-sh/airbnb.com/search-listings-ddgioa"
if r.identifier not in seen:
    seen[r.identifier] = r

Files changed

  • tools/skills_hub.pyunified_search() dedup key: r.namer.identifier
  • hermes_cli/skills_hub.pydo_browse() and browse_skills() dedup key: r.namer.identifier
  • tests/tools/test_skills_hub.py — updated 4 existing dedup tests; added regression test for browse-sh same-name/different-site case
  • tests/hermes_cli/test_skills_hub.py — regression test for browse_skills() programmatic API

Test plan

  • TestUnifiedSearchDedup — all 8 tests pass (including test_browse_sh_same_name_different_site_not_deduped)
  • TestBrowseShSource — all 7 tests pass
  • test_browse_skills_dedup_uses_identifier_not_name — passes

Browse.sh exposes skills by task name (e.g. "search-listings"), which is
shared across hundreds of sites. Deduplicating by name silently dropped
every browse-sh skill after the first one with a given task name — e.g.
only Airbnb's "search-listings" would survive, collapsing Booking.com,
Zillow, and every other site's variant into nothing.

Switch unified_search() and do_browse() to use r.identifier as the dedup
key. identifier is always globally unique (e.g.
"browse-sh/airbnb.com/search-listings-ddgioa"), so same-named skills from
different browse-sh hostnames are preserved as distinct results.

Update existing TestUnifiedSearchDedup tests to model the real scenario
(same identifier appearing from two sources) and add a regression test
that asserts browse-sh skills with the same name but different hostnames
are never collapsed.
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard comp/tools Tool registry, model_tools, toolsets tool/skills Skills system (list, view, manage) labels May 20, 2026
browse_skills() is the TUI gateway's API for the web UI skills browser
(tui_gateway/server.py:6574). It had the same dedup-by-name bug as
do_browse() and unified_search() fixed in the parent commit: r.name is
not unique for browse-sh skills (Airbnb, Booking.com, Zillow all publish
"search-listings"), so the dedup loop silently dropped all but the first
skill with each task name.

Switch to r.identifier, which is always globally unique.

Add a regression test asserting that two browse-sh skills with the same
name but different hostnames both appear in the browse_skills() result.
teknium1 added a commit that referenced this pull request May 20, 2026
…tch path

Sibling fix on top of @EloquentBrush0x's PR #29441.

- tools/skills_hub.py GitHubSource.search() had the same r.name dedup bug.
  Two configured GitHub taps publishing same-named skills would collapse to one.
- tests/hermes_cli/test_skills_hub.py:test_browse_skills_dedup_uses_identifier_not_name
  patched hermes_cli.skills_hub.create_source_router, but browse_skills() imports
  it locally from tools.skills_hub. Fixed patch path.
@teknium1

Copy link
Copy Markdown
Contributor

Merged via PR #29490. Your two commits were cherry-picked onto current main with your authorship preserved (rebase-merge). We added a small fixup on top: widened the same identifier-dedup fix to GitHubSource.search() (line 386 had the identical bug), and fixed the patch path on test_browse_skills_dedup_uses_identifier_not_name (was patching hermes_cli.skills_hub.create_source_router but browse_skills() imports it locally from tools.skills_hub). Thanks for the catch — silently dropping every browse-sh site after the first was a nasty bug.

Lillard01 pushed a commit to Lillard01/hermes-agent that referenced this pull request May 21, 2026
…tch path

Sibling fix on top of @EloquentBrush0x's PR NousResearch#29441.

- tools/skills_hub.py GitHubSource.search() had the same r.name dedup bug.
  Two configured GitHub taps publishing same-named skills would collapse to one.
- tests/hermes_cli/test_skills_hub.py:test_browse_skills_dedup_uses_identifier_not_name
  patched hermes_cli.skills_hub.create_source_router, but browse_skills() imports
  it locally from tools.skills_hub. Fixed patch path.
Gpapas pushed a commit to Gpapas/hermes-agent that referenced this pull request May 23, 2026
…tch path

Sibling fix on top of @EloquentBrush0x's PR NousResearch#29441.

- tools/skills_hub.py GitHubSource.search() had the same r.name dedup bug.
  Two configured GitHub taps publishing same-named skills would collapse to one.
- tests/hermes_cli/test_skills_hub.py:test_browse_skills_dedup_uses_identifier_not_name
  patched hermes_cli.skills_hub.create_source_router, but browse_skills() imports
  it locally from tools.skills_hub. Fixed patch path.
Mucky010 pushed a commit to Mucky010/hermes-agent that referenced this pull request May 24, 2026
…tch path

Sibling fix on top of @EloquentBrush0x's PR NousResearch#29441.

- tools/skills_hub.py GitHubSource.search() had the same r.name dedup bug.
  Two configured GitHub taps publishing same-named skills would collapse to one.
- tests/hermes_cli/test_skills_hub.py:test_browse_skills_dedup_uses_identifier_not_name
  patched hermes_cli.skills_hub.create_source_router, but browse_skills() imports
  it locally from tools.skills_hub. Fixed patch path.
Bryce-huang pushed a commit to wbkunlun/hermes-agent that referenced this pull request May 29, 2026
…tch path

Sibling fix on top of @EloquentBrush0x's PR NousResearch#29441.

- tools/skills_hub.py GitHubSource.search() had the same r.name dedup bug.
  Two configured GitHub taps publishing same-named skills would collapse to one.
- tests/hermes_cli/test_skills_hub.py:test_browse_skills_dedup_uses_identifier_not_name
  patched hermes_cli.skills_hub.create_source_router, but browse_skills() imports
  it locally from tools.skills_hub. Fixed patch path.

#AI commit#
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
…tch path

Sibling fix on top of @EloquentBrush0x's PR NousResearch#29441.

- tools/skills_hub.py GitHubSource.search() had the same r.name dedup bug.
  Two configured GitHub taps publishing same-named skills would collapse to one.
- tests/hermes_cli/test_skills_hub.py:test_browse_skills_dedup_uses_identifier_not_name
  patched hermes_cli.skills_hub.create_source_router, but browse_skills() imports
  it locally from tools.skills_hub. Fixed patch path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/tools Tool registry, model_tools, toolsets P2 Medium — degraded but workaround exists tool/skills Skills system (list, view, manage) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants