fix(skills-hub): widen identifier-dedup to GitHubSource + fix test patch 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.
This commit is contained in:
Teknium
2026-05-20 14:23:17 -07:00
parent 8f92327891
commit c6a380eb6c
2 changed files with 10 additions and 6 deletions

View File

@@ -555,7 +555,9 @@ def test_browse_skills_dedup_uses_identifier_not_name(monkeypatch):
"search": lambda self, q, limit=500: [airbnb, booking],
})()
with patch("hermes_cli.skills_hub.create_source_router", return_value=[mock_src]):
# browse_skills() imports create_source_router locally from tools.skills_hub,
# so the patch must target the source module, not hermes_cli.skills_hub.
with patch("tools.skills_hub.create_source_router", return_value=[mock_src]):
result = browse_skills(page=1, page_size=50)
names = [item["name"] for item in result["items"]]