fix(apiquery): encode float32 query values at float32 precision - #665
fix(apiquery): encode float32 query values at float32 precision#665latent-9 wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe query encoder now formats ChangesFloat32 Query Encoding
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This localized change makes float32 query values serialize at float32 precision and updates the affected expectations; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
internal/apiquery/encoder.goformats bothreflect.Float32andreflect.Float64values withstrconv.FormatFloat(..., 64), so float32 query parameters are serialized with float64 noise, e.g.43.76becomes43.7599983215332. The siblinginternal/apiform/encoder.goalready splits the two kinds; this makes apiquery match. Query tests pinned to the noisy output are updated to the exact value.Summary by CodeRabbit
Bug Fixes
Tests