Skip to content

Add stillbirth tax provisions for CT, NE, and ND#8115

Open
DTrim99 wants to merge 5 commits intoPolicyEngine:mainfrom
DTrim99:stillbirth-credits-ct-ne-nd
Open

Add stillbirth tax provisions for CT, NE, and ND#8115
DTrim99 wants to merge 5 commits intoPolicyEngine:mainfrom
DTrim99:stillbirth-credits-ct-ne-nd

Conversation

@DTrim99
Copy link
Copy Markdown
Collaborator

@DTrim99 DTrim99 commented Apr 20, 2026

Summary

Implements three state stillbirth tax provisions enacted for the 2022 tax year, all reusing the existing tax_unit_stillborn_children input variable:

  • Connecticut: $2,500 nonrefundable credit per stillbirth for a fetus with a filed fetal death certificate.
  • Nebraska: $2,000 refundable credit per stillborn child (≥20th week of gestation, would have been a dependent).
  • North Dakota: Inflation-adjusted subtraction from federal taxable income — $4,530 (2022), $4,892 (2023), $5,088 (2024), $5,241 (2025); uprated via gov.irs.uprating for future years.

Closes #4966, closes #5010, closes #5016.

Regulatory authority

State Statute Form Amount Mechanism
CT Conn. Gen. Stat. § 12-704i (PA 22-118, § 412; amended PA 23-31, § 10) CT-1040 $2,500 Nonrefundable credit
NE Neb. Rev. Stat. § 77-2715.07(9) (enacted by LB 432 (2021) § 26) Form 1040N, Line 38/39/45 $2,000 Refundable credit
ND N.D.C.C. § 57-38-30.3(2) Schedule ND-1SA, Line 8 $4,530 (2022), $4,892 (2023), $5,088 (2024), $5,241 (2025) Subtraction from federal taxable income (inflation-adjusted)

Statutory eligibility per state

Connecticut — From Conn. Gen. Stat. § 12-704i: a taxpayer is allowed a credit of $2,500 "for the delivery of a fetus born dead for which a fetal death certificate has been filed, provided such child would have been a dependent on such taxpayer's federal income tax return. The credit shall be allowed for the taxable year for which a fetal death occurred." Enacted by PA 22-118, § 412 (effective July 1, 2022, applicable to taxable years commencing on or after January 1, 2022); amended by PA 23-31, § 10 (effective June 7, 2023). Integrated into ct_non_refundable_credits via the gov.states.ct.tax.income.credits.non_refundable list parameter.

Nebraska — Neb. Rev. Stat. § 77-2715.07(9) allows a $2,000 refundable credit per stillborn child for taxable years beginning on or after January 1, 2022, when: (a) the parent would have been eligible to claim the stillborn child as a dependent, (b) the stillbirth occurred at or after the twentieth week of gestation, and (c) a fetal death certificate under Neb. Rev. Stat. § 71-606(1) was filed. Only one credit is allowed per stillborn child. Integrated into ne_refundable_credits via the gov.states.ne.tax.income.credits.refundable list parameter.

North Dakota — From N.D.C.C. § 57-38-30.3(2) and the 2022–2025 Schedule ND-1SA Line 8 instructions: a subtraction from federal taxable income is allowed to the parent of a child stillborn during the tax year who (a) obtained a certified Fetal Death Record from the ND Division of Vital Records and (b) would have been eligible to claim the child as a dependent on their federal return. The amount is adjusted annually for inflation. Integrated into nd_subtractions via the gov.states.nd.tax.income.taxable_income.subtractions.sources list parameter; future years uprate via gov.irs.uprating.

Implementation approach

All three states follow the same pattern as the existing Arizona stillborn exemption (policyengine_us/variables/gov/states/az/tax/income/exemptions/az_stillborn_exemption.py):

  1. A single per-stillbirth amount parameter, modeled from 2021-01-01 with 0 pre-effective-date and the statutory value from 2022-01-01 onward.
  2. A tax-unit-level formula variable computed as tax_unit_stillborn_children × per_stillbirth_amount.
  3. The new variable is added to the relevant state's existing credit or subtraction list parameter, preserving the existing chain integration (no new wrapper variables).

Files added

Parameters

  • policyengine_us/parameters/gov/states/ct/tax/income/credits/stillborn.yaml
  • policyengine_us/parameters/gov/states/ne/tax/income/credits/stillborn.yaml
  • policyengine_us/parameters/gov/states/nd/tax/income/taxable_income/subtractions/stillborn.yaml

Variables

  • policyengine_us/variables/gov/states/ct/tax/income/credits/ct_stillborn_credit.py
  • policyengine_us/variables/gov/states/ne/tax/income/credits/ne_stillborn_credit.py
  • policyengine_us/variables/gov/states/nd/tax/income/subtractions/nd_stillborn_subtraction.py

Tests (6 cases for CT/NE, 8 cases for ND; 20 total including cross-state isolation and ND 2024/2025)

  • policyengine_us/tests/policy/baseline/gov/states/ct/tax/income/credits/ct_stillborn_credit.yaml
  • policyengine_us/tests/policy/baseline/gov/states/ne/tax/income/credits/ne_stillborn_credit.yaml
  • policyengine_us/tests/policy/baseline/gov/states/nd/tax/income/subtractions/nd_stillborn_subtraction.yaml

Integration (modified list parameters)

  • policyengine_us/parameters/gov/states/ct/tax/income/credits/non_refundable.yaml
  • policyengine_us/parameters/gov/states/ne/tax/income/credits/refundable.yaml
  • policyengine_us/parameters/gov/states/nd/tax/income/taxable_income/subtractions/sources.yaml

Test plan

  • 20 unit tests cover: no stillbirth, one stillbirth, two stillbirths, pre-effective year (2021), first effective year (2022), cross-state isolation (CA filer); ND additionally covers 2023, 2024, and 2025 inflation-adjusted values
  • Full state test suites pass locally
  • make format clean
  • CI green
  • Reviewer verifies statutory citations and dollar amounts

🤖 Generated with Claude Code

…kota

- CT: $2,500 nonrefundable credit per Conn. Gen. Stat. § 12-704i (PA 22-118)
- NE: $2,000 refundable credit per Neb. LB 432 (2021)
- ND: Inflation-adjusted subtraction from federal taxable income
  ($4,530 in 2022, $4,892 in 2023) per N.D.C.C. § 57-38-30.3(2)

All three use the existing tax_unit_stillborn_children input variable.
Effective tax years 2022+ for each state.

Closes PolicyEngine#4966, PolicyEngine#5010, PolicyEngine#5016

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (5b296cf) to head (8675371).
⚠️ Report is 92 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #8115      +/-   ##
===========================================
+ Coverage   94.00%   100.00%   +6.00%     
===========================================
  Files           7         3       -4     
  Lines         100        39      -61     
  Branches        2         0       -2     
===========================================
- Hits           94        39      -55     
+ Misses          6         0       -6     
Flag Coverage Δ
unittests 100.00% <100.00%> (+6.00%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@DTrim99
Copy link
Copy Markdown
Collaborator Author

DTrim99 commented Apr 21, 2026

PR Review

Thanks for implementing stillbirth provisions for three more states in one tight PR. Formula structure, list-parameter integration, reference tuples, and the AZ-pattern parity are clean. A couple of issues to address.

Critical (Must Fix)

1. ND 2024 and 2025 inflation-adjusted values are missing

policyengine_us/parameters/gov/states/nd/tax/income/taxable_income/subtractions/stillborn.yaml stops at 2023-01-01: 4_892, so 2024+ simulations silently use the 2023 amount. The statute (N.D.C.C. § 57-38-30.3(2)) is inflation-adjusted annually and the ND Office of State Tax Commissioner has published:

  • TY 2024 (Schedule ND-1SA Line 8): $5,088
  • TY 2025 (Schedule ND-1SA Line 8): $5,241

The 2024 and 2025 booklets are already cited in sources.yaml so the references are in hand. Please extend:

2024-01-01: 5_088
2025-01-01: 5_241

2. CI status — all three Full Suite failures are runner cancellations, not code failures

  • Full Suite - Baseline States → cancelled mid-run at the Run non-structural YAML tests (states in 3 batches) step
  • Full Suite - Baseline (excl States) & Reform & Python → cancelled at Run non-structural YAML tests (other)
  • Full Suite - Structural (Other) → cancelled at Run structural YAML tests (other)

No test assertion failures appear in the logs; each job got a ##[error]The runner has received a shutdown signal from Actions. Please push an empty commit (or re-run failed jobs) to get a clean CI signal before merge.

Should Address

3. Cite the codified NE statute, not just the bill

policyengine_us/parameters/gov/states/ne/tax/income/credits/stillborn.yaml references LB 432 (2021) § 26 and the 1040N booklets. Add the codified statute as the primary reference:

- title: Neb. Rev. Stat. § 77-2715.07(9)
  href: https://nebraskalegislature.gov/laws/statutes.php?statute=77-2715.07

Statute explicitly calls this a refundable credit, "For taxable years beginning or deemed to begin on or after January 1, 2022" — confirms the $2,000 value, the refundable classification, and the 2022 effective date.

4. CT Public Act references need section numbers

PA 22-118 is ~600 pages and PA 23-31 is sizable. The current references link to the full PDFs with no section or page anchor, so a reviewer has to scan the whole act. Please add the relevant section number (or #page= anchor) in each title so the reference points directly at the stillbirth-credit provision.

5. PR description's "in Nebraska" claim is incorrect (description only, not code)

The PR body says NE "specifically requires … that the stillbirth occurred IN NEBRASKA." Neb. Rev. Stat. § 77-2715.07(9) has no geographic requirement — that language is NE DOR booklet gloss on Neb. Rev. Stat. § 71-606(1) registration. The implementation is correct; just drop the "in Nebraska" requirement from the PR description to avoid future confusion.

6. ND label and description should say "subtraction," not "deduction"

Filename, class, folder, and the NDCC statute all use "subtraction." The variable label = "North Dakota stillborn child deduction" and the parameter's label / description use "deduction." For consistency and to match how the rest of the ND subtractions are named in this repo, change:

  • nd_stillborn_subtraction.py:7label = "North Dakota stillborn child subtraction"
  • parameters/.../stillborn.yaml label and description → "subtraction"

7. Cross-state-code isolation regression test

Cheap insurance. Add one YAML case per state like:

- name: Non-CT filer receives no CT stillborn credit
  period: 2023
  input:
    state_code: CA
    tax_unit_stillborn_children: 1
  output:
    ct_stillborn_credit: 0

defined_for = StateCode.CT enforces this already, but a case catches regressions when someone edits defined_for or the variable moves.

Suggestions

8. Document the eligibility simplification

All three formulas reduce to tax_unit_stillborn_children × per_stillbirth_amount, pushing dependency / gestational-age / certificate-filing eligibility onto the input variable. This matches the AZ precedent, but consider noting in each variable's docstring that the input is assumed to be the count of qualifying stillbirths per the applicable state rules.

9. Prefer HTML over PDF named-anchors for ND statute

https://ndlegis.gov/cencode/t57c38.pdf#nameddest=57-38-30p3 — PDF named-destinations don't always resolve in browsers. If ND offers an HTML-rendered chapter (or Justia's chapter view), consider adding that alongside the PDF.

10. Integration / realistic-household YAML test

Nothing in the test suite asserts that ct_non_refundable_credits / ne_refundable_credits / nd_taxable_income actually change when tax_unit_stillborn_children > 0. The list-parameter edits are correct (verified on branch), but a one-household end-to-end test would catch future wiring regressions.


Validation Summary

Check Result
Regulatory Accuracy 1 critical (ND 2024/2025 missing), 1 minor description issue
Reference Quality 2 should (NE statute missing, CT PA section anchors)
Code Patterns 1 should (ND subtraction vs. deduction naming)
Test Coverage 2 should (cross-state isolation, realistic integration)
CI Status 3 runner cancellations, not code failures — re-run required

Next Steps

  • Add ND 2024 (5_088) and 2025 (5_241) values + references to the 2024/2025 ND-1SA Line 8 instructions.
  • Add Neb. Rev. Stat. § 77-2715.07(9) to the NE reference tuple.
  • Add PA section anchors to CT references.
  • Rename "deduction" → "subtraction" in the ND variable label and parameter description.
  • Add a cross-state-code isolation test per state.
  • Re-run the three cancelled CI jobs.

Everything else — formula structure, AZ-pattern parity, list-parameter wiring, effective dates, parameter values for CT/NE and ND 2022/2023 — looks correct.

DTrim99 and others added 2 commits April 21, 2026 10:31
…vements

- Add ND 2024 ($5,088) and 2025 ($5,241) stillborn subtraction values,
  verified against 2024 and 2025 Schedule ND-1SA Line 8 instructions.
- Add gov.irs.uprating on ND stillborn parameter so future years project
  automatically, matching the inflation-adjustment pattern used by other
  ND parameters (e.g., marriage-penalty credit).
- Rename ND variable label and parameter description from "deduction" to
  "subtraction" to match the statute, filename, folder, and class name.
- Add Neb. Rev. Stat. § 77-2715.07(9) as the primary NE reference
  (codified statute) ahead of LB 432.
- Pin CT PA references to specific sections: PA 22-118 § 412 (enacted
  section 12-704i) and PA 23-31 § 10 (amended section 12-704i),
  verified against CT statute history in chap_229.htm.
- Add cross-state isolation test case to each of the three YAML test
  files (non-matching state_code → 0 benefit).
- Add ND 2024 and 2025 test cases.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@DTrim99 DTrim99 marked this pull request as ready for review April 22, 2026 18:13
@DTrim99 DTrim99 requested a review from PavelMakarchuk April 22, 2026 18:19
The $2,500 stillborn credit flows through Schedule CT-IT Credit Line 4;
linking the form from the parameter makes the form-to-statute chain
traceable (matching the pattern already used by the NE and ND params
in this PR).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@PavelMakarchuk PavelMakarchuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified all three state provisions against primary statutes and tax forms:

Connecticut — Conn. Gen. Stat. § 12-704i: $2,500 for birth of stillborn child, non-refundable, effective 2022. Claimed on Schedule CT-IT Credit Line 4. ✓

Nebraska — Neb. Rev. Stat. § 77-2715.07(9): $2,000 refundable, effective 2022, conditions = fetal death certificate + ≥20th week gestation + dependent eligibility. Form 1040N Line 38 (2022), 39 (2023), 45 (2024). ✓

North Dakota — N.D.C.C. § 57-38-30.3(2): inflation-adjusted subtraction. 2021 $4,310 / 2022 $4,530 / 2023 $4,892 / 2024 $5,088 / 2025 $5,241. Schedule ND-1SA Line 5a (2022), Line 8 (2023+). ✓

Implementation cleanly reuses tax_unit_stillborn_children and follows the AZ stillborn exemption precedent. Integration via existing non_refundable/refundable/sources list parameters.

Pushed a small addition: Schedule CT-IT Credit Line 4 reference on the CT parameter file, matching the form-linkage pattern used on the NE and ND params in this PR.

Nice work.

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.

North Dakota Stillborn Deduction 2022 Nebraska Stillborn Credit 2022 Connecticut Stillborn Credit 2022

2 participants