Repository navigation
State income tax collection targets carry no policyengine_variables label in the release diagnostics #886
Description
What is wrong
The 44 census_stc.*.individual_income_tax_collections.<state>.t40.collections targets are built and fitted, but in the release's calibration_diagnostics.json they carry policyengine_variables: [] and materializer: null. Every other reform-relevant source labels its targets with the model variable it measures (snap, refundable_ctc, eitc, medicaid_enrolled, …); these do not.
Current release populace-us-2024-buildp-sparse-rmloss100-cae8640-20260728T011454Z, via the calibration dashboard API:
name: census_stc.fy2023.individual_income_tax_collections.md.t40.collections@2024
variable: collections
variable_key: state_income_tax / collections · total
policyengine_variables: []
materializer: null
family: state_income_tax
44 states: AL AR AZ CA CO CT DC DE GA HI IA ID IL IN KS KY LA MA MD ME MI MN MO MS MT NC ND NE NH NJ NM NY OH OK OR PA RI SC UT VA VT WA WI WV. 20 of them fit within 10%; the worst is MD at 115%.
Where it comes from
packages/microcosm-build/src/microcosm/build/us_runtime/fiscal_targets.py, _state_income_tax_reference_from_fact, builds the reference with family="state_income_tax" and target_role, but no materializer / base_variable in its metadata. Compare _derived_chip_enrollment_metadata in the same file, which sets "materializer": "policyengine_variable" and "base_variable": "chip_enrolled" and therefore surfaces policyengine_variables: ["chip_enrolled"] downstream. The build evidently does estimate these rows from state_income_tax (the Tennessee exclusion note in the same file says as much), so the label is missing from the export rather than from the computation.
Why it matters
Anything that finds targets by model variable cannot find these. Concretely, policyengine-app-v2's calibration check (PolicyEngine/policyengine-app-v2#1184) walks from a reform's parameters to the variables it moves and asks the dashboard for targets labelled with them. A CalEITC reform reaches ca_eitc, ca_income_tax, and state_income_tax, finds no target labelled with any of them, and reports the data side as unvalidated — for a state whose income tax collections target is sitting in the release. Same for every state tax reform in every state. The dashboard's variable lookup has the same blind spot.
Ask
Label the state income tax collection references so the diagnostics export carries policyengine_variables: ["state_income_tax"] (state carried as geography, as now), e.g. by giving _state_income_tax_reference_from_fact the same materializer / base_variable metadata the other policyengine-variable references use. If the fit is currently produced through a family-level default rather than a per-reference materializer, then this should be an export-only change; if not, the note here would help us understand how these rows are estimated today.
Once a release carries the label, all 44 state tax targets join automatically in app-v2 and in the dashboard; no consumer changes needed.
cc @anth-volk since this touches the diagnostics schema you are moving in #855.
Activity