Files
multica/server
Bohan Jiang 1d2a3499c9 test(agent): stop the cursor fixtures racing their own prompt write (MUL-5536) (#6174)
TestCursorExecuteFailsOnCleanEOFWithoutResult failed on main with
"cursor-agent prompt write failed: write |1: broken pipe" where it
expects "stream ended without terminal result".

The fake cursor-agent exits without reading stdin, so the prompt write
races the child's exit: win and the pipe buffer swallows it, lose and the
read end is gone and the write returns EPIPE. writeErr outranks both
exitErr and the generic no-terminal-result error in cursor.go, so a lost
race replaces the asserted failure with the EPIPE one.

A real cursor-agent reads stdin to EOF, so the fixtures now do too. That
removes the race rather than reordering production error precedence,
which is deliberate. Only the two fixtures whose expected error ranks
below writeErr need the drain.

Co-authored-by: Bohan-J <bohan@devv.ai>
Co-authored-by: multica-agent <github@multica.ai>
2026-07-30 16:15:36 +08:00
..