You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The SSE line reader in src/api/sse-reader.ts builds up the current line, or event, with no size limit. A misbehaving or compromised server, or anything in the path that can inject bytes, can stream a huge line with no newline. The side panel then keeps growing memory until the tab is killed.
Found during the isolated review of the bootstrap work (#1).
Expected
Cap the line and event buffer, for example at 1 MiB, which is well above the largest legitimate frame (respond bodies are capped at 160 KiB).
When the cap is exceeded, stop the stream with a protocol_error. The panel then reconciles, as it does for other stream failures.
Acceptance
A unit test feeds an endless line and gets a protocol_error without unbounded growth.
PR #4 is open (Closes #2). It went through two rounds of isolated review, and every should-fix finding is fixed: frames completed before an overflow are kept, Stop during the cancel still maps to protocol_error, and a finished turn is not turned into an error. CI passes (check + e2e).
Activity
fix: cap SSE line and event buffer
fix: keep frames parsed before an SSE overflow
fix: keep a finished turn when the stream fails after its terminal frame
mrgoonie commentedon Oct 12, 2026
PR #4 is open (Closes #2). It went through two rounds of isolated review, and every should-fix finding is fixed: frames completed before an overflow are kept, Stop during the cancel still maps to protocol_error, and a finished turn is not turned into an error. CI passes (check + e2e).