fix: agent-core test failures in session_manager and message_bus

- session_manager: add session to _local_cache in create_session()
  so get_session() and get_active_sessions() work without Redis/Postgres
- message_bus: use asyncio.create_task() in request() for publish
  so handler runs concurrently and timeout actually fires

All 76 tests pass now.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Benjamin Boenisch
2026-02-15 13:50:54 +01:00
parent 0dae5da405
commit e76ae5d510
2 changed files with 14 additions and 4 deletions

View File

@@ -250,6 +250,7 @@ class SessionManager:
"user_id": user_id
})
self._local_cache[session.session_id] = session
await self._persist_session(session)
logger.info(
@@ -302,6 +303,7 @@ class SessionManager:
"""
session.heartbeat()
self._local_cache[session.session_id] = session
self._local_cache[session.session_id] = session
await self._persist_session(session)
async def delete_session(self, session_id: str) -> bool: