mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-15 03:16:05 +00:00
* fix(tlon): cap SSE payload JSON.parse at 16 MiB to prevent OOM * fix(tlon): cap SSE stream buffer and JSON.parse at 16 MiB to prevent OOM * chore(tlon): add production-style SSE bounded proof script (#101274) Adds extensions/tlon/proof-sse-bounded.mts which drives the real UrbitSSEClient.processStream and processEvent against Node Readable streams (not unit-test mocks) to demonstrate: - normal SSE events are still delivered through the stream path; - an unterminated stream that would grow beyond 16 MiB is rejected before unbounded accumulation; - a single SSE payload above 16 MiB is rejected before JSON.parse. The script passes on this branch and fails 2/3 assertions when run against origin/main's sse-client.ts, providing the before/after proof ClawSweeper requested. * chore(tlon): fix oxlint catch type in proof script (#101274) * fix(tlon): reject oversized SSE chunk before buffer concatenation Move the stream byte-limit check before buffer += chunkStr so a single oversized chunk never lands in the pending buffer. The old guard ran after concatenation, which still allowed the memory spike this hardening is meant to prevent. Add a single-oversized-chunk test to prove the guard fires before the chunk is concatenated into the pending buffer. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * chore(tlon): remove PR-specific SSE bounded proof script The proof script was review-only validation for #101274. Durable behavior coverage lives in sse-client.test.ts (stream buffer bounding, oversized chunk rejection before concatenation, 16 MiB boundary, normal delivery, 1000 small events). Per ClawSweeper P3 finding, drop the one-off script from the plugin tree. * fix(tlon): bound SSE event buffering safely * test(tlon): avoid unsafe optional chaining * fix(tlon): count split Unicode at SSE limit * fix(tlon): parse split SSE delimiters at limit --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com> Co-authored-by: Peter Steinberger <steipete@gmail.com>
Tlon (OpenClaw plugin)
Tlon/Urbit channel plugin for OpenClaw. Supports DMs, group mentions, and thread replies.