Files
codebase-memory-mcp/tests
Martin Vogel 46b77c3e3b test(daemon-app): wait for the stable terminal state, not the draining window
The fresh-request guard test waited for 'job terminal AND >= N/2 subscribers
still attached'. Publish flips terminal and releases the blocked prior
requests in the same locked step, so that conjunction is a transient window
whose width is thread-wakeup scheduling: the busy-spin caught it by luck,
a 1ms-yield poll (#1307) sampled past it on fast x64 runners, and no budget
can pin it (release runs 30305464193 and 30309182389 failed it from both
directions).

The production guard never consults subscriber counts —
application_find_active_job_locked skips any terminal job — and the test's
downstream assertions (starts==2, destroys==2, stale/fresh response
separation) catch a terminal-job reuse in every interleaving. So wait only
for the stable end-state (active jobs == 0) and drop the racy helper.
47/47 locally.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-07-28 01:02:41 +02:00
..
2026-07-08 00:05:19 +05:30
2026-07-08 00:05:19 +05:30
2026-06-28 13:05:05 +02:00