Skip to content

Populate rent (ACS donor) and childcare (CPS ASEC) — close Gate-2 zero-targets#180

Merged
MaxGhenis merged 3 commits into
mainfrom
claude/step4-rent-childcare-20260602
Jun 2, 2026
Merged

Populate rent (ACS donor) and childcare (CPS ASEC) — close Gate-2 zero-targets#180
MaxGhenis merged 3 commits into
mainfrom
claude/step4-rent-childcare-20260602

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

@MaxGhenis MaxGhenis commented Jun 2, 2026

Summary

Fixes the two largest residual targets on the national Gate-2 surface, both caused by MP exporting a value as $0:

  1. nation/census/rent — MP $0 vs ~$735B baseline (the Advance PE rebuild diagnostics and source alignment #1 residual, +0.0017).
  2. spm_unit_capped_work_childcare_expense — MP $0 vs ~$348B baseline (docs: core wiring audit for microplex primitives #2, +0.0008).

Together ~14% of MP's residual robust loss after APG calibration.

Rent — always enable the ACS donor

MP already has an ACS source-impute block for rent + real_estate_taxes (the same pair eCPS imputes from ACS), but it was gated by include_acs, so the no-ACS / "eCPS-shaped" build variants dropped it and exported rent=$0.

Per the intended architecture, ACS has two independent controls: ACS-as-spine (multispine, currently disabled) and the ACS donor (must always be enabled). The ACS donor is now always appended in default_policyengine_us_data_rebuild_source_providers. Multispine remains a separate, not-yet-enabled control.

Behavior change: the ACS donor is mandatory — include_donor_surveys=False no longer drops it. The now-dead include_acs parameter and the --include-acs CLI flag are removed entirely (they were no-ops once the donor became mandatory). Provider-assembly tests are updated accordingly.

Childcare — read it from CPS ASEC

eCPS reads childcare straight from the CPS ASEC SPM field SPM_CHILDCAREXPNS; MP never mapped it. Wire SPM_CHILDCAREXPNS -> spm_unit_pre_subsidy_childcare_expenses through the same path as spm_unit_energy_subsidy: the PERSON_VARIABLES rename, the nonnegative + zero-default value-column lists, and the _attach_spm_unit_source_columns aggregation.

PolicyEngine computes spm_unit_capped_work_childcare_expenses (the target) from this input via min(work_expenses + max(pre_subsidy_childcare, 0), earned_cap), so the computed variable is not exported — the frozen export contract excludes it as formula-owned, and exporting it would trip the deep contract gate's extra-column check.

Tests

  • test_load_cps_asec_derives_policyengine_value_inputs — extends the SPM_ENGVAL mapping test with SPM_CHILDCAREXPNS (incl. negative→0 clamp).
  • test_build_policyengine_entity_tables_preserves_spm_source_inputs — extends the per-person→spm_unit aggregation test with childcare.
  • test_build_policyengine_us_export_variable_maps_includes_contract_inputs — guards that childcare reaches the inferred export map (not only tables.spm_units).
  • Provider-assembly tests updated for the always-on ACS donor.
  • ruff clean; affected unit tests pass.

Review

Independent review-fix cycle run: confirmed the ACS-always-on blast radius is contained, the childcare "first" aggregation and entity routing are correct, and (empirically) the capped target computes non-zero from the exported pre_subsidy input. The one actionable finding (missing export-map guard) is fixed; the dead include_acs param was dropped.

Validation status

Unit-level logic is validated. Numeric validation (rent → ~$735B, childcare → ~$348B in a built artifact) requires a full CPS rebuild and is left to CI / a build run — not exercised locally.

🤖 Generated with Claude Code

MaxGhenis and others added 2 commits June 2, 2026 13:38
The ACS donor provider supplies the rent and real_estate_taxes source
imputation that eCPS also draws from ACS. It was gated by include_acs, so
the no-ACS / "eCPS-shaped" build variants dropped it and exported rent=$0
(the nation/census/rent target read $0 against a ~$735B baseline).

Decouple the ACS donor from include_acs / include_donor_surveys so it is
always enabled. ACS as a population spine ("multispine") remains a separate,
not-yet-enabled control. Update the CLI help text and the two provider-
assembly tests that encoded the old can-disable behavior.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
MP exported spm_unit_pre_subsidy_childcare_expenses as zero, so the national
childcare target (spm_unit_capped_work_childcare_expenses) read $0 against a
~$348B baseline. eCPS reads the input directly from the CPS ASEC SPM field
SPM_CHILDCAREXPNS.

Wire SPM_CHILDCAREXPNS -> spm_unit_pre_subsidy_childcare_expenses through the
same path as spm_unit_energy_subsidy: the PERSON_VARIABLES rename, the
nonnegative and zero-default value-column lists, and the spm_unit source-column
aggregation. PolicyEngine computes spm_unit_capped_work_childcare_expenses from
this input, so the computed variable is not exported (the frozen export contract
deliberately excludes it as formula-owned). Mirror the existing energy-subsidy
mapping and entity-aggregation tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@MaxGhenis MaxGhenis force-pushed the claude/step4-rent-childcare-20260602 branch from c121290 to 3fd497b Compare June 2, 2026 17:40
… export map

- Drop the now-dead include_acs parameter entirely. After the ACS donor
  became mandatory it was a silent no-op, so remove it from the provider
  function, the checkpoint build function, and the --include-acs CLI flag,
  and delete the redundant test that exercised include_acs=False. ACS-as-spine
  (multispine) remains the separate, not-yet-enabled control.
- Add spm_unit_pre_subsidy_childcare_expenses to
  test_build_policyengine_us_export_variable_maps_includes_contract_inputs so a
  fast unit test guards that childcare reaches the inferred export map, not only
  tables.spm_units.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@MaxGhenis MaxGhenis marked this pull request as ready for review June 2, 2026 18:10
@MaxGhenis MaxGhenis merged commit 32a993c into main Jun 2, 2026
5 checks passed
@MaxGhenis MaxGhenis deleted the claude/step4-rent-childcare-20260602 branch June 2, 2026 18:10
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