Skip to content

Selection-mass protection targets: the refit must preserve swapped-in mass (#445)#446

Merged
MaxGhenis merged 1 commit into
mainfrom
selection-mass-protection
Jul 17, 2026
Merged

Selection-mass protection targets: the refit must preserve swapped-in mass (#445)#446
MaxGhenis merged 1 commit into
mainfrom
selection-mass-protection

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

Fixes #445

Why

Attempt 15 proved the last defect standing: the #434 protect-swap put all 13 keogh carriers in the frozen selection, but nothing protects their mass — keogh is untargeted, so the refit crushed the carriers' weights and $148.97M of locked ASEC source mass exported as $6.108M (smoke: +$145,380 vs the ≥$1M floor). Full adjudication in #445; Max picked option A.

What

--selection-mass-protection COLUMN (repeatable): the column's locked-source mass — measured on the base pool at base weights at build time, never hardcoded — is injected as a synthetic national calibration target, so the refit has a loss term holding the mass the swap put in-selection.

  • Rides existing machinery: the spec declares the standard policyengine_variable materializer (measure_mode: sum), so the fresh-materialize and checkpoint-reload paths both compile it — zero new materialization code.
  • Sequencing: injected after the target-parity contract runs on the compiled feed registry (run-scoped builder target, not a feed family; provenance in spec metadata: target_role, protected_column, base_pool_carriers, issue).
  • Checkpoint safety: the identity carries the protection list only when configured — unprotected runs keep bit-identical legacy digests (dense arm's warm checkpoints stay valid; asserted by test), while a protected run misses a column-less legacy checkpoint instead of loading it (a load would silently drop the spec — _compile_materialized_target_registry keeps only specs whose measures exist on the materialized household table; the miss is asserted by test against a real written checkpoint).
  • Fail-closed: absent column / zero carriers / signed net-zero are configuration errors.

Tests

  • test_selection_mass_protection_specs_measure_locked_source_mass — measured value ($700k on the fixture), materializer contract, provenance fields.
  • test_selection_mass_protection_specs_fail_closed — absent column and zero-carrier raises.
  • test_checkpoint_identity_protection_key_and_stale_checkpoint_miss — legacy digest bit-identical without protections; protected identity misses a legacy checkpoint (returns None, no silent spec drop).

Full builder suite green locally. Attempt 16 runs with --selection-mass-protection keogh_distributions; expected smoke score ≈ +$24.47M. The protection lifts when keogh gains a real Ledger fact (#445 remedy 2).

🤖 Generated with Claude Code

…d-in mass

Fixes populace#445.

Build M attempt 15: the #434 protect-swap carried all 13 keogh
carriers into the frozen selection, but keogh_distributions is
untargeted (zero facts in the feed), so the refit crushed their
weights - $148.97M of locked ASEC source mass exported as $6.108M
(-96%) and the smoke probe scored +$145,380 against its >=$1M floor.
Membership protection without mass protection is not protection.

New --selection-mass-protection COLUMN (repeatable): each protected
column becomes an ordinary national calibration target whose value is
the base pool's own locked-source mass at base weights - measured at
build time, never hardcoded - so the solve must preserve the mass the
swap put in-selection. Design points:

- The spec rides the standard policyengine_variable materializer
  (measure_mode sum, base_variable = the column), so BOTH the fresh
  materialization path and the checkpoint-reload path compile it; no
  new materialization machinery.
- Injected after the target-parity contract runs on the compiled feed
  registry: these are run-scoped builder targets with build-manifest
  provenance (metadata carries target_role/protected_column/carriers/
  issue), not feed families.
- The checkpoint identity carries the protection list ONLY when
  configured: unprotected runs (the dense arm, every prior sparse run)
  keep bit-identical legacy digests and warm checkpoints, while a
  protected run MISSES a column-less legacy checkpoint - a load would
  silently drop the spec, because _compile_materialized_target_registry
  keeps only specs whose measures exist on the materialized household
  table.
- Fail-closed spec construction: absent column, zero carriers, and
  signed net-zero mass are configuration errors.

The protection lifts when the concept gains a real Ledger fact
(populace#445 remedy 2, the SOI-identification path #432 prescribes
for every unpinned column).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis merged commit 98bf731 into main Jul 17, 2026
4 checks passed
@MaxGhenis
MaxGhenis deleted the selection-mass-protection branch July 17, 2026 02:22
MaxGhenis added a commit that referenced this pull request Jul 20, 2026
#465)

populace#451 items 3-4, release-builder side. Anchor receipts and the
support measurements are on the issue.

- The W-2 Box 7 dollar aggregate now binds as a sum-mode tip_income
  target: form_w2_item facts carry the generic "amount" measure id, so
  the layout override must run before the unmapped early-return (the
  return-count branch only ever worked because "return_count" happens
  to sit in the returns map). On certified Build M support this is a
  ~3x pull: 549 carriers / $9.886B weighted vs the $26.79B TY2020
  anchor - pair the N launch with a tip_income selection-mass
  protection (#446 pattern).
- The stale return-count exclusion reason claimed no positive tip
  support exists; the SIPP tip stage has since landed. The corrected
  reason states the real bar: 549 carriers are under 1% of the 6.04M
  return class, so the count target waits for support widening rather
  than demanding ~600x weight concentration.
- Two reform-coverage probes (generated manifest, 37 -> 39): tips and
  FLSA overtime premium neutralization at 2026 law. Both columns are
  attribution-only (W-2 wages already contain the dollars); their sole
  federal tax channel is the OBBBA deductions, so 2024-law probes
  measure exactly $0 and the guarded sign is negative. Measured on
  certified Build M: tips -$413.4M (floor $100M), overtime -$16.88B
  (floor $4B).

Deliberately NOT wired, with support oracles on the issue: the SE
health ALD target (engine computes 0 carriers / $0 until the premium
attribution stage lands) and the keogh ALD target (1,643 carriers /
$0.92B modeled vs $30.13B SOI - a 34x stretch in the same class as the
excluded tips count).

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.

Refit crushes keogh carrier weights to $6.1M of $148.97M — smoke floor unreachable on the sparse arm (attempt 15)

1 participant