Files
hermes-agent/gateway
kshitijk4poor d66be76491 fix(gateway): count API-server runs before the adapters are released; include deferred workers
_stop_release_runtime_state clears self.adapters one phase before the SessionDB close gate,
so a live lookup through _api_server_hook always read 0 there — the API term was dead and the
parametrized test could not see it because it replaced the method. The count is now taken
onto the stop context before adapters.clear(). Deferred hygiene workers also run on the
loop's default executor (run_turn.py), so their counter joins the gate; the earlier claim
that they were self._executor futures was wrong. The warning names each source separately.
The API test case goes through the real hook with a fake adapter in gw.adapters, so moving
the snapshot after the clear fails it.
2026-09-20 00:27:43 +05:30
..