Files
Claude df71952c80 fix(server): await background task cleanup in runtime destroy()
The `IdleReleaseDecorator.destroy()` and `PersistenceDecorator.destroy()`
methods spawned or referenced background tasks (`_deferred_release`,
`_on_server_stop`, `resume_task`) but returned before those tasks
completed. With the module-scoped event loop used by the tests, those
orphaned tasks could still be running on a subsequent test's loop,
which made `test_multistep_hitl_multiple_restarts_at_same_wait_point`
intermittently fail when a stale idle-release task raced the new
server.

Cancel and await all pending background tasks during destroy so shutdown
is synchronous by the time the context manager exits. Tighten the
related destroy-focused tests to assert the post-condition immediately
and add a regression test that destroy() cancels in-flight
deferred-release tasks.
2026-04-23 02:36:18 +00:00
..
2026-04-22 14:29:17 -04:00