test(skills): stop asserting the ClawHub owner lookup rides the pool
Its only production caller submits it to a bare ThreadPoolExecutor, which does not inherit the ContextVar, so in production it stays a one-shot GET (same as main). The same-thread assertion proved a path production never takes; the accessor change in c2b2ad8316 is kept so it pools if that executor ever copies context.
This commit is contained in:
@@ -286,7 +286,7 @@ def test_resolve_keeps_catalog_meta_when_later_sources_do_not_fetch():
|
||||
|
||||
|
||||
def test_inspect_reuses_one_ssrf_safe_client_for_metadata_and_bundle(monkeypatch, tmp_path):
|
||||
"""A preview's sequential resolver calls must share its guarded connection pool."""
|
||||
"""A preview's (and an install's) sequential resolver calls must share one guarded connection pool."""
|
||||
import hermes_cli.skills_hub as cli_hub
|
||||
import tools.skills_hub as hub
|
||||
import tools.skills_hub_search as search
|
||||
@@ -320,8 +320,6 @@ def test_inspect_reuses_one_ssrf_safe_client_for_metadata_and_bundle(monkeypatch
|
||||
hub._guarded_http_get("https://example.com/metadata")
|
||||
# The Hermes-index fetch must ride the same pool (no cache → real GET).
|
||||
assert search._load_hermes_index() == {"skills": []}
|
||||
# The ClawHub owner lookup must ride the same pool too.
|
||||
assert clawhub.ClawHubSource()._fetch_owner_handle("slug") is None
|
||||
return SkillMeta("example", "metadata", "test", "example/id", "community")
|
||||
|
||||
def fetch(self, _identifier):
|
||||
|
||||
Reference in New Issue
Block a user