Repository navigation
Conversation
…ncome N.D.C.C. 57-02-08.1(5)(c) counts income from all sources but excludes "any amount excluded from income by federal or state law with the exception of income from social security benefits". nd_renters_refund_income sums market_income, which counts wages before payroll deductions and the tax-exempt parts of interest, pensions and retirement distributions in full, so $5,000 of tax-exempt interest raised the income by $5,000. nd_renters_refund_federally_excluded_income now subtracts each part of market_income that federal gross income leaves out: the pre-tax payroll deductions (401(k) and 403(b) deferrals, payroll health premiums and HSA contributions, dependent care assistance within the IRC 129 limit), tax-exempt interest, the nontaxable parts of pensions and retirement account distributions, disability benefits from a plan the recipient paid for, and alimony under an instrument executed after 2018. It replaces the separate subtractions of pre-tax premiums and excluded disability benefits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lict Property tests check that every market_income component has a stated treatment, that each excluded part lies between zero and its component, that renter's refund income equals irs_gross_income on shared sources, and that a dollar moved to its excluded form leaves income. The candidate entry records the statute against the guideline's item 10 and the application's lines 5 to 7. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The federal model takes four exclusions from gross income as above-the-line deductions, so market_income still holds the income they exclude: savings bond interest spent on higher education (IRC 135), employer adoption assistance (IRC 137), and income from Puerto Rico and the specified possessions (IRC 931, 933). North Dakota's renter's refund income now subtracts them from the tax unit's market income left after the person-level exclusions, never from social security. A new property test classifies every federal above-the-line deduction as a deduction or an exclusion, so a new one fails until someone classifies it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10697 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 2 +1
Lines 37 40 +3
=========================================
+ Hits 37 40 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
These scripts produced the 2026 impact in the description. Each PYTHONPATH=<checkout at 5e7e8f35fa> python nd_impact.py v3_base_2026.json 2026
PYTHONPATH=<checkout at 1eef8ca2f0> python nd_impact.py v3_head_2026.json 2026
python compare_impact.py v3_base_2026.json v3_head_2026.json 5e7e8f35fa 1eef8ca2f0 compare_v3_2026.json
python gainers.py v3_base_2026.json v3_head_2026.json
|
The note on us-nd:renters-refund-federally-excluded-income said the income tax reductions in N.D.C.C. 57-38-30.3(2) lower taxable income without excluding amounts from income. The Legislative Assembly added the statute's exception for social security in House Bill 1174 (2019), the Act that created the social security reduction, so the text doesn't settle the question that flatly. A new entry, us-nd:renters-refund-state-income-tax-reductions, sets out both sides and follows the Tax Commissioner's reading, which counts military pensions and net gains. A YAML case pins the result. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
#10725 counts |
#10725 added the refund to household and SPM benefits, so the income changes in this pull request now reach both net incomes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Follows #10663. North Dakota counts a renter's income "from all sources" for its renter's refund but excludes "any amount excluded from income by federal or state law with the exception of income from social security benefits" (N.D.C.C. 57-02-08.1(5)(c)). On main,
nd_renters_refund_incomesumsmarket_income, which counts wages before payroll deductions and the tax-exempt parts of interest, pensions, retirement distributions and alimony in full. So $5,000 of municipal bond interest raises a renter's income by $5,000. Main subtracts only pre-tax health premiums and, since #10663, disability benefits from a plan the recipient paid for.What changes
nd_renters_refund_incomenow subtracts every part ofmarket_incomethat federal law leaves out of gross income, in two pieces, and floors the result at zero as before.nd_renters_refund_federally_excluded_income(new, person) adds up the excluded part of each of a person'smarket_incomecomponents. It takes each part at zero or more and at most the component it comes from, so an input that reports only a component's total keeps all of it as income.employment_incomepre_tax_contributions: traditional 401(k) and 403(b) deferrals, pre-tax health premiums, HSA payroll contributions, and dependent care assistance up to the IRC 129 limit (employment_incomelessirs_employment_incomeandtaxable_dependent_care_benefits)interest_incometax_exempt_interest_incomepension_incometax_exempt_pension_incomeretirement_distributionstax_exempt_retirement_distributionsdisability_benefitstax_exempt_disability_benefitsalimony_incomealimony_incomelesstaxable_alimony_income)gov.states.nd.tax.property.renters_refund.excluded_deductions(new parameter) lists four federal exclusions that the federal model takes as above-the-line deductions, somarket_incomestill holds the income they exclude. It names savings bond interest spent on higher education (us_bonds_for_higher_ed, IRC 135(a)), employer adoption assistance (qualified_adoption_assistance_expense, IRC 137(a)), and income from Guam, American Samoa, the Northern Mariana Islands and Puerto Rico (specified_possession_incomeandpuerto_rico_income, IRC 931(a) and 933). Households may record the first two on a dependent (gov.irs.ald.filer_amounts_recorded_on_dependents), and the model takes the other two as tax unit inputs. Sond_renters_refund_incometakes them out of the tax unit's market income left after the person-level parts, and never out of social security.These replace main's separate subtractions of pre-tax premiums and excluded disability benefits, which the person-level variable now covers.
What stays in, and why
foreign_earned_income_exclusiondocuments that "Other income inputs are the amounts left after the exclusion", so nothing comes out for them.strike_benefits, but IRS Publication 525 counts strike benefits as income unless the union meant them as gifts.gi_cash_assistance) counts as a gift, which IRC 102 excludes, or as public assistance, which North Dakota counts, depending on who pays it, and the input doesn't record the payer.Readings
This PR logs these readings in
source_conflicts/candidates.yamlasus-nd:renters-refund-federally-excluded-incomeandus-nd:renters-refund-state-income-tax-reductions.us-nd:renters-refund-insurance-proceeds(Count every taxed cash source in SPM market income #10663).Invariants
Each holds for every input, and
policyengine_us/tests/test_nd_renters_refund_income_exclusions.pytests it with Hypothesis.market_incomecomponent in full, subtracts the part federal law excludes, or counts it although the federal model's gross income leaves it out (with the reason). The test also sorts each above-the-line deduction in the federal model into a deduction, which leaves its income in, or an exclusion, which North Dakota subtracts. A new component or deduction fails the test until someone classifies it, so a widermarket_incomecan't bring excluded income back, as Count every taxed cash source in SPM market income #10663's did.market_incomeand federal gross income share, renter's refund income equalsirs_gross_incomeless the deducted exclusions.These tests use Python because they draw random amounts over many households at once and read lists from the source files, while YAML pins one household per case. Locally (macOS, Python 3.14, a shared host under load), the file runs 7 tests in 19 s (50 s wall with
uv run), with a peak RSS of 1.0 GiB. It lands in theremainingRest group.Against main, each of the four tests that compute incomes fails. The differential test gets $74,000 on its explicit example, where the statute gives $42,000, and moving a dollar of taxable interest to tax-exempt interest leaves income unchanged. Alimony under a 2019 or 2024 instrument counts in full ($22,000, where the statute gives $10,000), and the bounds test stops because main has no excluded-income variable. Against this PR's first commit, which didn't yet subtract the four exclusions the model deducts above the line, the differential test gets $48,000. At that commit, the model still counted the example's $2,000 of savings bond interest and $4,000 of adoption assistance. The shift test fails there on savings bond interest, and the bounds and alimony tests pass.
The PR adds 13 YAML cases to
nd_renters_refund_income.yamland 5 tond_renters_refund_federally_excluded_income.yaml, with expected values from the statute and the IRC sections each case cites.2026 impact
We ran the microsimulation once at main (5e7e8f3) and once on this PR merged with that main (1eef8ca), each on the default dataset, Populace US 2024 (
populace-us-2024-spm-20260909), for 2026. Every figure below comes from those two runs, and a comment below holds the scripts that ran and compared them. North Dakota pays the refund to tax units that rent and have a head or spouse aged 65 or over or permanently and totally disabled, if their income allows. We estimate 26,243 of these older or disabled renters in the state (69 sample records).Checks run locally
At 1eef8ca, which merges main at 5e7e8f3, on macOS with Python 3.14:
ruff format --checkandruff checkon the three changed Python files: clean.policyengine_us/tests/test_nd_renters_refund_income_exclusions.py: 7 passed.policyengine-core test policyengine_us/tests/policy/baseline/gov/states/nd: 467 passed.policyengine_us/tests/test_household_spm_resource_parity.py: 68 passed.policyengine_us/tests/code_health: 533 passed, 1 skipped.One of two runs of the parity file failed
test_cash_income_never_lowers_spm_net_income, on the Connecticut draw that #10725 records as flaky on main. Main at 5e7e8f3 fails that draw with the same numbers.Follow-ups
nd_renters_refund_income.yamlkeeps $6,000 of SSI out). The statute counts "any county, state, or federal public assistance benefits", and the application lists S.S.I. on line 7, while the guideline's item 11 lists TANF as not income.strike_benefits, which IRS Publication 525 counts as income unless the union meant them as gifts.us_bonds_for_higher_edandqualified_adoption_assistance_expensein full, without the limits and income phase-outs of IRC 135(b) and 137(b), andnd_renters_refund_incomesubtracts the same full amounts (Savings bond (26 USC 135) and employer adoption assistance (26 USC 137) exclusions are deducted as supplied, with no cap or phase-out #10523).axiom: TheAxiomFoundation/rulespec-us#2042 queued (North Dakota's income definition)
🤖 Generated with Claude Code