Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
e31bc0e
Net child care subsidies from the SPM expense in every state
MaxGhenis Nov 1, 2026
ac341ab
Test child care subsidies in the SPM
MaxGhenis Nov 1, 2026
343f8fe
Pin the size of the SPM expense fall in the differential test
MaxGhenis Nov 1, 2026
606699d
Close the review's gaps in the SPM child care rule
MaxGhenis Nov 1, 2026
640753a
Keep pre-2024 child care subsidies in the reform copies
MaxGhenis Nov 1, 2026
1a68fe7
Pin the 2024 gate in each reform copy of the SPM benefits list
MaxGhenis Nov 2, 2026
513aa0b
Merge remote-tracking branch 'upstream/main' into spm-child-care-subs…
MaxGhenis Nov 2, 2026
33b0f7a
Merge remote-tracking branch 'upstream/main' into spm-child-care-subs…
MaxGhenis Nov 2, 2026
652e968
Keep reported child care spending as the SPM expense over a dataset
MaxGhenis Nov 2, 2026
43fcba9
Merge remote-tracking branch 'upstream/main' into spm-child-care-subs…
MaxGhenis Nov 3, 2026
08367ac
Pin the baseline arm the dataset rule reads, and set W and C on the p…
MaxGhenis Nov 3, 2026
6946cd7
Name main's arm rebuild in the arm test's docstring
MaxGhenis Nov 3, 2026
678d423
Drop holders built for another policy when rebuilding the baseline arm
MaxGhenis Nov 3, 2026
a8b9e1b
Merge remote-tracking branch 'upstream/main' into spm-child-care-subs…
MaxGhenis Nov 3, 2026
ed6d04a
Merge remote-tracking branch 'upstream/main' into spm-child-care-subs…
MaxGhenis Nov 3, 2026
13fc027
Read household_child_care_subsidies in the SPM invariant tests
MaxGhenis Nov 3, 2026
5a6557a
Set again the inputs a reform stores apart from baseline policy
MaxGhenis Nov 3, 2026
51231f0
Merge upstream/main into spm-child-care-subsidies
MaxGhenis Nov 23, 2026
7da8e23
Replay to the baseline arm only the inputs the reform still holds
MaxGhenis Nov 24, 2026
279f654
Update the New York and Colorado integration cases for main's changes
MaxGhenis Nov 24, 2026
5b05e30
Say what apply_reform drops under current core
MaxGhenis Nov 24, 2026
3ba8fc7
Keep only stored inputs for the arm, and calculate what it can't place
MaxGhenis Nov 24, 2026
a109f69
Keep an input under each key core stored it under
MaxGhenis Nov 24, 2026
165fd41
Match kept weight periods by name, and keep no entity IDs for the arm
MaxGhenis Nov 24, 2026
87aec74
Cut the input replay from the baseline arm; refuse a dropped input by…
MaxGhenis Nov 25, 2026
c71aad6
Read the guard from the baseline arm's own record
MaxGhenis Nov 25, 2026
70bffb0
Drop the guard's unused source parameter; say where it fires
MaxGhenis Nov 25, 2026
dcce719
Test the guard, its limit and a subsampled branch's arm; drop replay …
MaxGhenis Nov 25, 2026
da87cae
Test that no shipped reform stores a variable apart from baseline policy
MaxGhenis Nov 25, 2026
61baf5d
Pin the household rule's childcare_expenses precedence in YAML
MaxGhenis Nov 25, 2026
94a0cb6
Pin the household rule's floor for a unit with no child
MaxGhenis Nov 25, 2026
2611629
Test that the rebuild drops a reform's empty holder from the arm
MaxGhenis Nov 25, 2026
ef189c4
Pin that members' pre-subsidy amounts replace the unit's in the house…
MaxGhenis Nov 25, 2026
7da15ac
Read annotated assignments in the static reach test
MaxGhenis Nov 25, 2026
30660da
Correct the empty-holder comment in the subsampling test
MaxGhenis Nov 25, 2026
94d85c1
Merge main into rework-10569
MaxGhenis Nov 25, 2026
23b81c5
Give a branch's subsample the arm wherever its baseline entry is anot…
MaxGhenis Nov 26, 2026
c9e7e14
Align #10975's subsampled-branch tests with a branch's own baseline
MaxGhenis Nov 26, 2026
1b9dec8
Pin that one child's pre-subsidy amount replaces the unit's amount
MaxGhenis Nov 26, 2026
4f52713
Say what a subsample does to the baseline's people and inputs
MaxGhenis Nov 26, 2026
a92315e
Pin that a failed subsample with no arm raises core's error
MaxGhenis Nov 26, 2026
e9fc366
Refuse to subsample a simulation named "baseline" that has an arm
MaxGhenis Nov 26, 2026
439c863
Keep the dataset reading of the SPM child care expense through snapshots
MaxGhenis Nov 26, 2026
202b79e
Give a marked reload's arm the snapshot's overrides, and mark dumps
MaxGhenis Nov 26, 2026
a7c0042
Describe snapshots, situations and dumps in the docs and changelog
MaxGhenis Nov 26, 2026
cf7a43e
Narrow the docs' arm-override sentence to formula overrides
MaxGhenis Nov 26, 2026
d10cddb
Say what a reload gives the arm for each kind of hand-set value
MaxGhenis Nov 26, 2026
688fc8d
Say how a situation's reform arm and a restored dump read the expense
MaxGhenis Nov 26, 2026
d367d8c
Describe the baseline arm's listed inputs in the snapshot comments
MaxGhenis Nov 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,14 @@ REST_SOCIAL_SECURITY_PIA_RATIO_INPUT_TESTS := $(TESTS)/core/test_ss_pia_ratio_in
# a default Microsimulation only to read parameters. Release their heap before
# the remaining policy tests, rather than stacking both in the 13.9 GB group.
REST_POLICY_PARAMETER_TESTS := $(TESTS)/policy/baseline/parameters
# The first four files retain three independent full systems (the two CTC
# The first five files retain four independent full systems (the two CTC
# files share one). The last two use transient TX simulations and balance
# elapsed time without warming the NY/AL pinned-system cache.
REST_REMAINING_HEAVY_TESTS := $(TESTS)/test_niit_section_911_magi.py \
$(TESTS)/test_ctc_foreign_earned_income_exclusion.py \
$(TESTS)/test_ctc_foreign_earned_income_exclusion_property.py \
$(TESTS)/unit/test_medicaid_abd_ssi_rate_standard_properties.py \
$(TESTS)/test_spm_child_care_subsidy_invariants.py \
$(TESTS)/test_capital_gain_distributions_loss_limit.py \
$(TESTS)/test_schedule_d_filer_net_capital_gain.py
REST_LISTED_TESTS := $(REST_CACHED_ARRAY_TESTS) $(REST_HEAVY_A_TESTS) $(REST_HEAVY_B_TESTS) \
Expand Down
1 change: 1 addition & 0 deletions changelog.d/spm-child-care-subsidies.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Count every state child care subsidy in the Supplemental Poverty Measure from 2024 by netting it from the SPM child care expense in household calculations, keep the ASEC's reported spending as that expense over a dataset while a reform moves it by the change in subsidy, and add the District of Columbia, Tennessee and Texas subsidies to the 2024 program list. Rebuild a reform's baseline arm without the holders the reform built for its own definition of a variable in another entity or with other ETERNITY storage, as core's own branch does, and raise an error naming the variable when that rebuild would drop an input the caller gave. Give a subsampled branch of a reform simulation its own baseline arm on its sample, and raise an error when a simulation named "baseline" with a baseline arm subsamples, as core would give it baseline policy and drop its arm. Keep the dataset reading of the expense in a simulation built from a snapshot or extracted situation of a dataset simulation and in its baseline arm, which also gets the snapshot's overrides, and in a simulation restored from a dump of one.
46 changes: 40 additions & 6 deletions docs/social-security-benefit-levers.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,46 @@ factors once, and perform their earnings test on the resulting payable amount.
exports all recorded pure-input periods and entity memberships as `sources`,
with supplied formula-variable values in a separate `overrides` payload. Cached
calculations are excluded. `reload_source_inputs(payload, ...)` restores sources
before final overrides. Core's legacy `extract_person` retains every recorded
input period for the four benefit components and their reported twins, excluding
formula caches. This keeps later overrides final on reload and preserves their
source histories and future uprating. Other variables keep Core's usual first
known period. Neither interface settles the separate API/application metadata
and field-exposure contract.
before final overrides. A snapshot of a simulation over a dataset also carries
`"_dataset_inputs": true`, so the reloaded simulation, its baseline arm and its
later branches read `spm_unit_capped_work_childcare_expenses` as a dataset
simulation does; other dataset-only rules, such as county, read the reload as
a household. Core gives a dataset's values to a reform's baseline arm too, so a
marked reload sets each override on its arm as well. For a reform simulation
whose inputs came from a dataset, `export_source_inputs` compares each
override with the input its arm records. Where they differ, as they do for a
value a caller set on the reform after construction, the snapshot lists the
arm's input under `"_baseline_arm_overrides"`, or null where the arm records
none. A marked reload gives its arm each listed input in place of the
override and skips a null one. A pure input or a Social Security component
that a caller sets on a reform simulation after construction reaches both
sides of the reload, though the source's arm lacks it. The pure input travels
in `sources`, and the component travels in the provenance envelope even where
the snapshot lists it as null. A marked snapshot of a simulation with no arm
carries no `"_baseline_arm_overrides"`, so a reload with `reform=` gives its
arm every override. A marked reload skips a variable that baseline policy
doesn't define. It raises, naming the variable, when the arm would get a value
that the reform stores in another entity or with other ETERNITY storage, as a
reform built over the dataset does. A reload raises `ValueError` when the
snapshot's `_dataset_inputs` key holds anything but true or false. The payload
stays at version 1, and a snapshot without the key reloads as a household.
Core's legacy
`extract_person` retains every recorded input period for the four benefit
components and their reported twins, excluding formula caches. This keeps later
overrides final on reload and preserves their source histories and future
uprating. Other variables keep Core's usual first known period. A situation
extracted from a dataset simulation carries the same key, and like the
provenance envelope it loads only through this package's builders. A reform
rebuilt from a situation that `extract_person` or `sample_person` took from a
reform simulation gives its arm the reform side's values. So its arm also takes
a formula value a caller set on the reform after construction, where a marked
snapshot's arm keeps the source arm's value. Neither interface settles the
separate API/application metadata and field-exposure contract. A dump of a
dataset simulation through Core's `dump_simulation` holds the mark, as JSON
true, in `__entities__/dataset_inputs.json`. Core's
`restore_simulation` builds no baseline arm, so where a simulation it restores
from that dump calculates the expense, it reads it as a dataset simulation with
no arm does. An expense the dump already holds comes back as dumped.

Annual benefit inputs retain Core's period normalization. For example, supplying
`social_security_retirement: {"2024-07": 500}` through a PE-US constructor stores
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,58 +96,9 @@ values:
- nc_child_care_subsidies # North Carolina Subsidized Child Care Assistance
- wy_child_care_subsidies # Wyoming Child Care, Purchase of Service
- ny_child_care_subsidies # New York Child Care Assistance Program
2025-01-01:
- ak_child_care_subsidies # Alaska Child Care Assistance Program (PASS)
- ar_child_care_subsidies # Arkansas School Readiness Assistance
- al_child_care_subsidies # Alabama Child Care Subsidy Program
- az_child_care_subsidies # Arizona Child Care Assistance Program
- ca_child_care_subsidies # California Child Care
- co_child_care_subsidies # Colorado Child Care Assistance Program
- ct_child_care_subsidies # Connecticut Care 4 Kids
- de_child_care_subsidies # Delaware Purchase of Care
- fl_child_care_subsidies # Florida School Readiness Program (SR)
- ga_child_care_subsidies # Georgia Childcare and Parent Services
- hi_child_care_subsidies # Hawaii Child Care Subsidy
- ia_child_care_subsidies # Iowa Child Care Assistance
- id_child_care_subsidies # Idaho Child Care Program
- il_child_care_subsidies # Illinois Child Care Assistance Program
- in_child_care_subsidies # Indiana Child Care and Development Fund Voucher Program
- ks_child_care_subsidies # Kansas Child Care Assistance Program
- ky_child_care_subsidies # Kentucky Child Care Assistance Program
- la_child_care_subsidies # Louisiana Child Care Assistance Program
- ma_child_care_subsidies # Massachusetts Child Care Financial Assistance
- md_child_care_subsidies # Maryland Child Care Scholarship
- me_child_care_subsidies # Maine Child Care Affordability Program
- mi_child_care_subsidies # Michigan Child Development and Care program
- mn_child_care_subsidies # Minnesota Child Care Assistance Program
- mo_child_care_subsidies # Missouri Child Care Subsidy
- ms_child_care_subsidies # Mississippi Child Care Payment Program (CCPP)
- mt_child_care_subsidies # Montana Best Beginnings Child Care Scholarship
- ne_child_care_subsidies # Nebraska Child Care Subsidy
- nm_child_care_subsidies # New Mexico Child Care Assistance Program
- vt_child_care_subsidies # Vermont Child Care Financial Assistance Program
- nh_child_care_subsidies # New Hampshire Child Care Scholarship Program
- pa_child_care_subsidies # Pennsylvania Child Care Works
- nj_child_care_subsidies # New Jersey Child Care Assistance Program
- oh_child_care_subsidies # Ohio Publicly Funded Child Care
- nv_child_care_subsidies # Nevada Child Care and Development Program (CCDP)
- or_child_care_subsidies # Oregon Employment Related Day Care
- ri_child_care_subsidies # Rhode Island Child Care Assistance Program
- sc_child_care_subsidies # South Carolina Child Care Scholarship Program
- ut_child_care_subsidies # Utah Child Care Assistance (CC)
- va_child_care_subsidies # Virginia Child Care Subsidy Program
- wa_child_care_subsidies # Washington Working Connections Child Care
- wi_child_care_subsidies # Wisconsin Shares Child Care Subsidy Program
- wv_child_care_subsidies # West Virginia Child Care Assistance Program
- nd_child_care_subsidies # North Dakota Child Care Assistance Program
- ok_child_care_subsidies # Oklahoma Child Care Subsidy Program
- sd_child_care_subsidies # South Dakota Child Care Assistance (CCA)
- nc_child_care_subsidies # North Carolina Subsidized Child Care Assistance
- dc_child_care_subsidies # DC Child Care Subsidy Program
- tn_child_care_subsidies # Tennessee Child Care Certificate Program (Smart Steps)
- wy_child_care_subsidies # Wyoming Child Care, Purchase of Service
- tx_child_care_subsidies # Texas Child Care Services (CCS)
- ny_child_care_subsidies # New York Child Care Assistance Program

metadata:
unit: list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ def formula(spm_unit, period, parameters):
# California programs.
"ca_cvrp", # California Clean Vehicle Rebate Project.
# Colorado programs.
"co_ccap_subsidy",
"co_state_supplement",
"co_oap",
"snap",
Expand Down Expand Up @@ -148,6 +147,12 @@ def formula(spm_unit, period, parameters):
BENEFITS.append("aca_ptc")
if not parameters(period).gov.hud.abolition:
BENEFITS.append("spm_unit_capped_housing_subsidy")
# From 2024, child care subsidies lower the expense in
# spm_unit_capped_work_childcare_expenses instead of adding to
# resources. That expense has no formula before 2024, so this one
# stays a resource until then.
if period.start.year < 2024:
BENEFITS.append("co_ccap_subsidy")
p = parameters(
period
).gov.contrib.congress.tlaib.boost.middle_class_tax_credit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ def formula(spm_unit, period, parameters):
"ssi",
"ma_state_supplement",
"ca_cvrp",
"co_ccap_subsidy",
"co_state_supplement",
"co_oap",
"snap",
Expand Down Expand Up @@ -160,6 +159,12 @@ def formula(spm_unit, period, parameters):
BENEFITS.append("aca_ptc")
if not parameters(period).gov.hud.abolition:
BENEFITS.append("spm_unit_capped_housing_subsidy")
# From 2024, child care subsidies lower the expense in
# spm_unit_capped_work_childcare_expenses instead of adding to
# resources. That expense has no formula before 2024, so this one
# stays a resource until then.
if period.start.year < 2024:
BENEFITS.append("co_ccap_subsidy")

return add(spm_unit, period, BENEFITS)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ def formula(spm_unit, period, parameters):
# California programs.
"ca_cvrp", # California Clean Vehicle Rebate Project.
# Colorado programs.
"co_ccap_subsidy",
"co_state_supplement",
"co_oap",
"snap",
Expand Down Expand Up @@ -177,6 +176,12 @@ def formula(spm_unit, period, parameters):
BENEFITS.append("aca_ptc")
if not parameters(period).gov.hud.abolition:
BENEFITS.append("spm_unit_capped_housing_subsidy")
# From 2024, child care subsidies lower the expense in
# spm_unit_capped_work_childcare_expenses instead of adding to
# resources. That expense has no formula before 2024, so this one
# stays a resource until then.
if period.start.year < 2024:
BENEFITS.append("co_ccap_subsidy")
return add(spm_unit, period, BENEFITS)

class income_tax_refundable_credits(Variable):
Expand Down
17 changes: 12 additions & 5 deletions policyengine_us/reforms/states/tx/rebate/tx_rebate.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,14 @@ def formula(spm_unit, period, parameters):
# California programs.
"ca_cvrp", # California Clean Vehicle Rebate Project.
# Colorado programs.
"co_ccap_subsidy",
"co_state_supplement",
"co_oap",
# Washington programs.
"wa_child_care_subsidies",
# New Mexico programs.
"nm_ssi_state_supplement",
# South Carolina programs.
"sc_ssi_state_supplement",
# Texas programs.
"tx_ssi_state_supplement",
# West Virginia programs.
"wv_child_care_subsidies",
"snap",
"wic",
"free_school_meals",
Expand Down Expand Up @@ -132,6 +127,18 @@ def formula(spm_unit, period, parameters):
BENEFITS.append("assigned_aca_ptc")
if not parameters(period).gov.hud.abolition:
BENEFITS.append("spm_unit_capped_housing_subsidy")
# From 2024, child care subsidies lower the expense in
# spm_unit_capped_work_childcare_expenses instead of adding to
# resources. That expense has no formula before 2024, so these
# three stay resources until then.
if period.start.year < 2024:
BENEFITS.extend(
[
"co_ccap_subsidy",
"wa_child_care_subsidies",
"wv_child_care_subsidies",
]
)
return add(spm_unit, period, BENEFITS)

class reform(Reform):
Expand Down
Loading
Loading