Skip to content

Commit 4a2aea4

Browse files
ThuraabtechCopilot
andauthored
Update comment on delimeter handling
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent dca4d26 commit 4a2aea4

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

plugins/communication_protocols/socket/src/utcp_socket/tcp_communication_protocol.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -207,13 +207,13 @@ def _decode_response_with_framing(self, sock: socket.socket, provider: TCPProvid
207207

208208
elif provider.framing_strategy == "delimiter":
209209
# Read until delimiter is found
210-
# Copilot AI (5 days ago):
211-
# The default delimiter has been changed from "\\x00" (escaped backslash) to "\x00" (null character).
212-
# This changes the semantic meaning - the old code expected the literal string \x00 (4 characters: backslash, x, 0, 0),
213-
# while the new code expects a single null byte. Ensure this is intentional and that all servers using this protocol are
214-
# updated accordingly, as this is a breaking change in the wire protocol.
215-
# Suggested change:
216-
# delimiter = provider.message_delimiter or "\\x00"
210+
# Delimiter handling:
211+
# The code supports both literal delimiters (e.g., "\\x00") and escape-sequence interpreted delimiters (e.g., "\x00")
212+
# via the `interpret_escape_sequences` flag in TCPProvider. This ensures compatibility with both legacy and updated
213+
# wire protocols. The delimiter is interpreted according to the flag, so no breaking change occurs unless the flag
214+
# is set differently than expected by the server/client.
215+
# Example:
216+
# If interpret_escape_sequences is True, "\\x00" becomes a null byte; if False, it remains four literal bytes.
217217
# delimiter = delimiter.encode('utf-8')
218218
delimiter = provider.message_delimiter or "\x00"
219219
if provider.interpret_escape_sequences:

0 commit comments

Comments
 (0)