mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
The bridge tests that drive observe-only emit listeners (session-start, subagent/start, subagent/end) fire their hook on a detached `.then` the test cannot await. They waited a fixed 50-80ms, which flaked under the full test:coverage run's heavy parallel load (transform ~400s): the sleep expired before the async hook completed, so the injected context / marker file / warn call had not landed. Replace each fixed sleep with a `waitFor(predicate)` poll that retries until the observable effect appears (5s deadline) — "async state is not synchronous state": wait for the signal that actually fires, not a guessed duration. No behavior change; the same assertions, made robust to scheduling.