Files
t3code/apps/server
Cursor AgentandTheo Browne 0ebee5e202 Poll on the live clock for out-of-process waits in server tests
CursorAdapter.test.ts polled its mock-agent request log with bare
Effect.yieldNow loops, and ProviderRegistry.test.ts polled real
child-process probe results with TestClock.adjust + yieldNow. Neither
gives the child process or libuv any wall-clock time, so on loaded CI
hosts the session/cancel log line or the re-probe spawn landed after
the ~40 microtask hops and the tests failed on stale data.

Add a shared pollUntil test helper that sleeps on the live clock via
TestClock.withLive between attempts and dies loudly with the last
polled value on timeout, and use it for all cross-process waits in
both test files. Also make readJsonLines skip partially written
trailing lines while a child process is still appending.

Co-authored-by: Theo Browne <[email protected]>
2026-07-07 21:04:57 +00:00
..
2026-06-29 22:57:48 +00:00