Files
hermes-agent/tests/gateway/fixtures
Teknium bc9f212dea test(gateway): every daemon-backed probe serves a seeded models.dev cache instead of fetching it
Mechanism: the shared daemon() fixture starts gateway daemons in a fresh
HERMES_HOME with no models.dev disk cache. Probes whose first session.create
or turn reaches a provider lookup (tool availability -> vision check ->
is_routing_aggregator -> get_provider -> fetch_models_dev) download
https://models.dev/api.json in the foreground with only a per-read timeout,
so a slow runner network stalls the probe by the download time. The stall
lands under rpc()'s 20 s deadline in test_managed_worker_images (CI job
122625883308) and under longer waits in the other probes that reach it.

Repro: a sitecustomize.py at a scratch tree root (the daemon's PYTHONPATH)
that logs every getaddrinfo('models.dev') found exactly four daemon-backed
files fetching on main (test_managed_worker_images, test_session_hosted_daemon
incl. its profiles/two daemon, test_handoff_completion_parent_context,
test_local_review_without_cached_agent). Stalling that lookup 21 s fails
test_managed_worker_images 6/6 on main with the CI shape.

Fix: daemon() writes a fresh models_dev_cache.json (one unknown provider, so
lookups stay as empty as an unreachable registry) into the child's
HERMES_HOME and every pre-made profiles/* home when none exists. Stage 3 of
fetch_models_dev serves a fresh disk cache without a request. config.yaml is
untouched (test_session_authoring_commands asserts it byte-for-byte), and a
test's own seeded cache wins. The per-test models_dev.url pin in
test_managed_worker_images is dropped; the fixture covers it.
2026-10-28 07:20:05 -07:00
..