Repository navigation
fix(jsonrpc): json-rpc spec mismatches - #4166
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4166 +/- ##
==========================================
+ Coverage 80.25% 80.38% +0.13%
==========================================
Files 502 504 +2
Lines 38318 38437 +119
==========================================
+ Hits 30752 30899 +147
+ Misses 7557 7529 -28
Partials 9 9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Claude finished @brbrr's task in 37m 55s —— View job Reviewing PR #4166
SummaryThe three fixes (null id vs. notification, trailing-data rejection, Important
No other correctness, concurrency, or resource-leak issues found; the |
PR Reviewer Guide 🔍(Review updated until commit 3d30ed4)Here are some key observations to aid the review process:
|
|
Claude finished @brbrr's task in 2m 53s —— View job Reviewing PR #4166 (new commits pushed)
SummaryThe latest commit (
Checked the offset bookkeeping ( No remaining correctness or concurrency issues found. The only residual point (not a blocker, both earlier reviewers explicitly offered it as an acceptable trade-off): the handler still scans to EOF rather than capping total trailing bytes tolerated, so a malicious client can still force an up-to-~10MB in-memory scan per request — just a cheap one now (no syscall-per-byte cost, no amplification of socket round-trips). If this needs to be hardened further (e.g., a small fixed cap on trailing bytes before erroring), that would be a follow-up, not something blocking this PR. |
|
Persistent review updated to latest commit 3d30ed4 |
User description
"id": nullis a request, not a notification.Request.IDandresponse.IDare nowjson.RawMessage; nil means the key was absent. A request with a null id gets a reply with"id": null.validIDreads the raw bytes instead of going through reflection andjson.Number.decodeOnereads past the single JSON value; whitespace is allowed, anything else is-32700 Parse errorwith a caret at the offending byte. Applies to single requests and batches.resultkey. The response storesjson.RawMessage("null")soomitemptydoes not drop it.