Skip to content

fix(validation): preserve representable recovery metrics - #488

Draft
seonghobae wants to merge 228 commits into
mainfrom
fix/validation-bias-overflow-safe-mean
Draft

fix(validation): preserve representable recovery metrics#488
seonghobae wants to merge 228 commits into
mainfrom
fix/validation-bias-overflow-safe-mean

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Validation Evidence landing vehicle

Protected base: main@1bc02f580cf48e1d39da239f0e818453437c31c3. Current exact head: fe89c43803136ab979912fffa636d2a4f169a73e.

This Draft remains the TEPP Validation Evidence numerical/artifact-admission vehicle. Earlier bias/RMSE/Monte Carlo/SE-aware acceptance/Wilson/matching/serde-projection lineages remain in ancestry, executable contracts, CHANGELOG.d/, docs/research/, and the product/technical gap baseline. No valid predecessor delta is discarded.

Current causal finding — exact-count all-covered near-one rounding

The preceding inexact-count work correctly repaired all-covered Wilson behavior above binary64's exact-integer range and added subnormal-scale edge coverage. Fresh review found a separate defect on the exactly representable count path.

For an all-covered sample the same Wilson score endpoint is L = n / (n + z²) = 1 - z² / (n + z²). With n = 1 and represented z = 0x1.0000000000001p-27, binary64 multiplication yields z² = 0x1.0000000000002p-54. The correctly rounded represented-input lower endpoint is 0x1.fffffffffffffp-1 (next_down(1.0)). The predecessor formed n + z² first; that addition rounded back to 1.0, so n / (n + z²) emitted false exact 1.0 and erased a representable finite-sample miss mass.

Public RED e0c4ec81bb455d230259489dc71e23fe33704b1d fixes that exact bit-level contract. Causal repair c9dcb9df363999bbcbb6fffdc8b6a6d9ae5e762c keeps ordinary direct exact-count evaluation but, only when it has collapsed to exact 1.0 while represented z² > 0, subtracts the algebraically equivalent miss fraction z² / (n + z²). Boundary reinforcement 6140080d2257d0550be479d71371d70e2255c3d0 fixes z = 2^-28, z² = 2^-56, where the miss mass is genuinely below binary64 resolution and exact 1.0 must remain admissible. Changelog 09ebb482851fe7836e738a74395e6424621da9bf; research/current fe89c43803136ab979912fffa636d2a4f169a73e.

The concurrent edge-only commit ccb75e812988c969206177e4876c7abe9944bfd5 is retained: it covers an inexact durable count n = 2^53 + 1 with a positive subnormal represented whose quotient by n is below binary64 range, so the correctly represented all-covered lower endpoint remains exact 1.0.

Prior Wilson/provenance repairs retained

The exact-count/proportion, complement-symmetry, durable u64, denominator-scale, and all-covered extreme-z lineages remain in ancestry. In particular, inexact-count extreme-z RED 059ce70d3dd497f486214137bca6a1f1b2e8b3cd, boundary repair 0f4783929b8d067eecb91696e1ad5761cd315b1e, single-writer cleanup 8e2058f2fc6ab42af8f732f03e7ae1dcee3e873d, exact-oracle correction 93d5d2089db1fcf4c6167930adb362333a2ed809, changelog correction 43b6562c4c2ad3af51970040c127c784cccff228, and research predecessor b03a719d29e20d6cc4f9b70705ee1aa6e48db543 remain valid ancestry.

The current repair does not claim global correct rounding for every arbitrary Wilson rearrangement. It closes the demonstrated false exact-one state for exactly representable counts while preserving the correctly rounded exact-one state below binary64 resolution.

Owner boundary

This is TEPP Validation Evidence provenance/projection policy around the canonical Wilson producer in validation_core. It is not reusable static psychometric estimation, does not move Longitudinal Modeling composition, does not copy mutable fast-mlsirm source, and does not consume an unreleased contextual-orchestrator contract. coverage.rs remains the single Wilson writer; durable evidence carriers consume it rather than duplicate arithmetic.

Wilson (1927) remains the primary score-interval source. IEEE 754-2019 and ISO/IEC 60559:2020 remain published active floating-point standards; IEEE P754 is an active revision project, not a published replacement.

Merge bar

Exact head fe89c43803136ab979912fffa636d2a4f169a73e remains Draft. Every source mutation invalidates predecessor workflow/review evidence. Fresh hosted Rust, documentation, security, SAST/supply-chain, owned line/branch coverage, resolved current-head review threads, and a qualifying independent current-head approval are required. mergeable=true alone is not GREEN. No self-approval, force push, destructive rebase, gate weakening, or routine admin bypass.

@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae seonghobae changed the title fix(validation): preserve representable extreme bias fix(validation): preserve representable recovery metrics Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant