fix: reject invalid HLL precision and Min/Max subtype - #715
Merged
milindsrivastava1997 merged 2 commits intoSep 5, 2026
Conversation
…x subtype HLL precision out-of-range/non-numeric values silently clamped to the default (14) instead of erroring, and unrecognized Min/Max subtypes silently resolved to Min. Both let a config typo change aggregation semantics without failing loudly (#674). precision is now a required, range-checked HLL parameter, and MinMax/MultipleMinMax subtypes must case-insensitively be "min" or "max" — both enforced in AggregationConfig::validate() alongside the existing count_events check. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EKLkjdnGmsFyuFqWueW2Fx
…ty matching validate() accepts "MAX" (case-insensitive), but capability matching compared aggregation_sub_type to the lowercase "min"/"max" constants with exact equality — an accepted-but-uppercase config would silently never match a query, becoming dead weight. Align the comparison with the case-insensitive check already used for plain-CMS subtypes and validate() itself. Found by roborev (job 194) reviewing PR #715. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EKLkjdnGmsFyuFqWueW2Fx
milindsrivastava1997
marked this pull request as ready for review
September 5, 2026 01:37
milindsrivastava1997
deleted the
674-reject-aggregation-parameters-that-silently-fall-back-or-change-semantics
branch
September 5, 2026 01:38
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
precisionis now a required parameter, validated to be an integer in the 4..=18 range — previously an out-of-range or missing value silently clamped to the default (14) with only a log warning.MinMax/MultipleMinMaxaggregation_sub_typemust now case-insensitively be"min"or"max"— previously any unrecognized value (e.g. a typo like"Mxa") silently resolved to"min".AggregationConfig::validate()alongside the existingcount_eventscheck, following the same missing/invalid/misplaced error pattern.Closes #674 (the
count_eventsandSingleSubpopulation/MultipleSubpopulationsubtype cases in that issue were already fixed in earlier PRs).Test plan
cargo test --workspacepasses (7 new regression tests instreaming_config.rs, plus fixes to 4 pre-existing tests whose HLL fixtures relied on the old silent-default behavior)cargo clippy --workspace --all-targetscleancargo fmt --checkclean🤖 Generated with Claude Code
https://claude.ai/code/session_01EKLkjdnGmsFyuFqWueW2Fx