fix(query-engine): fail loudly on accumulator serialization errors - #711
Merged
milindsrivastava1997 merged 1 commit intoSep 4, 2026
Merged
Conversation
serialize_to_bytes/serialize_to_json swallowed msgpack encode failures via unwrap_or_default(), producing an empty payload indistinguishable from a legitimate empty sketch. SerializableToSink now returns a Result carrying the failing type's name and underlying error, and PrecomputeDumper propagates that with the aggregation id attached so nothing is persisted for a record that failed to serialize. Fixes #673. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BJsHNWn3uJK5iyk1L6isw7
milindsrivastava1997
marked this pull request as ready for review
September 4, 2026 13:20
milindsrivastava1997
deleted the
673-fail-loudly-when-accumulator-serialization-fails
branch
September 4, 2026 13:21
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
SerializableToSink::serialize_to_json/serialize_to_bytesnow returnResult<_, SerializationError>instead of swallowing msgpack/serde encode failures via.unwrap_or_default(), which produced an empty payload indistinguishable from a legitimate empty sketch.KeyByLabelValuesandPrecomputedOutput, which had the same swallow-to-default pattern.PrecomputeDumper::dump_precomputenow propagates the error with the failing accumulator's type and the record'saggregation_idattached, and writes nothing to the dump file when serialization fails.PrecomputeDumpertest asserting the error message and that no record is persisted.Test plan
cargo test -p query_engine_rust -p asap_types --lib— 616 + 58 tests passcargo clippy -p query_engine_rust -p asap_types --lib --tests -- -D warnings— cleancargo fmt --check— cleanFixes #673.
🤖 Generated with Claude Code