Repository navigation
Preserve falsy response values in JSON-RPC traces - #1949
Merged
Dirk Bäumer (dbaeumer) merged 2 commits intoNov 30, 2026
Merged
Dirk Bäumer (dbaeumer) merged 2 commits into
Dirk Bäumer (dbaeumer) merged 2 commits into
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are identified for the change preserving falsy values in JSON-RPC text traces.
No open issues 🎉
What changed in this PR
Fixes JSON-RPC text tracing so false, 0, and empty-string response values are preserved without changing null handling, JSON traces, or the wire protocol.
Changes:
- Replaces truthiness checks with explicit null/undefined checks for results and error data in both response directions.
- Adds 16 round-trip regression cases covering Verbose and Compact traces, falsy values, and null compatibility.
| File | Description |
|---|---|
jsonrpc/src/node/test/connection.test.ts |
Adds regression coverage for sent and received response traces. |
jsonrpc/src/common/connection.ts |
Preserves falsy results and error data in text trace output. |
Review effort: Balanced
Dirk Bäumer (dbaeumer)
approved these changes
Nov 30, 2026
Logan Ramos (lramos15)
approved these changes
Nov 30, 2026
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.
Verbose and compact text traces currently treat false, 0, and empty-string results as missing, reporting "No result returned." They also omit those values when supplied as error data. Both sending and receiving response traces use truthiness checks.
Replace these with explicit null/undefined checks. Existing null-result and null-error-data behavior is unchanged, as are JSON traces and the wire protocol.
Add 16 round-trip regression cases covering both trace levels, both response directions, successful results and error data, including null compatibility checks. The falsy-value cases failed before the implementation change.
Validation:
Browser and VS Code integration tests were not run.