rouse-context/integrations
monkopedia-coder ed76ca9516
Drain the capture scope instead of snapshotting it (#707) (#714)
joinCaptureWork() read serviceScope's children once and joined that list.
A coroutine launched into the same scope from inside another of its
coroutines — a sibling, not a nested child — registers after that read and
was never awaited, so the three negative capture assertions would go back
to passing on an unfinished write rather than on an empty table.

Re-read the children on every pass instead. The loop is unbounded on
purpose: a test-only helper that hangs is loud, while a bounded drain
would return early and reintroduce the false green it exists to prevent.

The new test builds the sibling deterministically — the capture coroutine
parks in the DAO until a gate queued on runBlocking's event loop opens,
which cannot happen until joinCaptureWork has already inspected the scope
— and asserts a positive outcome (the sibling's write landed), because an
empty-table assertion is what a missed write looks like too.


Claude-Session: https://claude.ai/code/session_01YYSPuh9bZEJkrzvnEpY1QK

Co-authored-by: Monkopedia <monkopedia@gmail.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-03 03:07:28 -04:00
..
src Drain the capture scope instead of snapshotting it (#707) (#714) 2026-09-03 03:07:28 -04:00
build.gradle.kts Fix #417: Migrate manual JSON in MCP providers to @Serializable data classes (#418) 2026-04-26 12:10:10 -04:00