mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-25 09:41:04 +01:00
The Rust and TypeScript interpretation test in runnerd-codex-transport.test.ts spawned the real paperclip-runnerd binary and a real fake-codex-app-server process, ran one turn, and polled two provider trace files for a terminal status with vitest's default 1,000ms expect.poll deadline. Measurement showed the real envelope for this path (534ms to 640ms across 12 uncontended samples) sits inside that default, so the poll could time out under load even though the trace files would still arrive. Move the real-process wait helper out of live-session.test.ts into a shared test/ module and export it, so both real-process test files import the same helper and deadline instead of one file re-declaring a marker meant only for waits that settle in-process. Replace the bare expect.poll with the shared helper, keeping the same toEqual/objectContaining assertion. Extend the bare-real-process-wait check script to also reject a bare expect.poll( in src/live/**, on the same terms as vi.waitFor(: accept the in-process marker or an explicit timeout option that already states its own envelope. Rewrite the deadline's evidence comment with the reliable, uncontended measurements for both real-process waits it now covers (163ms-187ms and 534ms-640ms) and correct file:line anchors, and state the actual margin the deadline keeps (over 15 times the larger observed maximum) instead of an inflated one. Co-authored-by: Paperclip <noreply@paperclip.ing>