hermes-agent/tests/acp
Teknium 0edcc57d9a fix(acp): wire HERMES_SESSION_KEY per session so sudo cache scope activates
PR #16858's session-scoped interactive sudo password cache falls back to
a thread-identity scope when no HERMES_SESSION_KEY is bound. ACP never
set that contextvar, so two ACP sessions landing on the same reused
ThreadPoolExecutor thread still shared the cache — the exact scenario
the PR headlined.

acp_adapter/server.py now:
- binds HERMES_SESSION_KEY=<session_id> via gateway.session_context
  inside _run_agent() (and clears on exit)
- wraps the loop.run_in_executor(_executor, _run_agent) call in a fresh
  contextvars.copy_context() so concurrent ACP sessions don't stomp on
  each other's ContextVar writes (executor pool threads would otherwise
  share a context).

Adds tests/acp/test_approval_isolation.py::
  test_sudo_password_cache_isolated_across_acp_sessions_on_same_pool_thread
which drives two back-to-back sessions through a 1-worker ThreadPoolExecutor
and asserts B does not observe A's cached password.
2026-04-28 01:34:16 -07:00
..
__init__.py feat: restore ACP server implementation from PR #949 (#1254) 2026-03-14 00:09:05 -07:00
test_approval_isolation.py fix(acp): wire HERMES_SESSION_KEY per session so sudo cache scope activates 2026-04-28 01:34:16 -07:00
test_auth.py feat: restore ACP server implementation from PR #949 (#1254) 2026-03-14 00:09:05 -07:00
test_entry.py fix(acp): complete session management surface for editor clients (salvage #3501) (#3675) 2026-03-28 23:45:53 -07:00
test_events.py fix(acp): improve zed integration 2026-04-17 13:29:26 -07:00
test_mcp_e2e.py fix(acp): improve zed integration 2026-04-17 13:29:26 -07:00
test_permissions.py fix(permissions): handle None response from ACP request_permission 2026-04-21 05:57:23 -07:00
test_ping_suppression.py fix(acp): silence 'Background task failed' noise on liveness-probe requests (#12855) 2026-04-20 00:10:27 -07:00
test_server.py fix(acp): include MCP toolsets in ACP sessions 2026-04-24 03:04:42 -07:00
test_session.py fix(acp): include MCP toolsets in ACP sessions 2026-04-24 03:04:42 -07:00
test_tools.py fix(acp): improve zed integration 2026-04-17 13:29:26 -07:00