refactor: wire try_from_json() into production and clean up test memory#235
Merged
pinodeca merged 1 commit intoJun 15, 2026
Conversation
- Wire Durofut::try_from_json() into explain.rs production code paths, replacing direct serde_json::from_str::<Durofut> calls. This gives the fallible deserializer an actual production caller, removing the maintenance hazard of shipping an unused parallel API. - Refactor node-count limit tests to serialize the template Durofut once and clone via vec![value; N] instead of calling to_value() in a loop N times. Extract a build_wide_join() helper to deduplicate the pattern across both node-count tests. Follow-up from PR microsoft#220 review feedback. Assisted-by: OpenCode:claude-opus-4.6
pinodeca
approved these changes
Jun 15, 2026
pinodeca
left a comment
Contributor
There was a problem hiding this comment.
Reviewed with Opus 4.8.
LGTM!
This was referenced Jun 17, 2026
Closed
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.
Follow-up to #220 addressing review feedback from @pinodeca:
Wire
try_from_json()into a production caller — replaced directserde_json::from_str::<Durofut>calls inexplain.rswithDurofut::try_from_json(), so the fallible deserializer is no longer an unused parallel API.Test memory cleanup — extracted a
build_wide_join(n)helper that serializes the template node once and clones viavec![value; n]instead of callingto_value()per-iteration 10k times. Both node-count tests intypes.rsand thepg_testinlib.rsnow use this pattern for predictable memory.Net: -18 lines, no behavioral changes.