Files
oh-my-pi/packages/coding-agent/test/registry
roboomp 8061fb2e0a fix(agent): reject cold revive that finishes after lifecycle dispose
A cold persisted-agent revival could complete after
AgentLifecycleManager.dispose() and still attach its live session. When
teardown lands during the reviver-factory await, the id is not yet tracked
in #adopted, so dispose() skips it and leaves the parked registry ref
intact; the late factory then cold-adopts and #revive attaches a session
plus a TTL timer onto the torn-down manager, leaking a live session graph
and timers past teardown.

Set a #disposed flag at the top of dispose() and recheck it after the
reviver-factory await and after the reviver await. A late revive now
rejects deterministically and disposes any session it already built,
preserving singleflight for concurrent callers.

Fixes #8114
2026-08-09 23:46:40 +00:00
..