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
Everything looks correct. Let me review the complete diff one more time carefully:
compatibility-date.capnp: New flag websocketCloseReasonByteLimit @164 with enable date 2026-03-03. Ordinal is sequential after @163. Has enable/disable flag names. Documentation is clear. All good.
web-socket.c++: The check is correctly gated behind the compat flag. Uses r.size() <= 123 which is correct for UTF-8 byte counting since kj::String stores UTF-8. Throws DOMSyntaxError which matches the WHATWG spec. Placement is correct — after code validation but before the "reason without code" check.
Test file: Good coverage — tests 124 ASCII bytes (should throw), exactly 123 bytes (should not throw), and multibyte characters (62 × 2 = 124 bytes, should throw). Tests properly clean up by calling ws.close() after the throwing case.
.wd-test: Correctly adds the compat flag to enable the new behavior for tests.
WPT test: Removes the expectedFailures entry for Close-Reason-124Bytes.any.js since the test should now pass. Adds a cleanup handler to close the WebSocket properly. This is well-reasoned — after close(1000, longReason) throws, the WebSocket remains in CONNECTING state and needs to be closed.
This is a clean, well-structured change. The compat flag is correctly used to gate the behavioral change. The implementation matches the spec. The tests are thorough. No issues found.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.