D-TEH-3: calibration math → jc (drift, quorum, lift-gate comparisons); lab cronbach.rs deleted - #1143
Conversation
…:reliability The calibration MATH of the thinking-engine battery moves to jc per the ruling that jc is the single home of calibrated math (lift if correct, perfect in jc if not). - jc::drift: reencode_drift / reencode_batch (the re-encode convergence statistic, codec-agnostic — the round trip is a closure the caller supplies) and delta_summary (mean / mean|d| / max|d| / population sigma / fractions above two caller-named cut-offs). 8 tests. - jc::quorum: pairwise_agreement_u8 (per-pair 1 - sigma/sigma_max over k u8 lens tables), QuorumLevel with its 230/179/128 floors, and cronbach_report (alpha by delegation to reliability::cronbach_alpha + per-subject variances + the mean+sigma disagreement count). 6 tests. - jc::reliability: two lift-gate tests carrying the retired lab forms verbatim. Cronbach: same estimator, agrees to 1e-5 on the known-value fixture, the f32 copy loses the 1e7-shifted fixture the f64 form holds to 1e-9 (LIFT). Spearman: the retired copy ranked ties by position; tie-free fixtures cannot separate them, one tie does (1.000 vs 0.948683) (PERFECT-IN-JC, already there). No estimator changed. jc lib 135/135; the new modules are clippy -D warnings clean; fmt clean. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFnYKqw6d7TTiB9cT8eFdK
…eted - cronbach.rs deleted (cronbach_alpha / variance_agreement_scores / QuorumLevel / cronbach_analysis now live in jc::reliability + jc::quorum). - ground_truth.rs: the private ordinal-rank Spearman and its three tests deleted; calibration::spearman_vs_ground_truth calls jc::reliability::spearman (tie-corrected), keeping its 0.0 fallback. - reencode_safety.rs: glue over jc::drift — the three codec wrappers pass round-trip closures, ReencodeSafety = jc::drift::ReencodeDrift, test_reencode_batch keeps its tuple shape; test_zipper_offsets and all 14 tests unchanged (the x256 proof runs through jc). - silu_correction.rs: CorrectionStats = jc::drift::DeltaSummary; correction_stats is an adapter with the cut-offs named MATERIAL_CORRECTION = 0.01 / LARGE_CORRECTION = 0.1. - examples/certify_jina_v5_7lane.rs: jc::reliability::cronbach_alpha, None -> NaN so an undefined alpha fails every >= verdict. - Cargo.toml: jc path dep; Cargo.lock adds jc and drops entries cargo no longer needs. Lab: cargo check --lib --examples clean except the pre-existing tts_stream_hhtld break (bgz-tensor private fn, untouched); tests for the three modules 23/23. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFnYKqw6d7TTiB9cT8eFdK
…y, status/plan rows, TD for the copies outside jc Records the #1142 merge in LATEST_STATE; EPIPHANIES E-THE-LIFT-GATE-FOUND-A-TIE-BLIND-SPEARMAN-1; PR_ARC entry; STATUS_BOARD and plan §5 D-TEH-3 math half Shipped + §3 W2 result addendum; TECH_DEBT TD-RELIABILITY-COPIES-OUTSIDE-JC-1 (ndarray::hpc::reliability and perturbation-sim::stats); SUPERSESSION-INDEX regenerated last. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFnYKqw6d7TTiB9cT8eFdK
|
Warning Review limit reachedNext included review available in 9 minutes. View limit detailsLimit details: You’ve used the included review currently available. Your 80 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Essentials Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (21)
Comment |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_da9bf458-0f7e-4792-8ffa-0338f771696e) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: be8b1677f5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ta None - jc::quorum: max_u8_variance(k) = 255^2 * floor(k/2) * ceil(k/2) / k^2 replaces the even-k constant. The lifted source normalised every k by (255/2)^2, so a maximally split three-lens cell [0, 0, 255] scored 15 instead of 0; perfected in jc per the ruling. New two-sided test (k = 3 maximal -> 0, k = 2 maximal -> 0, k = 3 half-split strictly between) + doctest. 7/7 + doctests green. - lab silu_correction: MATERIAL_CORRECTION / LARGE_CORRECTION are f32 and promoted with the samples, so a correction of exactly 0.1f32 stays 'not more than' 0.1 as the retired code had it; correction_stats returns Option — None for a non-finite correction (an invalid run), Some(empty) only for an empty set. Test pins both; silu_crosscheck adapts (expect + one f32 cast). 10/10 green, both examples compile. - Board: LATEST_STATE / PR_ARC same-PR lines updated. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFnYKqw6d7TTiB9cT8eFdK
…n main) awareness_dto.rs / persona.rs / world_model.rs were edited in #1142 and never run through rustfmt; the style workflow's format job walks the lab crate too, so main has been red on it since that merge. Formatting only. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFnYKqw6d7TTiB9cT8eFdK
|
CI note — Generated by Claude Code |
What
W2 of
thinking-engine-harvest-closure-v1, deliverable D-TEH-3 (math half): the calibration battery is split by NATURE per §1d and the rulingE-JC-IS-THE-HOME-OF-ALL-CALIBRATED-MATH-1— MATH goes tojc, GLUE stays in the lab crate and calls jc, and every lab copy of a statistic dies in this PR.jc (new surface, no existing estimator changed)
jc::drift—reencode_drift(value, max_iterations, codec, round_trip)/reencode_batch(the re-encode convergence statistic; the round trip is a closure the caller supplies, so the statistic is codec-agnostic) anddelta_summary(deltas, material, large)(mean / mean|δ| / max|δ| / population σ / fraction above two caller-named cut-offs). 8 tests.jc::quorum—pairwise_agreement_u8(per-pair1 − σ/σ_max(k)overku8lens tables, withmax_u8_variance(k)the ceiling attainable for THATk— NOT an α per pair, and the name now says so),QuorumLevelwith its 230/179/128 floors,cronbach_report(α by delegation toreliability::cronbach_alpha+ per-subject variances + themean + σdisagreement count). 7 tests.jc::reliability— two lift-gate tests only, carrying the retired lab forms verbatim so the comparison outlives the deleted source.The lift gate — run on fixtures that can DISTINGUISH the copies
f32vs jcf64)1e-5(0.984615)1e7: jc moves< 1e-9(α is affine-invariant), thef32copy loses the fixture outright1e-6y = [1,2,2,3]: lab returns 1.000, jc returns the textbook 0.948683k:[0, 0, 255]atk = 3scored 15 under the lifted even-kceiling, now 0The Spearman result is the finding: the retired copy's own three tests were all tie-free, so "agrees on the existing tests" was true and meant nothing. A calibration battery comparing baked
u8lens distances against ground-truth cosines hits ties constantly, so the retired form was systematically optimistic exactly where it was used. Recorded asE-THE-LIFT-GATE-FOUND-A-TIE-BLIND-SPEARMAN-1.Lab crate (excluded from the workspace)
cronbach.rsdeleted;ground_truth.rslosesspearman_rank_correlation+ranks(+3 tests) and its calibration glue callsjc::reliability::spearman;reencode_safety.rsis glue overjc::drift(ReencodeSafety = jc::drift::ReencodeDrift, three codec wrappers pass closures,test_zipper_offsets+ all 14 tests verbatim — the x256 proof runs through jc);silu_correction.rshasCorrectionStats = jc::drift::DeltaSummarywith the cut-offs namedMATERIAL_CORRECTION/LARGE_CORRECTION(keptf32and promoted with the samples, so exactly0.1f32is not "more than" 0.1) andcorrection_stats -> Option(None= non-finite data,Some(empty)= genuinely empty);certify_jina_v5_7lane.rscalls jc's α (None→NaN, which fails every>=verdict honestly).Cargo.tomlgainsjc = { path = "../jc" }.Review folded in
Codex P2 ×3, all confirmed and fixed in
cfb9b3b: the odd-kquorum ceiling, thef32cut-off boundary, and the NaN-as-empty fallback — each with a two-sided test. Theformatjob was red on the first heads because three lab files from #1142 merged unformatted (main is red on the same job); the rustfmt-only fix is ported here as8c03eb5.Gates
jc lib 136/136 + doctests;
drift/quorum/reliabilityclippy-D warningsclean (the remaining clippy hits in jc are pre-existing files this PR does not touch);cargo fmt --all -- --checkclean. Lab:cargo check --lib --examplesclean except the pre-existingtts_stream_hhtldexample break (a bgz-tensor private fn, untouched, already underTD-THINKING-ENGINE-EXCLUDED-DEBT-1); lab tests for the three modules 24/24. CI: all eight checks green on8c03eb5.Not in this PR
semantic_chunker/spiral_segmenthalves of D-TEH-3 — gated on their own falsifiers, separate.siluandcosine_f32stay in the lab (activation and vector glue, not calibrated math).ndarray::hpc::reliabilityandperturbation-sim::statscarry the same four estimators (both tie-aware, both correct in the sense above). Filed asTD-RELIABILITY-COPIES-OUTSIDE-JC-1: the ruling names the ndarray direction as a deliberate PR with a bit-exactness gate, not a drive-by.Board
Records the #1142 merge in LATEST_STATE; EPIPHANIES entry; PR_ARC entry (with the review round); STATUS_BOARD + plan §5 D-TEH-3 (math half Shipped) + §3 W2 result addendum; TECH_DEBT entry; SUPERSESSION-INDEX regenerated last (byte-identical).
🤖 Generated with Claude Code
https://claude.ai/code/session_01PFnYKqw6d7TTiB9cT8eFdK