Populate rent (ACS donor) and childcare (CPS ASEC) — close Gate-2 zero-targets#180
Merged
Merged
Conversation
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>
c121290 to
3fd497b
Compare
… 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>
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.
Summary
Fixes the two largest residual targets on the national Gate-2 surface, both caused by MP exporting a value as
$0:nation/census/rent— MP$0vs~$735Bbaseline (the Advance PE rebuild diagnostics and source alignment #1 residual, +0.0017).spm_unit_capped_work_childcare_expense— MP$0vs~$348Bbaseline (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 byinclude_acs, so the no-ACS / "eCPS-shaped" build variants dropped it and exportedrent=$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=Falseno longer drops it. The now-deadinclude_acsparameter and the--include-acsCLI 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. WireSPM_CHILDCAREXPNS -> spm_unit_pre_subsidy_childcare_expensesthrough the same path asspm_unit_energy_subsidy: thePERSON_VARIABLESrename, the nonnegative + zero-default value-column lists, and the_attach_spm_unit_source_columnsaggregation.PolicyEngine computes
spm_unit_capped_work_childcare_expenses(the target) from this input viamin(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 withSPM_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 onlytables.spm_units).ruffclean; 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 deadinclude_acsparam 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