forked from cleveragents/cleveragents-core
c406781b86
P0: reject register() after close_all() with RuntimeError. P1: catch CancelledError in close_all(), use WeakKeyDictionary for cancellation_reasons to prevent memory leak, guard StateManager update_state/reset/load_checkpoint/time_travel after close(). P2: contextlib.suppress in __del__ for partial construction, re-cancel pending tasks in cleanup_tasks_async, handle late tasks added during await window, guard AcpEventQueue.publish() after close with _is_closed flag and is_closed property, fix ASV TimeRegisterBatch crash. Tests: 5 new Behave scenarios (T1-T4 + is_closed), log handler and event loop cleanup in after_scenario (T5-T6). Docs: async_safety.md updated for register-after-close and state mutation guards. ISSUES CLOSED: #321