Clarify non-finite input handling for histogram aggregations #5487
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.36) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 195 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.316
Real PR Conversation Timeline
1 comments
"Review active on #5487"
general
weight: 0.35
dashpole
Fixes #5346.
Explicit histograms currently have no common rule for non-finite measurements, while the exponential histogram guidance only discourages including them in sum, min, and max. A single non-finite measurement can permanently contaminate a cumulative sum, and changing bucket representations can change the recorded population.
Add a shared SHOULD recommendation to discard
NaN,+Inf, and-Infbefore changing any histogram aggregation or exemplar state. Define discarding as leaving count, bucket counts, sum, min, max, and exemplars unchanged, and restate the existing requirement against throwing exceptions to the application. Replace the narrower exponential-only guidance with a reference to the shared rule and qualify the general numerical-limits guidance.This implements the proposed direction. Finite-input sum overflow remains outside its scope.
Implementation references:
The histogram aggregation requirements are in the Stable portion of the Metrics SDK specification. Adopting this recommendation changes output in SDKs that currently record these values. Keep SHOULD to accommodate existing implementations. This does not introduce a new mandatory rejection rule.