fix(gateway): dispatch memory session-end hooks on expiry - #11304
fix(gateway): dispatch memory session-end hooks on expiry#11304LeonSGP43 wants to merge 1 commit into
Conversation
|
Thanks @LeonSGP43 — your instinct was right: session expiry (not idle eviction) is the correct boundary for dispatching Closing in favor of #57378 (merged / merging), for two reasons:
#57378 fixes it at the source — it keeps a finalizable agent in cache until the session actually expires (idle sweep), and commits Your correct framing (expiry is the boundary) is credited in the salvage. Thanks! |
Summary\n- dispatch MemoryProvider session-end hooks from the live gateway agent before the flush worker tears the session down\n- keep the existing flush-agent behavior intact for builtin memory and skills\n- add a regression test covering cached gateway agents\n\nWhy\n- gateway session expiry/reset currently runs the flush worker but never calls the live memory manager's \ hook\n- memory providers that rely on end-of-session extraction therefore miss their final pass on gateway platforms\n\nFixes #11205\n\nTesting\n- python3 -m pytest -o addopts='' tests/gateway/test_flush_memory_stale_guard.py