Skip to content

Exclude MFS filers and apply MO investment income limit to WFTC - #9180

Open
hua7450 wants to merge 4 commits into
mainfrom
fix-mo-wftc-eligibility
Open

Exclude MFS filers and apply MO investment income limit to WFTC#9180
hua7450 wants to merge 4 commits into
mainfrom
fix-mo-wftc-eligibility

Conversation

@hua7450

@hua7450 hua7450 commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds the two missing eligibility conditions to the Missouri Working Families Tax Credit (RSMo 143.177):

  1. Married filing separately exclusion — RSMo 143.177.2 limits the credit to filing statuses of single, head of household, widowed, or married filing combined. PolicyEngine's federal EITC pays separate filers from 2021 on (ARPA Sec. 9623), so MFS filers were receiving the Missouri match.
  2. Missouri investment income limit — RSMo 143.177.3(1) computes the credit under IRC Section 32 "as of January 1, 2021" (pre-ARPA), whose Section 32(i) disqualified-income limit is far below current federal law. MO DOR publishes the limit each year on Form MO-WFTC: $4,050 (2023), $4,300 (2024), $4,400 (2025). No Missouri check existed, so only the federal limit ($11,950 in 2025) applied implicitly.

Fixes #9177
Fixes #9178

Changes

  • New parameter gov/states/mo/tax/income/credits/wftc/investment_income_limit.yaml — values from Form MO-WFTC with a comment documenting the derivation chain (the statute contains no dollar amount) and why there is no uprating (no federal source; each year's value comes from the new form).
  • New parameter gov/states/mo/tax/income/credits/wftc/dependent_filers_excluded.yaml — the claimed-as-a-dependent stop first appears on the 2024 form checklist (false in 2023, true from 2024).
  • New variable mo_wftc_eligible — requires a federal EITC (eitc > 0, per RSMo 143.177.2 "allowed a federal earned income tax credit" and Form MO-WFTC Line 1), filing status is not SEPARATE, the filer is not claimed as a dependent on another return (from 2024, via head_is_dependent_elsewhere), and investment income does not exceed the Missouri limit.
  • mo_wftc_potential multiplies by the new eligibility. The contrib refundable-WFTC reform builds on mo_wftc_potential, so the eligibility conditions flow through to the reform as well.

Modeling decisions

  • Boundary semantics: strict "greater than" disqualification in all years. DOR publications disagree: the 2023 form says "equal to or greater than" in both its checklist and its Line 3 instructions (as does the FAQ), while its own information page says "cannot exceed"; the 2024/2025 forms say "greater than" throughout. The statutorily referenced pre-ARPA Section 32(i) says "exceeds" — the only reading with statutory grounding — so the strict reading applies in all years. Documented in the code and test comments and pinned by boundary tests (exactly at the limit remains eligible in 2023, 2024, and 2025). Confirmed as a deliberate maintainer choice in response to the automated program review.
  • Investment income measure: reuses the federal eitc_relevant_investment_income. Missouri's form definition (taxable + tax-exempt interest, ordinary dividends, positive capital gain net income, with a Pub 596 Worksheet 1 fallback) is close but not identical (the federal measure also nets rental/passive income); documented in the variable.
  • Claimed-dependent stop: modeled from 2024 via the dated parameter and head_is_dependent_elsewhere (following the va_low_income_tax_credit_eligible precedent). An earlier revision of this PR incorrectly stated this was not representable; claimed_as_dependent_on_another_return exists as a person-level input for exactly this case.

Test plan

  • New mo_wftc_eligible.yaml unit tests: no federal EITC ineligible; MFS ineligible; eligible baseline plus positive cases for all allowed statuses (single, head of household, married filing combined, widowed); claimed dependent eligible in 2023 but ineligible from 2024; boundary cases at and above the limit for 2023, 2024, and 2025 (including $4,401 in 2025 — below federal, above Missouri).
  • Three integration cases in mo_wftc.yaml: MFS filer, over-limit investment income, and a claimed dependent (2025) all produce mo_wftc: 0.
  • Existing tests (baseline WFTC, credit order, MO integration, contrib refundable-WFTC reform) use non-MFS filers with no investment income and are unaffected.
  • Not run locally by request — CI validates.

🤖 Generated with Claude Code

Missouri's Working Families Tax Credit (RSMo 143.177) is limited to filing
statuses of single, head of household, widowed, or married filing combined,
and to filers whose investment income does not exceed a Missouri-specific
limit reflecting IRC Section 32(i) as of January 1, 2021 ($4,050 in 2023,
$4,300 in 2024, $4,400 in 2025, per Form MO-WFTC). Neither condition was
modeled, so MFS filers and filers over the Missouri investment income limit
received the credit whenever the federal EITC paid them.

Fixes #9177
Fixes #9178

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (74f045a) to head (0eec199).
⚠️ Report is 15 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #9180   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         2    -1     
  Lines           63        31   -32     
  Branches         3         0    -3     
=========================================
- Hits            63        31   -32     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

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

☔ View full report in Codecov by Harness.
📢 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.

…exclusion

The 2024 and 2025 Form MO-WFTC checklists stop filers claimed as a
dependent on another return; model this with a dated boolean parameter
and the existing head_is_dependent_elsewhere variable (the 2023 form has
no such stop). Also require a federal EITC in mo_wftc_eligible so the
variable reflects full WFTC eligibility per RSMo 143.177.2 and Form
MO-WFTC Line 1 rather than only the Missouri-specific conditions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@DTrim99

DTrim99 commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Program Review

Source Documents

Branch Status

Branch is 2 commits ahead, 3 behind main (informational only). CI: all checks passing, including codecov.

Critical (Must Fix)

None.

  • All five dated parameter values ($4,050 / $4,300 / $4,400 investment limits; dependent exclusion false 2023 / true 2024+) trace to authoritative MO DOR sources and match the extracted form text exactly (10/10 PDF audit matches, 0 mismatches).
  • No hard-coded values: every threshold/flag comes from a parameter; the only literal is the allowed eitc > 0 gate.
  • RSMo 143.177.2 confirms the eligible-taxpayer definition (single / head of household / widowed / married filing combined — MFS excluded) and 143.177.3(1) confirms the "as of January 1, 2021" EIC reference. Statute contains no dollar amounts, corroborating the parameter comment that DOR sets the limit on the form.
  • mo_wftc_eligible has passing unit coverage for every clause; mo_wftc_potential gating is exercised by integration tests. Entity levels, period usage, changelog fragment, and reference formats are all correct.
  • The DOR FAQ independently corroborates all three investment-income limits and the filing-status list; all cited hrefs resolve, and page 43 of the 2025 MO-1040 Instructions was confirmed to contain the embedded MO-WFTC form.

Should Address

  1. 2023 investment-income boundary semantics — maintainer judgment call (documented in the PR, but the comment understates the 2023 form's inclusive wording). The PR applies strict > (exactly $4,050 remains eligible) in all years, including 2023, with a documented rationale pinned by a boundary test. The 2023 form is internally inconsistent; verbatim evidence from the extracted text:

    • 2023 form, Qualifications Line 3 (p.1): "3. Do you have investment income equal to or greater than $4,050 (see instructions)? Yes - STOP. You do not qualify for the Missouri Working Family Tax Credit." → exactly $4,050 is INELIGIBLE (>= semantics).
    • 2023 form, instructions Line 3 (p.2): "Line 3: If your investment income is equal to or greater than $4,050, you do not qualify for the credit." → >= semantics.
    • Same 2023 form, Information section (p.2): "Your investment income cannot exceed $4,050." → exactly $4,050 is ELIGIBLE (> semantics).
    • Same 2023 form, Worksheet 1 fallback (p.2): "If Line 14 of Worksheet 1 exceeds $4,050, you do not qualify for the credit." → > semantics.
    • 2024 form Line 3: "Do you have investment income greater than $4,300 (see instructions)?" and 2025 form Line 3: "Do you have investment income greater than $4,400 (see instructions)?" → unambiguous > semantics for 2024–2025 (the PR's <= eligibility condition matches these years exactly).

    The PR's stated rationale — the statutorily referenced pre-ARPA IRC §32(i) disqualifies only income "exceeding" the limit, the 2023 form's own information page says "cannot exceed," and the 2024/2025 forms' switch to "greater than" suggests the 2023 checklist's ">=" was a drafting error — is a defensible statutory-primacy argument. However, the current code comment says only the 2023 checklist disagrees, when in fact the 2023 Line 3 instructions also use "equal to or greater than," so the 2023 form is 2-to-1 against the strict reading, not evenly split. Options: (a) make the 2023 boundary year-dependent (strict < in 2023, <= from 2024, matching each form's literal wording), or (b) keep the uniform strict reading but update the code comment and YAML test comment to acknowledge that the 2023 Line 3 instructions (not just the checkbox) use the inclusive wording. Either way, maintainers should explicitly confirm the choice; it affects only tax units with investment income of exactly $4,050 in 2023 (negligible microsim impact).

  2. 2025 investment-income boundary tests only the "above" side. mo_wftc_eligible.yaml tests $4,401 → ineligible for 2025, but has no $4,400 → eligible (exactly-at-limit) case. 2023 and 2024 both test both halves. Since the at-limit value is exactly the semantic in finding 1, add a 2025 / eitc_relevant_investment_income: 4_400 → mo_wftc_eligible: true case.

  3. No positive test for statute-allowed filing statuses HEAD_OF_HOUSEHOLD, JOINT ("married filing combined"), or SURVIVING_SPOUSE ("widowed"). RSMo 143.177.2 and all three forms allow four statuses; tests cover only SINGLE (eligible) and SEPARATE (ineligible). A regression that accidentally excluded non-SINGLE statuses would pass every current test. Add eligible cases for HoH, JOINT, and SURVIVING_SPOUSE (the model's qualifying widow(er) status).

  4. Refundable-WFTC contrib reform interaction with the new eligibility gate is untested. mo_wftc_potential now returns eligible * federal_eitc * rate, and the MO refundable-EITC reform's mo_refundable_wftc reads mo_wftc_potential — so the reform correctly inherits the new screening, but no reform test confirms an ineligible filer (e.g. investment income over the MO limit, or MFS) now yields zero refundable WFTC. Add a reform case such as eitc: 5_000, eitc_relevant_investment_income: 4_401 → mo_refundable_wftc: 0.

  5. Parameter metadata style conventions (both new parameter files).

    • investment_income_limit.yaml description uses the verb "disqualifies"; the convention's allowed verb set is limits/provides/sets/excludes/deducts/uses — prefer "Missouri excludes filers from the Working Families Tax Credit if their investment income exceeds this amount."
    • Both labels spell out the program ("Missouri Working Families Tax Credit ...") instead of the [State spelled out] [PROGRAM abbreviated] convention — prefer "Missouri WFTC investment income limit" / "Missouri WFTC dependent filer exclusion."
    • Neither description closes with the standard "...under the [Full Program Name] program" clause. Minor consistency items only; all other metadata (units, periods, structured references with page anchors in href) follows house style.

Suggestions

  1. Add one end-to-end realistic-household test. Every new case pins eitc (and eitc_relevant_investment_income) directly — accepted convention for unit tests, but no case exercises the real employment_income → eitc → mo_wftc_eligible → mo_wftc chain, and the zero-EITC case drives eitc: 0 synthetically. One earnings-derived case would strengthen regression coverage.

  2. Make the 2025 MO-vs-federal-limit contrast self-documenting. The 2025 $4,401 case demonstrates the MO limit biting below the federal EITC investment-income limit (comment cites $11,950, a federal figure outside the audited MO documents). Optionally assert in the same case that the household remains federally EITC-eligible so the contrast is test-enforced rather than comment-only.

  3. Reference ordering. The DOR FAQ is the single source that explicitly lists all three dollar amounts and effective years in one place; consider making it the lead reference on investment_income_limit.yaml (currently listed last), and optionally add the FAQ URL to the mo_wftc_eligible.py reference tuple as a plain-language source.

  4. Optional clarity in mo_wftc_potential.py. eligible * federal_eitc * rate (bool × float) is a common PolicyEngine idiom and works correctly; where(eligible, federal_eitc * rate, 0) would be marginally clearer. Non-blocking.

Verified correct (no action needed)

  • SEPARATE-only filing-status exclusion is complete: SINGLE/HoH/WIDOW/JOINT all map to the four allowed statuses; qualifying widow(er) is not wrongly dropped.
  • eitc > 0 correctly operationalizes "allowed a Federal Earned Income Credit"; any allowed-but-$0 daylight case yields $0 credit either way.
  • Dependent-filer exclusion dating (absent on the 2023 form, present on 2024/2025 Line 2) and the 2023→2024 parameter flip are correct and tested on both sides.
  • eitc_relevant_investment_income is a faithful approximation of the MO form's investment-income definition (the form's Pub. 596 Worksheet 1 fallback converges to the same federal measure), and the code comment discloses the approximation.
  • Dependent-flag plumbing: tests input person-level claimed_as_dependent_on_another_return; the formula reads tax-unit head_is_dependent_elsewhere, which aggregates it correctly — no bug.
  • Good reuse throughout: no duplicated concepts; changelog fragment present with correct type (fixed).

PDF Audit Summary

Category Count
Confirmed correct 10
Mismatches 0
Unmodeled items 5 (administrative/compliance requirements or pre-existing model scope, noted below)

Unmodeled items (noted, not findings — all either administrative filing mechanics skipped by convention or pre-existing behavior unchanged by this PR): (1) qualifying-child name/SSN/DOB reporting requirement (present on all three forms' instructions, not just 2025); (2) Missouri's exact Form-1040-line investment-income definition (approximated with the federal EITC measure, disclosed in a code comment); (3) the "EIC law as of January 1, 2021" credit base (pre-existing mo_wftc_potential uses current-law EITC; this PR narrows the gap by adding the pre-ARPA-style investment limit); (4) federal-return/Schedule EIC attachment requirements; (5) the resident-individual requirement (model gates on state code, pre-existing pattern).

Validation Summary

Check Result
Regulatory Accuracy 1 issue (2023 boundary judgment call); 7 items verified correct
Reference Quality 0 issues (all 5 values traceable and corroborated; 3 optional suggestions)
Code Patterns 3 style issues (0 critical; no hard-coded values)
Test Coverage 3 gaps (no untested formula variables)
PDF Value Audit 0 mismatches / 10 confirmed
CI Status Passing (all checks)

Review Severity: COMMENT

No critical issues. The consolidated should-address items are non-blocking: one documented boundary-semantics judgment call for maintainers to confirm, three test-coverage gaps for already-tested variables, and parameter metadata style conventions.

Next Steps

To auto-fix issues: /fix-pr 9180


Automated review generated by /review-program (read-only).

- Note the 2023 form's Line 3 instructions (not just its checklist) use
  "equal to or greater than" wording; keep the strict statutory reading.
- Add positive eligibility tests for head of household, married filing
  combined, and widowed filers.
- Add the 2025 at-limit investment income case.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@hua7450
hua7450 marked this pull request as ready for review August 2, 2026 03:13
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.

MO WFTC missing Missouri-specific investment income limit MO WFTC does not exclude married filing separately filers

2 participants