fix(fetch): preserve JSON body key order - #11049
proggeramlug wants to merge 3 commits into
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthrough
ChangesFetch JSON parsing
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~15 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The change appears ready to merge after normal checks; no actionable risk is established. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
02f7ead to
16be733
Compare
|
Landed on Cherry-picked from this PR's head Nothing needed from you. Thanks. |
Summary
Request.json()andResponse.json()bodies through Perry's JavaScript JSON parser instead ofserde_json::Value's sorted mapFixes #10392
Testing
cargo fmt --all -- --checkcargo check -p perry-stdlibcargo test -p perry-stdlib fetch_json_preserves_document_key_order -- --nocapturecargo test --release -p perry-stdlib fetch_json_preserves_document_key_order -- --nocaptureonperrymasterscripts/check_file_size.shpython3 scripts/raw_handle_debt.py --checkpython3 scripts/string_payload_access_inventory.pypython3 scripts/unrooted_local_shape.py --checkperry,perry-runtime-static, andperry-stdlib-staticonperrymastertest_gap_10392_fetch_json_key_order.tsoutput compared byte-for-byte with NodeCI note
The
lintjob has one base failure:python3 benchmarks/ci_public_baseline_check.pyexits 2 on a clean detachedorigin/maincheckout atf5cfbff882. This is tracked in #10799. All patch-related lint gates pass.Summary by CodeRabbit
Request.json()andResponse.json()preserve the order of non-numeric keys in JSON documents. Integer-like keys continue to follow JavaScript’s numeric-key ordering.