Skip to content

Apply Mississippi TANF's $90 work expense and dependent care deductions and $10 minimum payment - #10258

Open
PavelMakarchuk wants to merge 2 commits into
mainfrom
fix-10209-ms-tanf-deductions
Open

PavelMakarchuk wants to merge 2 commits into
mainfrom
fix-10209-ms-tanf-deductions

Conversation

@PavelMakarchuk

Copy link
Copy Markdown
Collaborator

Summary

ms_tanf_countable_income added gross earned and unearned income with no deductions, and ms_tanf paid any positive amount.

The MDHS TANF Policy Manual (July 2019), Volume III says:

  • Pages 6025-6026, "Budgeting Net Monthly Earned Income": for families that pass the gross income test, disregard from the monthly earned income of each individual in the budget (a) a "Standard deduction of $90 for work expenses", then (b) the actual cost of care for each dependent child or incapacitated adult in the budget, with no cap. Page 4104 lists the same disregards.
  • Page 6015, "Minimum Benefit", and Chapter 15, Table II: no benefit is issued when the monthly amount is less than $10.

Changes:

  • New parameter gov.states.ms.dhs.tanf.income.deductions.work_expense ($90 a month, per earner).
  • New parameter gov.states.ms.dhs.tanf.minimum_payment ($10 a month).
  • New variable ms_tanf_countable_earned_income: the sum of each earner's max(gross earnings − $90, 0), minus childcare_expenses and care_expenses, floored at zero. Dependent care reduces only earned income.
  • ms_tanf_countable_income now adds ms_tanf_countable_earned_income and tanf_gross_unearned_income.
  • ms_tanf returns 0 when the benefit is under $10.

The gross income test (185% of the need standard) still uses gross income, as the manual requires. These cases are still not modeled: the 6-month and 3-month total disregards, the student earnings disregard, and the dependent care exceptions (care by the payee's child under 21, or care paid by a third party).

Tests

  • New ms_tanf_countable_earned_income.yaml (6 cases): no earnings (control), $200 a month gives 200 − 90 = $110, $50 a month of child care gives $60, two earners at $500 and $300 with $100 of care give 410 + 210 − 100 = $520, earnings under $90 give $0, and care above earnings does not reduce unearned income (countable income $50).
  • ms_tanf.yaml: a $5 benefit is not issued (the existing case that expected $5 now expects $0), and a $10 benefit is issued.
  • integration.yaml: the issue's case is a parent of two with $2,400 a year of earnings. ms_tanf = 12 × (260 − 110) = $1,800 (main: $720). With $600 a year of child care, ms_tanf = 12 × (260 − 60) = $2,400.

Against main's code, all 9 new or changed earnings and minimum assertions fail. With this PR, policyengine_us/tests/policy/baseline/gov/states/ms/dhs/tanf passes (75 tests), as do gov/hhs/tanf/cash (36) and the parameter, registry and code-health checks (819).

Fixes #10209

🤖 Generated with Claude Code

…nd $10 minimum

Mississippi deducts $90 for work expenses and the actual cost of dependent
care from each earner's monthly earnings (MDHS TANF Policy Manual, Volume
III, pages 4104 and 6025-6026), and issues no benefit under $10 a month
(page 6015; Chapter 15, Table II).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (909176a) to head (c748d85).
⚠️ Report is 622 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main    #10258   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         3    -1     
  Lines           76        44   -32     
  Branches         2         0    -2     
=========================================
- Hits            76        44   -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.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DTrim99

DTrim99 commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

PR Review: Apply Mississippi TANF's $90 work expense and dependent care deductions and $10 minimum payment

Summary

The PR makes three changes to Mississippi TANF:

  • Countable earned income. A new SPMUnit MONTH variable, ms_tanf_countable_earned_income, sums each member's max(tanf_gross_earned_income − $90, 0). It then subtracts childcare_expenses and care_expenses and floors the result at zero. ms_tanf_countable_income now adds this variable instead of gross earnings.
  • Minimum payment. ms_tanf returns 0 when the monthly benefit is under $10.
  • Parameters. It adds income/deductions/work_expense ($90) and minimum_payment ($10), both from 2017-01-01.

It also adds 6 + 2 + 2 YAML cases and a fixed changelog fragment.

  • Law. The three provisions the PR adds are right in every claimed year:
    • The July 2019 MDHS manual and the current codified copy (Miss. Admin. Code Title 18, Part 13, PDF dated 2024-12-05) both disregard, "in the order set forth below from the monthly earned income of each individual", (a) "Standard deduction of $90 for work expenses", then (b) "the actual cost for the care of each dependent child or incapacitated adult".
    • The deduction has no cap. Mississippi has no $175/$200 dependent care maximum.
    • Both editions bar monthly benefits "of less than $10".
  • Order of operations.
    • The gross income test (185%) still uses gross income, as required ("For families who qualify on the gross income test").
    • The $90 applies per earner and is floored per earner, and dependent care comes after it.
    • Care reduces only earned income.
  • What stays out of scope. The 6-month and 3-month total disregards are one-time and depend on job-start timing, and the body says so.
  • Code. The new code is vectorized. It has no state-gated key lookups, so the NH Add New Hampshire state supplementation for 2026 #10156 pattern doesn't apply. It creates no circular dependency through childcare_expenses, because MS CCPP reads receives_tanf, which is an input.
  • Tests. I hand-checked 13 expectations, and they are arithmetically right under PE's formula.
  • CI and branch. All 29 checks pass, and the merge with main is clean.

Three things need fixing:

  1. The new ms_tanf expectations ($1,800 and $2,400 in 2026) and the PR body present "maximum less countable income" as the benefit. The Admin Code pays 60% of the deficit (need standard less net income), up to the maximum. Under that rule both cases get $3,120. The author's own open issue Mississippi TANF pays the maximum benefit less income; MDHS pays 60% of the deficit (need standard less net income) up to the maximum #10269 records this, but neither the PR body nor the tests mention it.
  2. The 2019-manual anchor for the $90 and dependent care text points one page early, and the reference titles carry printed page numbers.
  3. The axiom: line is missing. rulespec-us has no Mississippi TANF module, so a queued line is needed (see "Axiom line assessment").

Critical (must fix)

None.

Should address

1. The new ms_tanf expectations pin a benefit formula the governing rule contradicts. Fold #10269 in, or document the deferral.

ms_tanf.py (unchanged core, lines 19-21 at head) pays min_(max_(maximum_benefit − countable_income, 0), maximum_benefit). The PR adds the $10 minimum on top of that and adds new ms_tanf expectations in integration.yaml Cases 9-10 (2026), whose comments read (260 - 110) * 12 = 1_800 and (260 - 60) * 12 = 2_400. The body repeats "ms_tanf = 12 × (260 − 110) = $1,800 (main: $720)".

The codified rule computes the benefit differently:

  • Computing Benefit. Admin Code Title 18, Part 13, Chapter 6, "Computing Benefit" (file pages 458-459): the benefit is controlled by "1. The budgetary deficit, which is secured by subtracting the net income from the requirements of the budget group. 2. The legal maximum benefit ... 3. The percentage, or ratable, reduction". "The benefit will be the percent of the budgetary deficit or the maximum benefit for the number of individuals in the budget, whichever is less."
  • Table II. Chapter 15, Table II (file page 970, revised 12-01-24): "60% of unmet need (deficit) up through but not exceeding legal maximums". The maximum is $200 / $36 / $24, so $260 for 3, and the monthly minimum is $10.
  • Same text in 2019. The 2019 manual has the same text (file page 458) and the same 60% (Table II, file page 888).
  • Net income test. The budget also tests "net income ... against 100% of the standard of need" (Part 13, file page 445). The deficit rule builds that test in.

With the 2026 need standard of $581 for 3, already in need_standard/amount.yaml:

Case (2026) Net monthly income PR / PE formula Admin Code rule
Integration Case 9 110 (260 − 110) × 12 = 1,800 min(⌊0.6 × 471⌋ = 282, 260) × 12 = 3,120
Integration Case 10 60 (260 − 60) × 12 = 2,400 min(⌊0.6 × 521⌋ = 312, 260) × 12 = 3,120
Size 3, $500 earnings (net 410) 410 0 ⌊0.6 × 171⌋ = 102 a month
Size 3, countable income 255 255 5 → 0 under the new minimum ⌊0.6 × 326⌋ = 195 a month

The formula is pre-existing, and the PR's own provisions move most families toward the rule (Case 9: main $720, PR $1,800, rule $3,120). Two things still need attention:

Fix (either):

  • (a) Preferred: implement Mississippi TANF pays the maximum benefit less income; MDHS pays 60% of the deficit (need standard less net income) up to the maximum #10269 here. The two changes rewrite the same lines and expectations.
    • Add gov.states.ms.dhs.tanf.payment_percentage = 0.6 (Part 13 Table II).
    • Move the need standard lookup into a shared variable.
    • Compute deficit = max_(need_standard − countable_income, 0) and benefit = min_(floor(0.6 × deficit), maximum_benefit), then apply the $10 minimum. Benefits are rounded down: Part 13, file page 459, "rounded down ... to the next lower whole dollar amount".
    • Cases 9-10 become 3,120.
    • ms_tanf.yaml Cases 11-12 need inputs near the need standard. For size 3, countable income 570 gives ⌊0.6 × 11⌋ = 6, so 0. Countable income 564 gives ⌊0.6 × 17⌋ = 10, which is issued.
  • (b) Keep the scope and document the deferral.

2. Fix the 2019-manual page anchor for the $90 and dependent care text, and drop printed page numbers from the reference titles.

The anchor:

  • work_expense.yaml (second reference) and the ms_tanf_countable_earned_income.py reference tuple point at TANF-Manual-Revised_7.19.pdf#page=469.
  • In that PDF, file page 469 (printed 6025) has only the "BUDGETING NET MONTHLY EARNED INCOME" heading and the special student disregard. The $90 and the dependent care rule ("2. Disregards for wage earners other than students ... a. Standard deduction of $90 for work expenses. b. Dependent care deduction which is the actual cost ...") are on file page 470 (printed 6026).
  • So the work_expense anchor doesn't show the $90. In the codified Part 13 PDF the same text is on file page 469, which may be where the 469 came from.

The titles:

  • The titles cite printed pages: "page 4104", "pages 6025-6026", "page 6015" and "page 15001".
  • CLAUDE.md says: "One cited page: #page=57 in the href only, no page in the title". It also says page numbers are file pages, not printed pages.

Fix:

  • work_expense.yaml.
    • Change the second href to #page=470 and the title to MDHS TANF Policy Manual, Volume III, Chapter 6 - Budgeting Net Monthly Earned Income.
    • Retitle the first reference ... Chapter 4 - Earned Income Disregards. Its href, #page=370, is correct: it shows "Standard $90 deduction for work expenses".
  • minimum_payment.yaml. Drop "page 6015" and "page 15001" from the titles. Both hrefs (#page=459 and #page=888) are correct.
  • ms_tanf_countable_earned_income.py. Change #page=469 to #page=470. Change the comment's "pages 6025-6026" to the file page, or drop it.

3. Add the axiom: line to the PR body.

The body (head c748d85307, last edited 2026-10-23) has no line starting with axiom in any format. Pavel is staff and this is a policy change, so the line is required, and axiom: needed isn't available. encoded-correct isn't available either, because rulespec-us has no Mississippi TANF module. See "Axiom line assessment" for the queued line and the issue contents.

Suggestions

  1. Cite the current codified rule. Miss. Admin. Code Title 18, Part 13 (TANF Policy Manual, Volume III; the PDF linked from the MDHS administrative codes page, dated 2024-12-05) has the same text and values as the 2019 manual:

    Adding it alongside the 2019 manual shows the values still apply in 2026. ms_tanf_countable_income's references (the 2018 flyer and the Part 19 State Plan) don't contain the deductions.

  2. Two more cases for ms_tanf_countable_earned_income.yaml:

    • The per-earner floor with one earner under $90. Use earnings of 720 and 3,600 a year ($60 and $300 a month), with no care: max(60 − 90, 0) + (300 − 90) = 210. A floor on the pooled amount would give 360 − 180 = 180. Cases 4 and 5 test per-earner and under-$90 separately, never together.
    • The care_expenses branch, which no test reaches. Use a parent earning 6,000 a year and a spouse with care_expenses: 1_200: (500 − 90) − 100 = 310.
  3. Special student disregard (follow-up). The rule disregards "all of the earned income in both the gross and 100% test of each TANF dependent child (but not of a TANF payee)" who is a full-time student, or a part-time student who isn't a full-time employee (2019 manual file page 469; Part 13 file page 469).

    • Today a working teenager's earnings get only the $90, and they also count in the 185% test.
    • PE has is_in_k12_school, which MS CCPP already uses for its own student exclusion, so this can be modeled.
    • The body lists it as not modeled, so a follow-up issue is fine.
  4. Say that pooling dependent care is an approximation. The rule deducts care "from the monthly earned income of each individual". The formula subtracts the unit's care from the unit's total after the per-earner $90, so care above one earner's earnings can offset another's. PE doesn't record which earner pays, so pooling is reasonable. A one-line comment at ms_tanf_countable_earned_income.py:26 would make that explicit.

Verified correct

  • Rule text (2019 manual file page 470, revised 08-01-18; Part 13 file page 469, revised 12-01-17):
    • "Disregard in the order set forth below from the monthly earned income of each individual, other than the students discussed above, whose needs are included in the eligibility determination: a. Standard deduction of $90 for work expenses. b. Dependent care deduction which is the actual cost for the care of each dependent child or incapacitated adult living in the same home and included in the assistance budget."
    • The exceptions: care by "the payee's child or stepchild under age 21", or "paid by a third party". "Any amount above what the third party pays can be allowed as a deduction."
    • The deduction is actual cost, with no maximum.
  • Years.
    • The disregard list ("Standard $90 deduction for work expenses", 2019 manual file page 370) is marked revised 11-01-11.
    • Table II's $10 minimum is marked revised 04-01-06.
    • The 2024-12-05 Part 13 keeps both, so the 2017-01-01 start and the values through 2026 are supported. I found no later change.
  • Minimum benefit. 2019 manual file page 459: "prohibits monthly benefits to individuals or families who qualify for benefits of less than $10 monthly". where(benefit >= p.minimum_payment, benefit, 0) issues exactly $10, which is right. The two exceptions, recoupment and corrective payments, can't be modeled.
  • Order of operations.
    • The gross test comes first: "For families who qualify on the gross income test" (file page 469). ms_tanf_income_eligible still reads gross income, and the existing integration Case 3 ($1,074 against $1,074.85) still passes.
    • The $90 is per earner and floored per earner, then dependent care comes off the earned total and is floored at zero.
    • Unearned income is added afterwards, so care never reduces it (new Case 6).
    • MS has no ongoing percentage disregard. The 6-month total disregard (35+ hours, once) and the 3-month disregard (at closure, 25+ hours) depend on job-start timing. The NOTE keeps saying they aren't modeled.
  • Wage definition (OK Add Oklahoma state supplementation for 2026 #10165 / Document disjoint health premium inputs and correct consumer treatment #10046 family). The manual counts cafeteria-plan diversions as income: "Money which is diverted from an employee's gross earnings through a cafeteria plan ... is counted as income" (2019 manual file page 369). tanf_gross_earned_income sums employment_income_before_lsr and self-employment without netting pre-tax premiums, which is consistent with that.
  • Third-party payments. childcare_expenses is pre-subsidy care less child_care_subsidies (floored), so the subsidized part is excluded and the excess is allowed, as the note requires. The same pattern is used by AL, AZ, DC, GA, IL, TX and other state TANF deductions.
  • No cycle. childcare_expenses → child_care_subsidies → ms_child_care_subsidies. MS CCPP's categorical eligibility and co-pay waiver read is_tanf_enrolled, which defaults to receives_tanf, an input. CCPP's income lists don't include TANF.
  • Code.
    • spm_unit.sum(max_(gross_earned − p.work_expense, 0)) and where(...) are vectorized.
    • The new parameters are scalars, and no state-gated variable is used as a key (NH Add New Hampshire state supplementation for 2026 #10156 doesn't apply).
    • YEAR inputs requested monthly convert by /12; Case 3's 600 → 50 confirms it in CI.
    • The 88-character line is within ruff's default.
    • defined_for = StateCode.MS is set on the new variable.
  • Callers. Only ms_tanf reads ms_tanf_countable_income. ms_tanf feeds tanf_if_takes_up and the programs registry entry. No other caller changes.
  • Hand-checked expectations (13), all correct under PE's formula:
    • ms_tanf_countable_earned_income.yaml (2026-01):
      • Case 1: 0.
      • Case 2: 2,400 / 12 = 200, and 200 − 90 = 110.
      • Case 3: 110 − 600 / 12 = 60.
      • Case 4: (500 − 90) + (300 − 90) − 1,200 / 12 = 520.
      • Case 5: max(60 − 90, 0) = 0.
      • Case 6: max(110 − 300, 0) = 0, and countable income 0 + 600 / 12 = 50 (alimony_income is a TANF unearned source).
    • ms_tanf.yaml:
      • Case 11: 260 − 255 = 5 < 10, so 0.
      • Case 12: 260 − 250 = 10 ≥ 10, so 10.
    • integration.yaml (2026):
      • Case 9: countable 110 × 12 = 1,320. ms_tanf (260 − 110) × 12 = 1,800. Eligible: 200 ≤ 1.85 × 581 = 1,074.85, and assets 0 ≤ 2,000.
      • Case 10: 60 × 12 = 720, and (260 − 60) × 12 = 2,400. Under the Admin Code rule both are 3,120 (Should 1).
      • Existing Case 3: the gross test at $1,074 stays true, which confirms the gross test still ignores the deductions.
  • PR body. "All 9 new or changed earnings and minimum assertions fail on main" is right. The 9 are: earned income 110, 60 and 520, Case 6's countable income 50, ms_tanf Case 11, and the four integration outputs. The zero cases and the $10 case match main.
  • Source-conflict ratchet (Tie source-conflict markers to the register shared with Axiom #10287). The added or edited comments ("MDHS TANF Policy Manual, Volume III, page 6015: no benefit is issued ...", "... pages 6025-6026: from the monthly earned income ..." and "does not apply those time-limited disregards") match neither CONFLICT_COMMENT_RE nor ATTEMPT_RE. No MS file is in KNOWN_UNMARKED. The test YAML is outside the scanned roots.
  • Changelog. changelog.d/fix-10209-ms-tanf-deductions.fixed.md is a top-level fragment with the fixed type.
  • Parameters. The descriptions follow the house template, and period: month and the labels are set.
  • Partner tests. No files under tests/policy/baseline/partners/** are touched, and Household API Partners passes.
  • Issue closure. Fixes #10209 is right: Mississippi TANF omits the $90 work expense and dependent care deductions and pays grants under $10 #10209 asks for exactly the $90, the dependent care deduction and the $10 minimum. The 60% rule is tracked separately in Mississippi TANF pays the maximum benefit less income; MDHS pays 60% of the deficit (need standard less net income) up to the maximum #10269.

Axiom line assessment

The line is missing (Should 3), and encoded-correct isn't available:

  • No module. rulespec-us holds only us-ms/policies/cms/... (CHIP, Medicaid) and us-ms/policies/income_tax/.... There is no Mississippi TANF module.
  • No issue. Searches of rulespec-us issues for "Mississippi TANF", "us-ms TANF", "10209", "10258" and "10269" find no parity issue. The only Mississippi benefit issue is Add AMT parameters for 2020-2023 #1467, for LIHEAP.

Recommended line. File a dispatch-ready pe-parity issue and use axiom: TheAxiomFoundation/rulespec-us#<n> queued. Following #1467's us-ms/regulations/title-18/part-24/... layout, the issue should have:

  • Modules.
    • us-ms/regulations/title-18/part-13/chapter-6/budgeting-net-monthly-earned-income: the $90, dependent care and their order (file page 469).
    • us-ms/regulations/title-18/part-13/chapter-6/amount-of-benefit: computing benefit, minimum benefit and rounding (file pages 458-459).
    • us-ms/regulations/title-18/part-13/chapter-15/table-ii: 60%, the legal maximums and the $10 minimum (file page 970).
    • Optionally .../chapter-4/earned-income-disregards (file page 362).
  • Corpus. It's already ingested. axiom-corpus us-ms/manual/2026-09-10-tanf-state-policy-manual holds us-ms-mdhs-tanf-policy-manual.pdf with sha256 ac33028a…fd771, the same file as the 2024-12-05 Part 13 PDF. So the only blocker is approval of the billed encoder run.
  • Law. The verbatim text from file page 469 (items 2a-2b with the exceptions and the third-party note), the "Minimum Benefit" and "Computing Benefit" paragraphs, and Table II.
  • Required outputs. Each individual's net monthly earned income, the unit's countable income, and the monthly benefit with the $10 minimum.
  • Divergence note. PE's benefit formula differs from the Admin Code's 60% rule until Mississippi TANF pays the maximum benefit less income; MDHS pays 60% of the deficit (need standard less net income) up to the maximum #10269 is fixed, so the oracle comparison will diverge on ms_tanf until then.
  • Companion cases. Take them from the rule text, not from PolicyEngine output:
    • $200 of monthly earnings gives $110 of net earned income.
    • The same earnings with $50 of care give $60.
    • Two earners at $500 and $300 with $100 of care give $520.
    • $60 of earnings gives $0.
    • A computed benefit of $5 is not issued, and $10 is issued.
    • Table II: the size-3 maximum is $260.

CI status

All 29 checks pass at c748d85307 (gh pr checks 10258). The workflow run on that SHA was created 2026-10-23 18:44 UTC, after #10287 and #10334. That includes:

  • the 11 Baseline shards (incl. states shards 1-4);
  • the 9 Contrib shards;
  • Household API Partners;
  • PR validation (lock, guard tests, lint, changelog);
  • Microsimulation;
  • Quick Feedback;
  • codecov patch and project (100%).

None is pending or failing.

Branch status

The branch is 2 commits ahead of main (the change on 2026-10-16 and a merge of main on 2026-10-23) and 48 behind. git merge-tree --write-tree PolicyEngine/main c748d85307 merges cleanly.

Verdict: REQUEST_CHANGES

@DTrim99 DTrim99 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The new rules match the 2019 manual and Admin Code T18 Pt13 ($90 per earner, then actual dependent care with no cap, and no benefit under $10), and all 13 expectations hand-check. Three should-address items: (1) the new ms_tanf Cases 9-10 pin 'max less income' ($1,800/$2,400), but the Admin Code pays min(60% x (need - net), max), which gives $3,120 for both; fold in your #10269 or document the deferral in the body and tests; (2) the 2019-manual anchor #page=469 doesn't show the $90/dependent-care text (file page 470), and the titles carry printed page numbers; (3) there's no axiom line. Four suggestions. Full report in the comment above.

This branch has not been deployed

No deployments
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.

Mississippi TANF omits the $90 work expense and dependent care deductions and pays grants under $10

2 participants