Files
hermes-agent/tests
teknium1 e72180bc7a test(gateway): channel_overrides turns keep one cached agent through the real turn path
Review fix-up for #131295. The committed cases call _run_agent_evict_on_fallback
directly with a SimpleNamespace and a mocked _evict_cached_agent, so they prove the
classifier's verdict but not the cache/pin lifecycle the incident is about. This drives
the real handler -> _run_agent -> TurnRunner.run_sync path (only the AIAgent class and
config reads are substituted) through human -> internal wake -> human and asserts one
agent instance, the override model in _agent_cache, and a surviving ephemeral pin.

Red/green across the branch's history:
  origin/main       -> named-channel-model fails (the #131294 eviction)
  7a3e9f5 (1st fix) -> welcome-host-pins-over-channel-model fails (the R1 regression)
  cdf5e12 (head)    -> both pass

Co-authored-by: Guerilla-ops <307102608+Guerilla-ops@users.noreply.github.com>
(cherry picked from commit 46e9f20e8c562dfcddf1c11b4d08874d5cd842a2)
2026-10-06 11:24:29 -04:00
..