Repository navigation
Conversation
`/summary/buckets?from_ms=…` returned 400:
invalid type: string "1789300000000", expected i64
`#[serde(flatten)]` makes serde deserialize through `deserialize_any`,
and in a query string everything arrives as a string — so an `i64` field
behind a flattened struct can never parse. The endpoints I added two
commits ago both did this.
The failure shape is the bad kind: without parameters everything works,
and it only breaks **when a time window is supplied** — which the UI
always does. So the endpoints looked fine in every check I ran by hand
and would have been permanently empty in the chart they exist for.
Unit tests structurally cannot see this. It happens only when a request
actually passes through query-string deserialization, which is exactly
the class of failure `scripts/smoke.sh` exists for — and the smoke
script was hitting all these endpoints without parameters.
So it now hits four of them *with* a window, and that's the part worth
keeping: mutation-verified by putting `flatten` back, which turns the
new check red with the 400 in the output.
1066 tests, 46 smoke checks, clippy clean.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
/summary/buckets?from_ms=…returned 400:invalid type: string "1789300000000", expected i64.#[serde(flatten)]deserializes throughdeserialize_any, and in a query string everything is a string — ani64behind a flattened struct can never parse. Both endpoints added two commits ago did this.Bad failure shape: fine without parameters, broken only when a time window is supplied — which the UI always does. The endpoints looked healthy in every hand check and would have left the chart permanently empty.
Unit tests can't see it; it needs a real query-string parse. The smoke script was hitting these endpoints without parameters, so it now hits four of them with a window — mutation-verified by restoring
flatten, which turns the new check red.1066 tests, 46 smoke checks.
🤖 Generated with Claude Code