Skip to content

Store the ACS local donor's retired inputs under the live ones - #1309

Merged
MaxGhenis merged 1 commit into
mainfrom
us-acs-local-live-inputs-1263
Oct 18, 2026
Merged

MaxGhenis merged 1 commit into
mainfrom
us-acs-local-live-inputs-1263

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Part of #1263. Unblocks the ACS-local rebuild's package stage.

Why

The rebuilt ACS-local release (acs-release-1263-d61bce076) completed materialize, calibrate, qa and finalize on Modal. Package then refused it at the stored-inputs gate (#1026, d271):

stored column 'medicare_part_b_premiums' (person table) looks like a model input but is not a variable in policyengine-us 2.2.1 … stored column 'would_claim_wic' (person table) …

Both come from the donor populace-us-2024-spm-receipts-20260923. The 2026-09-23 ACS-local release predates the gate. US_STORED_NON_VARIABLE_COLUMNS leaves both out on purpose, as retired engine inputs, and its text names the remedy. Nothing in the ACS chain applied it.

Measured on the calibrated artifact (counts only):

  • would_claim_wic is stored for all 166,321 donor people (ASEC 66,001; PUF 100,320) and missing for all 3,420,942 ACS people.
  • medicare_part_b_premiums has the same split.

Change

microcosm.build.us_runtime.retired_stored_inputs.with_live_stored_inputs, applied in the calibrate stage's consumer export (_write_calibrated_artifact), after the reviewed-null fill:

  • would_claim_wic → takes_up_wic_if_eligible. Every stored decision is kept. A person without one takes WIC up when eligible (True). That is the engine's default, and the assumption policyengine.py applies to exactly these cells today (legacy_inputs._temporary_acs_wic_values). So simulation results through policyengine.py are unchanged, and a plain policyengine-us consumer now reads the donor decisions it used to ignore.
    • The rule reads no provenance column (spine-blindness scan). The tool passes the ACS spine (person_spine == acs_2024_1yr) as the people who may lack a decision, and a missing decision on anyone else is refused.
    • Non-Boolean stored values are refused, as is a frame that stores both names, and an engine that defines the retired name or lacks the live one.
  • medicare_part_b_premiums is no longer stored. The register says no engine version from 1.690.7 to 2.15.1 reads it or its successor.
  • Provenance. consumer_export.json records live_stored_inputs (counts only). Finalize adds the reviewed limitation acs_wic_takeup_assumed_interim, whose flip condition is microcosm#1154 and its generator Generate complete ACS WIC participation and reject missing release inputs #1156.

The materialize checkpoint is reused. Only calibrate, qa, finalize and package rerun, about 35 minutes on Modal. The run identity pins the staging and ladder hashes, not the code commit, and materialize code is unchanged here.

Invariants (property-tested)

For every person table where only allowed people lack a decision:

  • stored decisions survive exactly;
  • only allowed gaps become True;
  • kept plus assumed equals the person count;
  • the stored-True count is conserved;
  • a second pass is a no-op;
  • ids, weights and other columns are unchanged;
  • after the remedy, the stored-inputs rule refuses neither retired name nor the live one.

Tests

  • test_us_retired_stored_inputs.py: 20 tests, including Hypothesis.
  • Tool tests: the mask comes from the spine tag; the remedied columns pass the gate against the installed engine; the limitation appears exactly when the assumption was applied.
  • Run locally, all passing: the spine-blindness scan with the module tests (518), the release-tool tests with the module tests (92, 1 skipped), and every stored_input test in microcosm-data and microcosm-build engine-free (180, 1 skipped).

Follow-up, not here: once the d1386 national build publishes, the donor stores the live name itself. Its ACS rows would then need the #1156 generator, or a reviewed-null decision, at materialize.

🤖 Generated with Claude Code

The ACS local-area release's package stage refused the rebuilt artifact:
it stores would_claim_wic and medicare_part_b_premiums, engine input names
policyengine-us 2.2.1 no longer defines, inherited from the donor
populace-us-2024-spm-receipts-20260923. The stored-inputs register (d271)
leaves both out on purpose and names the remedy; the consumer export now
applies it (microcosm#1263):

- would_claim_wic becomes takes_up_wic_if_eligible. Donor decisions are
  kept; people without one take WIC up when eligible, the engine's default
  and the assumption policyengine.py applies to the same cells today. The
  rule reads no provenance: the release tool passes the ACS spine as the
  people who may lack a decision, and a missing decision on anyone else is
  refused.
- medicare_part_b_premiums is no longer stored.

Finalize discloses the WIC assumption as acs_wic_takeup_assumed_interim
until the staging generates ACS participation (microcosm#1154, #1156).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Merge audit, head 766b7c792f17a00739783d013395fc15701f34cd:

  • CI: all 10 checks pass on this head: engine-free, engine-us and engine-uk on 3.13 and 3.14, integration-uk, lint, wheels and select-countries.

  • Independent review: GPT-6.1 Sol (Subfleet 20261016-220039-mc1309-review-r1) returned APPROVE, no blockers, at this head. It checked:

    • that stored decisions are preserved;
    • outcome equivalence with policyengine.py's _temporary_acs_wic_values;
    • the MONTH-period handling;
    • the wiring after fill_reviewed_nulls;
    • the soundness of rerunning calibrate onward on the existing materialize checkpoint;
    • spine blindness;
    • acceptance by the publisher contract.

    Its three minor findings and its nits go to a follow-up PR:

    • bind the code commit across stages;
    • word the limitation text exactly;
    • widen the dtype and mask test coverage.
  • Release: the ACS-local release for ACS local release: supply source-backed SPM independence (is_spm_independent_minor_role) so every SPM unit has a classified adult #1263 was packaged from this exact commit on Modal: calibrate, qa, finalize and package COMPLETED, run acs-release-1263-d61bce076. Merging with a merge commit keeps the commit in main's history.

@MaxGhenis
MaxGhenis merged commit be73196 into main Oct 18, 2026
10 checks passed
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