Commit 50251a3
committed
fix(proxy): use read1 so MCP frames forward without 64KB block
The parent->child stdio pump was using src.read(64*1024) which on a
BufferedReader-backed pipe (subprocess stdin, sys.stdin.buffer) blocks
until exactly 64 KB arrive or EOF. MCP JSON-RPC frames are hundreds of
bytes — so they sit in the buffer waiting for more data that never
comes, and the child engine never sees any input from BioRouter.
The unit tests passed because BytesIO.read(n) returns immediately with
whatever's available, masking the bug. Switched to src.read1(n) which
has the correct streaming semantics on real pipes AND remains
compatible with BytesIO.1 parent 48aa2da commit 50251a3
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
25 | 32 | | |
26 | 33 | | |
27 | 34 | | |
28 | 35 | | |
29 | 36 | | |
| 37 | + | |
30 | 38 | | |
31 | 39 | | |
32 | | - | |
| 40 | + | |
33 | 41 | | |
34 | 42 | | |
35 | 43 | | |
| |||
0 commit comments