Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

reform_validation registry: four state rows measure the wrong quantity at policyengine-us 2.2.1 (IA HF1020, MN WFC, ID CTC, CO CTC), and state SPM rate rows need a sampling SE

Open
#1,116 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
json, python

Research direction

Start with us/state_reforms.json, us/state_program_levels.json, and us_runtime/reform_validation.py; the issue describes five separate registry and rate-estimation problems. Compare each row with the cited engine paths and benchmarks, then add or update focused tests for the chosen fix. Done means the affected row measures the stated benchmark, or rate rows include the proposed uncertainty fields, with tests guarding the behavior.

Written by the indexing model from the issue text.

Description

Found by the policyengine-scorecard reform-validation diagnosis (batch 2), PolicyEngine/policyengine-scorecard#146. Memos: diagnosis/batch2/D.md (items D1, D2, D3, D5) and diagnosis/batch2/C.md (item C-3).

Values are on the certified bundle us-6.2.1 (policyengine-us 2.2.1 + populace-us-2024-spm-20260915). microcosm paths are relative to packages/microcosm-build/src/microcosm/build/ @ 581b569; engine paths are relative to policyengine_us/ 2.2.1. Each item is a construction defect in the registry spec: the row measures something other than its benchmark. None needs an engine change.

1. IA HF1020: the reform's bracket indices moved under policyengine-us 2.2.1 (state.ia.hf1020)

Registry: LSA -$17.7M (FY2026); PE -$1.84M (ratio 0.10).

us/state_reforms.json:176-185

   "parameter_changes": {
    "gov.states.ia.tax.income.credits.child_care.fraction[4].amount": {
     "2025-01-01.2100-12-31": 0.5
    },
    "gov.states.ia.tax.income.credits.child_care.fraction[5].amount": {
     "2025-01-01.2100-12-31": 0.5
    },
    "gov.states.ia.tax.income.credits.child_care.fraction[6].amount": {
     "2025-01-01.2100-12-31": 0.5
    }
  • policyengine-us 1.764.6 (parameters/gov/states/ia/tax/income/credits/child_care/fraction.yaml:22-50) has seven brackets with thresholds -inf, 10,000, 20,000, 25,000, 35,000, 40,000, 90,000. Indices 4-6 were $35k-40k, $40k-90k and $90k+.
  • policyengine-us 2.2.1 (same file, :26-61) inserts a 45,000 bracket (:51-57: 0.0 from 2006, 0.30 from 2021). Indices 4-6 are now $35k-40k, $40k-45k and $45k-90k. The $90k+ band moved to index 7 (amount 0.0) and the reform no longer changes it.

The bill covers the $90k+ band:

Iowa LSA Fiscal Note, HF 1020 (Doc ID 1526230, April 22, 2025), p. 1, "Description":
"House File 1020 reduces the number of net income thresholds for the Child and Dependent Care (CDC) Tax Credit from seven to four and allows any taxpayer with Iowa net income equal to or exceeding $25,000 to qualify for the refundable tax credit of up to 50.0% of the federal Child and Dependent Care Credit."

Same, p. 2, "Assumptions":
"1040 filers with an AGI of $90,000 or more will be able to access the State CDC Tax Credit due to the Bill and will realize an estimated decrease in tax liability beginning in TY 2025."

Effect (D.md, analytic on the 2025 baseline): the registry construction reproduces -$1.836M exactly. The bill-text construction (50% from $25k up, including $90k+) gives -$23.97M (1.35x the note), of which the $90k+ band is -$22.14M. Builds on 1.764.6 (old indexing) scored -$21.7M to -$27.6M.

Fix. Add "gov.states.ia.tax.income.credits.child_care.fraction[7].amount": {"2025-01-01.2100-12-31": 0.5}. Add a guard test that asserts, at the pinned engine, the thresholds the reform targets (25,000 / 35,000 / 40,000 / 45,000 / 90,000 at indices 3-7), so the next re-indexing fails loudly instead of rescoring a different bill.

Residual (open): PE keys the fraction on taxable income (fraction.yaml:1), while the note describes Iowa net income. PE's own 2025 baseline ia_cdcc is $19.4M; the note (p. 1, Background) reports IDR claims of "$11.0 million in FY 2024".

2. MN Working Family Credit row measures the pre-2023 mn_wfc (state_mn_wfc)

Registry: derived $191.5M (TY2024, score_type: approximation); PE $289.6M (1.51).

us/state_program_levels.json:110-113

   "id": "state_mn_wfc",
   "name": "Minnesota Working Family Credit",
   "variable": "mn_wfc",
   "period": 2024,
  • variables/gov/states/mn/tax/income/credits/mn_wfc.py:17-39 computes the credit from p.wfc.pre_cwfc_legislation.* parameters.
  • The engine does not use mn_wfc in the 2023+ tax calculation: parameters/gov/states/mn/tax/income/credits/refundable.yaml lists mn_wfc only in its 2021 entry (:3-6); the 2023 and 2024 entries (:8-16) list mn_child_and_working_families_credits.

The official figure that isolates the non-child part:

MN House Research, "Minnesota's Child Credit and Working Family Credit" (May 2026), p. 1:
"For tax year (TY) 2024 returns filed in 2025, the combined cost of the child and working family credits was about $755.5 million. Of this amount, about 76 percent of credits before the phaseout were young child credits, 20 percent were working family credits, and 4 percent were credits for older children. About 240,100 returns with an older or younger child claimed about $665.9 million in credits, for an average credit of about $2,773. About 301,500 childless returns claimed about $89.6 million in credits, for an average credit of $297."

Effect (D.md): PE's pre-phaseout split is 23.5% WFC + older child, against House Research's 24%. A proportional split of PE's post-phaseout combined credit gives a WFC + older-child component of $238.5M (1.25x the derived benchmark), so the construction explains $51.1M of the $98.1M excess.

Fix. Retire state_mn_wfc, or re-measure it as PE's combined credit for units with no qualifying child against the childless subtotal ($89.6M on 301,500 returns). Keep state_mn_cwfc (1.14) as the primary MN row. Note: on this release that childless comparison is itself 1.85x (PE $165.5M on 453.0k units), so it would expose an open residual rather than close one.

Separate engine item (policyengine-us, not this repo): variables/gov/states/mn/tax/income/credits/taxsim_mn_child_tax_credit_component.py:13-15 subtracts the same mn_wfc from the 2023+ combined credit.

3. Idaho CTC row sums the uncapped nonrefundable credit (state_id_ctc)

Registry: DFM $63.96M (CY2024); PE $96.66M (1.51).

  • variables/gov/states/id/tax/income/credits/id_ctc.py:12-19: eligible_children * p.amount, with no liability cap.
  • The cap applies only in id_non_refundable_credits (variables/gov/states/id/tax/income/id_non_refundable_credits.py:15-24). id_ctc is the only Idaho nonrefundable credit for 2018-2025 (parameters/gov/states/id/tax/income/credits/non_refundable.yaml:17-20).
  • The row (us/state_program_levels.json:609-622) sets no cap_variable, so _level_total sums the uncapped amount (us_runtime/reform_validation.py:984-1004).

The benchmark is a foregone-revenue estimate for a nonrefundable credit:

Idaho DFM, General Fund Revenue Book (January 2026), PDF p. 29, "Child Income Tax Credit: 63–3029L":
"Description: The state provides a nonrefundable $205 individual income tax credit per qualifying child of the taxpayer."

Same, PDF p. 20, table "Idaho Tax Preferences (Thousands)", Income Tax Credits (columns 2022-2028):
"63-3029L Child Income Tax Credit $ 65,539 63,427 63,962 64,768 65,412 0 0"

Same, PDF p. 17: "The estimates listed in the table in this section could be treated as upper bounds since they are computed by taking tax rates and applying them to existing sales and income figures."

Effect (D.md): capped at liability, PE is $73.24M (1.145x). Units with zero Idaho liability carry $22.3M of the uncapped amount. The construction explains $23.4M of the $32.7M excess (72%).

Fix. Set "cap_variable": "id_income_tax_before_non_refundable_credits" on the row (it has no state key, so _level_total reaches the capped branch at reform_validation.py:997-1003), or measure id_non_refundable_credits.

4. Colorado CTC: a TY2024-law total against a TY2023 actual (state_co_ctc)

Registry: CO DOR $89.16M (TY2023, 130,188 claims per the row); PE $200.9M (2.25), simulated at "period": 2024 (us/state_program_levels.json:70-80).

Colorado changed the credit for TY2024:

HB23-1112 (signed act), PDF p. 4, amending C.R.S. 39-22-129(3)(a):
"(3) (a) Except as provided in subsection (4) of this section, for income tax years commencing on or after January 1, 2022, BUT BEFORE JANUARY 1,2024, a resident individual who claims a federal child tax credit for an eligible child on the individual's federal tax return is allowed a child tax credit in the amount set forth in subsection (3)(b) or (3)(c) of this"

Same, PDF p. 5, new subsection (4.5)(a)(I):
"(4.5) (a) (I) FOR INCOME TAX YEARS COMMENCING ON OR AFTER JANUARY 1, 2024, A RESIDENT INDIVIDUAL WHO FILES A SINGLE RETURN IS ALLOWED A CHILD TAX CREDIT AGAINST THE INCOME TAXES DUE UNDER THIS ARTICLE 22 FOR EACH ELIGIBLE CHILD OF THE TAXPAYER IN THE FOLLOWING AMOUNTS: (A) ONE THOUSAND TWO HUNDRED DOLLARS IF THE INDIVIDUAL'S FEDERAL ADJUSTED GROSS INCOME IS TWENTY-FIVE THOUSAND DOLLARS OR LESS;"

The engine switches regimes by year (variables/gov/states/co/tax/income/credits/ctc/co_ctc.py:27-70; parameters/gov/states/co/tax/income/credits/ctc/ctc_matched_federal_credit.yaml: true from 2022, false from 2024).

The row description (us/state_program_levels.json:81) says the gap "is entirely law-change vintage, proven by replication — running the pre-HB23-1112 TY2023 law (60/30/10% of federal CTC) on this same data reproduces the DOR actual to the dollar". That no longer holds: on this release the TY2023 rule on the same 2024 data gives $167.9M on 198.3k units (1.88x; D.md probe 3). The law change explains $33.0M of the $111.8M excess (about 30%).

Fix. Correct the description now. Then either score the row under TY2023 law or replace the benchmark with CO DOR TY2024 actuals when they are published. The residual is open (one candidate is the missing claim gate on flat child credits, #341).

5. State SPM rate rows: emit a sampling SE and an effective sample size (C-3)

_person_rate (us_runtime/reform_validation.py:933-982) returns a point estimate only, and the emitted row (:1006-1034) carries no uncertainty. On this release:

  • the queued state child-rate rows rest on 26-149 effective child households (Kish), and the 10 largest households hold 11-48% of child weight;
  • household-cluster linearized SEs of those rates are 3.7-7.1 pp, against Census rates of 5-18%;
  • after the common national shift (+2.43 pp, child) is removed, 12 of the 14 high-side queued rows have |z| < 2 (exceptions: TN 2.14, FL 2.05).

Proposal. With every statistic: "rate" row, also emit the household-cluster linearized SE of the ratio estimator and the Kish effective number of households (for example microcosm.standard_error and microcosm.effective_households). Consumers can then flag on |z| instead of |ratio - 1|.

Dominant language
Python
Stars
0
Forks
4
Avg merge
1d 18h
Merged PRs (30d)
114

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PolicyEngine/microcosm

All issues in PolicyEngine/microcosm

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.