Files
hermes-agent/gateway
liuhao1024 918c72e06f fix(gateway): unserve the profile handles off the event loop
Both releases added for #130244 block: the log-handler release stops and
joins the logging QueueListener (which can be inside a
ConcurrentRotatingFileHandler emit waiting on another process's rotation
lock), and the scoped MCP shutdown waits on future.result for the MCP
loop. Running either directly on the gateway loop stalls every other
served profile's events behind it. asyncio.to_thread runs both in a
worker while copying the context, so the surrounding
_profile_runtime_scope home/secret override stays visible to the worker
(suggested by @Sora-bluesky in the PR review).

The test now also asserts the fd itself is released, not just the
routing entry removed: on Windows the routed handler's ``stream_lock``
(the ``.__agent.lock`` handle rmtree trips over) is open before the
reconcile and closed after it, while a still-served sibling keeps its
handles; on POSIX the same is asserted through the log stream.
2026-10-02 22:43:10 -05:00
..
…
…
…