First calibrated UK rowwise candidate builder (#495 increment 6d) - #553
Merged
Conversation
Increment 6d of the UK dense/local epic (#495): one command from the national staging H5 to a calibrated rowwise candidate, composing the three merged increments — the ladder clone route (#540), the rowwise solve surface (#541), and the census household-count family (#542). Pipeline: load the ladder, clone through the ladder route (release gate runs before a result exists), bind the constituency household-count targets from the SAME loaded ladder (pairing provenance recorded), solve one weight per cloned household under the reviewed doctrine, append the canonical rowwise_calibration_mass_record, re-gate on the calibrated weights, transition the weight kind to CALIBRATED through assert_kind_transition, and write the candidate H5 with evidence sidecars. The candidate is an adjudicated partial by construction: exactly one target family is bound and named in the manifest as bound_target_families; unbound census families stay unbound rather than approximated. Publication is deliberately NOT automated — the tool writes a local candidate and its evidence, nothing more. Implementation delegated to sol (gpt-5.6-sol) cross-family and verified here: tests and lint re-run independently, the calibration path read line by line, and assert_kind_transition confirmed as a real populace.frame contract rather than an invented helper. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
MaxGhenis
added a commit
that referenced
this pull request
Jul 25, 2026
Rebase of the two sol-round commits onto current main (#510/#542/#548/#553): - _enforce_ssi_take_up_delivery keeps #548's secured-batch shape (failure lines, no raising) with the round-2 sha256 pin folded into the retry line inside the guarded write. - The #548 cofailure mega-test's exact gate_failures list and the round-2 event-order assertion both updated: stage gate -> early write -> final gate -> delivery gate -> enforce rewrite. - Both function additions kept at the collision point (#548's Medicaid quarantine helper, round-1's assignment digest). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
MaxGhenis
added a commit
that referenced
this pull request
Jul 25, 2026
…) (#549) * Address sol cross-family review round 1 (#507/#508 PR #524) 3 CRITICAL / 4 MAJOR / 3 MINOR findings, all addressed: - Basis trust (C1): required --ssi-take-up-prior-weight-basis-sha256 pin (launch-command receipt, mismatch fails fast); schema-3 measurement_phase marker (loader + delivery gate accept release_final only); schema-3 artifacts must pass the full diagnostics gate at load. - Checkpoint split-brain (C2): ssi_take_up_assignment_sha256 (flags + priors + basis digest) joins the target-frame checkpoint identity and the materialization cache context, so a retry with different thresholds can never solve against stale SSI rows. - Dual-failure artifact skip (C3): us_ssi_take_up.json is written the moment the final measurement exists, before the integrity gate can raise; duplicate late write removed. - Estimand (M4): _band_prior is now the anchored-mass-corrected (target - floor)/(capacity - floor) — naive target/capacity overshoots by floor*(1 - T/C), first-order +15.3%/+22.3% on Build-N-scale floors vs the 5% gate. Fallbacks preserved; contracts updated; owner-flagged. - Infeasible enforced basis (M5): loader rejects enforced-band capacity <= target; saturated now means capacity <= target. - Epsilon (M6): dimensionless 1e-9 for prior arithmetic audits. - Layout trust (M7): by-age rows must carry the pinned feed's band vocabulary (under_18/age_18_to_64/age_65_or_older) with consistent age bounds; mismatches raise. Synthetic fixtures aligned to the real feed. - Hardening (m8): delivery gate converts non-numeric delivered weights to gate failures; basis dataclass coerces stored floats. - Doc rot (m9): take_up_contract.json + COVERAGE_PROGRESS.md updated. - Test rot (m10): tolerance pinned 0.05; schema-2 fixture literals frozen; parity fixture declares all three red-line families; new tests for digest divergence, cache threading, phases, 1e20 tamper, equality saturation. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Address sol verification round 2 (#507/#508 PR #524) Round-2 verdict on 4bc5603: 5 RESOLVED, 4 PARTIAL, 1 new MINOR. All addressed: - F2 (blocking partial): the #217 reform-vector cache projection now carries ssi_take_up_assignment_sha256 — whether a JCT reform vector can move with the take-up flag is an engine-graph question the build must not answer by assumption; correctness over cache warmth. Projection divergence test added. - F4 partial: floor >= target now outranks the saturation fallback, so the degenerate capacity == target == floor corner draws zero instead of Bernoulli(1.0). _band_prior unit test covers all four regimes. - F7 partial: by-age rows must use the canonical half-open operators (>= lower, < upper); '> lower' / '<= upper' spellings raise instead of silently binding a reshaped stratum through _age_bounds' strictness erasure. - F8 partial: the main diagnostics gate coerces every payload numeric via _checked_int/_finite_float — malformed types become named failures, never a raise upstream of the retry-artifact write. - F10 partial: epsilon regression pinned with a current-capacity 1e20 fixture that passed under the old mass-scaled comparator; the mega-test now records the ssi event order (write before final integrity gate before delivery); reform-vector projection has its own divergence test. - New MINOR: the delivery-failure error and telemetry now carry the written artifact's sha256 — the failure hands the operator both halves of the --ssi-take-up-prior-weight-basis retry pin. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Supply the frozen-assignment digest in #545's checkpoint identity test #545's stale-materializer regression and #543's basis-key case both call _target_frame_checkpoint_identity, which now requires the frozen-assignment digest. The basis-key case holds the digest equal to the writing run's so it still isolates ssi_take_up_prior_weight_basis_sha256 (#543 instance 2). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Reconcile the review hardening with the #548 batched terminal gates Rebase of the two sol-round commits onto current main (#510/#542/#548/#553): - _enforce_ssi_take_up_delivery keeps #548's secured-batch shape (failure lines, no raising) with the round-2 sha256 pin folded into the retry line inside the guarded write. - The #548 cofailure mega-test's exact gate_failures list and the round-2 event-order assertion both updated: stage gate -> early write -> final gate -> delivery gate -> enforce rewrite. - Both function additions kept at the collision point (#548's Medicaid quarantine helper, round-1's assignment digest). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.
What
Increment 6d of #495 — the increment the whole epic was built toward. One command from the national staging H5 to a calibrated rowwise candidate, composing the three increments merged today: the ladder clone route (#540), the rowwise solve surface (#541), and the census household-count family (#542).
Pipeline: load the ladder → clone through the ladder route (its release-blocking gate runs before a result exists) → bind constituency household-count targets from the same loaded ladder, with
ladder_target_provenancerecorded so ladder-A targets can never silently calibrate a ladder-B assignment → solve one weight per cloned household under the reviewed doctrine → append the canonicalrowwise_calibration_mass_record→ re-gate on the calibrated weights → transition the weight kind toCALIBRATEDviaassert_kind_transition→ write the candidate H5 plus evidence sidecars (manifest, solve diagnostics, area support, past-cap census).What this candidate is, stated plainly
An adjudicated partial. Exactly one target family is bound, named in the manifest as
bound_target_families; unbound census families stay unbound rather than approximated. And the bound family's targets are the ladder's own household counts — the same artifact that assigns geography. That is self-consistent by construction, which makes this a strong end-to-end test of the machinery and a weak test of calibration value. The real proof arrives when an independent family binds (UC counts, HMRC income), which needs the fence adjudications the census already records.Publication is deliberately not automated: the tool writes a local candidate and its evidence, nothing more.
Provenance of the code
Implementation delegated to sol (gpt-5.6-sol) cross-family — this session is off Fable on quota — and verified here rather than trusted: tests and lint re-run independently, the calibration path read line by line,
assert_kind_transitionconfirmed as a realpopulace.framecontract rather than an invented helper, and 189 lines of scope creep into the root journals reverted (populace's CLAUDE.md is explicit that those are history, not state).Testing
5 new tests: synthetic end-to-end (candidate written, weight kind CALIBRATED, exactly one calibration record appended, manifest names the bound family and carries provenance + gate, sidecars present), and
--dry-runwrites no dataset. 36 adjacent UK tests green; ruff clean. The real K=2 build against the restricted staging artifact runs outside CI — results posted to #495.Part of #495.
🤖 Generated with Claude Code