fix(analytics): reconcile KPI ledger numeric validity on protected main - #339
fix(analytics): reconcile KPI ledger numeric validity on protected main#339seonghobae wants to merge 2 commits into
Conversation
|
Warning Review limit reached
Next review available in: 32 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@opencode-agent @cwl-noema-review Please independently review exact current head |
Pull request was closed
Objective
Reconstruct PR #330's fail-closed persisted KPI numeric-domain validation directly on the current protected-main baseline after #270 integrated.
Fresh exact state — 2026-08-10
1fb6382dcc5a64ea93bbf28f0b8efb1ac1d41150;main:55d7ae8647208e301f282350f076eeddaba61d11;31389439496: success;31389439807: success;31389440805: success;31389439662: success;The exact two hunks are semantically identical to predecessor #330: finite
[0,1]validation inrate, non-negative validation innullableLong, and the same seven new invalid-ledger cases. The final blobs intentionally differ because this reconstruction preserves protected-main #270 changes around those methods instead of copying stale ancestry.Contract preserved
Persisted
conversionSuccessRatemust be finite and inside[0.0, 1.0]; persistedp95TimeToPreviewMs, when present, must be non-negative.NaN, positive and negative infinity, out-of-domain rates, negative latency, and malformed numerics fail closed through the existing controlled invalid-line envelope. Valid historical finite evidence remains replayable. Invalid evidence is not clamped or silently discarded.Scope / non-completion boundary
Changed files:
src/main/java/com/clearfolio/viewer/analytics/KpiSnapshotLedger.javasrc/test/java/com/clearfolio/viewer/analytics/KpiSnapshotLedgerTest.javaThis remains issue #329's bounded evidence-validity slice. It does not change KPI denominator semantics (#327/#338), tenant query authority (#326), authentication, persistence format, or canonical documentation. PR #305 remains the cross-cutting documentation owner.
Merge gate
Keep this exact head unchanged. Auto-merge may complete only after live repository protection still sees all required checks passing, zero valid unresolved findings, and the counted approving review from a qualifying independent reviewer with write access. Automated evidence is not approval.