Repository navigation
Conversation
Extend HTML-unescaping regressions across supported escape encodings and representative backslash parity cases. Verify a streaming artifact DataPart round-trips through JSON-RPC response serialization without changing the merged implementation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Context
Test-only follow-up to #1290, as invited in #1290 (comment). The production fix from #1293 is preserved unchanged.
Added coverage
Two test methods in two existing test files:
>with three, four and five preceding backslashes to exercise active escapes after an escaped pair, multiple escaped pairs, and an active escape after multiple pairs. This is 11 checks, rather than a redundant character-by-backslash Cartesian product. Existing tests already cover ordinary active escapes.StreamResponseartifact update with structured tool-result data containing literal Unicode escapes, backslashes and actual HTML characters throughJSONRPCUtils.toJsonRPCResultResponse(), then parse the result back to the original protobuf message. This covers the nested response serialization path, not network/SSE transport behavior.No production changes, new dependencies, malformed-input contract tests or unrelated compatibility-wrapper tests.
Validation
On Java 21 against main
31455e95:mvn -B -q -pl common,spec-grpc -am \ -Dtest=HtmlEscapeUtilsTest,JSONRPCUtilsTest \ -Dsurefire.failIfNoSpecifiedTests=false testThe two test classes ran 71 tests, with 0 failures, errors or skips. This count includes existing tests; this PR adds only the two methods described above.
git diff --checkalso passed.