Repository navigation
fix(irc): disconnect on oversized inbound lines - #107376
ZengWen-DT wants to merge 1 commit into
Conversation
4191461 to
3c38ba7
Compare
|
Codex review: needs maintainer review before merge. Reviewed July 15, 2026, 10:14 PM ET / July 16, 2026, 02:14 UTC. Summary PR surface: Source +13, Tests +103. Total +116 across 2 files. Reproducibility: yes. from source, with high confidence: current main retains an unterminated record without a byte bound, and the PR's real TCP scenario demonstrates the corrected path. A separate account-level recovery reproduction remains missing. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Keep the byte-bounded fail-closed parser, but add an IRC-owner-approved account-level contract and regression proof showing either bounded reconnect/backoff or a clearly reported terminal offline state with an explicit recovery path. Do we have a high-confidence way to reproduce the issue? Yes from source, with high confidence: current main retains an unterminated record without a byte bound, and the PR's real TCP scenario demonstrates the corrected path. A separate account-level recovery reproduction remains missing. Is this the best way to solve the issue? Yes for bounding hostile input at the IRC client boundary; disconnecting before parsing is narrow and protocol-consistent. The solution is incomplete as a merge decision until the account monitor's post-disconnect behavior is explicitly chosen and proven. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d42dfed3f256. Label changesLabel justifications:
Evidence reviewedPR surface: Source +13, Tests +103. Total +116 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (12 earlier review cycles; latest 8 shown)
|
58c2f8c to
1270c76
Compare
1270c76 to
7e740ba
Compare
What Problem This Solves
Fixes an issue where a broken or hostile IRC server could keep sending an unterminated line and make OpenClaw retain the growing input indefinitely while the channel remained connected.
Why This Change Was Made
The IRC client now applies the protocol's existing 512-byte wire limit to both complete inbound lines and the pending unterminated record. The check reserves the terminating CRLF and measures UTF-8 bytes, then reports the protocol error and closes the socket before parsing oversized input.
User Impact
IRC connections no longer grow memory without bound on oversized inbound records. Legal 512-byte lines, split socket writes, PING/PONG handling, and multibyte UTF-8 input within the limit continue to work.
Evidence
IRC inbound line exceeds the 512-byte limit, closed the socket, and made the client not ready.node scripts/run-vitest.mjs extensions/irc/src/client.test.ts— 19 passed.node scripts/run-vitest.mjs extensions/irc/src/client.surrogate.test.ts— 5 passed..agents/skills/autoreview/scripts/autoreview --mode local— clean, no accepted/actionable findings.git diff --check— passed.Remote Testbox evidence was not available in the authoring environment because neither Crabbox nor Blacksmith was installed; the socket evidence above uses real kernel TCP sockets rather than mocked transports.
AI-assisted: implemented and reviewed with Codex; I reviewed the resulting code and validation evidence.