Skip to content

Limit the Medicaid parent student option to secondary-school students - #11086

Open
hua7450 wants to merge 4 commits into
mainfrom
medicaid-student-option-secondary-school
Open

hua7450 wants to merge 4 commits into
mainfrom
medicaid-student-option-secondary-school

Conversation

@hua7450

@hua7450 hua7450 commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

This fixes a finding shared by #10984 and #11012 in their local review: New Jersey's student option admitted 18-year-olds who attend only college. The predicate is already on main for five other states, so the fix gets its own PR.

The Medicaid parent and caretaker relative category lets a state count an 18-year-old full-time student in secondary school as a dependent child. The formula tested is_full_time_student. At age 18 that variable reflects college enrollment alone by default, because is_in_k12_school covers ages 5 to 17. So the option admitted college students and missed high-school students. It now reads is_in_secondary_school, or a full-time student who isn't a college student.

Law

42 CFR 435.4, "Dependent child" (1):

Is under the age of 18, or, at State option, is age 18 and a full-time student in secondary school (or equivalent vocational or technical training), if before attaining age 19 the child may reasonably be expected to complete such school or training.

N.J.A.C. 10:69-3.13(a):

To be considered of eligible age, a child in AFDC-related Medicaid must be under age 18, or under age 19 and a full-time student in a secondary school, or in the equivalent level of vocational or technical training, and is reasonably expected to complete the program before reaching age 19.

Affected states

The states that elect the option in student_option.yaml: Missouri, New Jersey, South Carolina, Tennessee, Texas and Wisconsin. Georgia, Kansas, Alabama and Massachusetts apply under-19 age limits with no student condition, so the change doesn't reach them.

Change

  • is_parent_for_medicaid_nfc: the student path is is_in_secondary_school | (is_full_time_student & ~is_full_time_college_student). The TANF dependent-child rules (sc_tanf_dependent_child, mo_tanf_dependent_child, mt_tanf_eligible_child) gate the same rule on is_in_secondary_school. The second term keeps the generic is_full_time_student input working for API callers. Enrollment under 19 stands in for the expectation of finishing before 19, and secondary-school attendance stands in for full-time enrollment.
  • student_option.yaml and the source-conflict candidate us-wi:medicaid-parent-student-option-full-time: rewrote the comment and note that described the old proxy.

An 18-year-old in an electing state:

Inputs Before After
is_full_time_college_student (the default path for a college student) Dependent child Not
is_in_secondary_school Not Dependent child
is_full_time_student, no college flag Dependent child Dependent child
is_in_k12_school Dependent child Dependent child
None Not Not

Microsimulation

Microcosm doesn't produce is_in_secondary_school yet. This PR removes the false positives for college students, but it can't add high-school students until the dataset sets the flag. A Microcosm issue will propose A_HSCOL == 1 (CPS ASEC) and SCHG 11 to 14 (ACS).

Tests

  • is_parent_for_medicaid.yaml: the Texas college-student case, which was marked "Known limitation", now sets is_full_time_college_student: true and expects false. A new Texas case sets is_in_secondary_school: true and expects true. The other cases are unchanged.
  • New Jersey's Case 3 in parent/is_parent_for_medicaid_nfc.yaml sends is_full_time_student: true with no college flag and still passes.
  • Partner tests: none changes. A parsed scan of all partner cases (144 files) finds two 18-year-olds with a student flag, both in Texas, and both send is_full_time_student: true with no college flag: tanf_child_age_18_full_time_student_eligible and medicaid_older_child_ages_out_at_19. No partner case flags an 18-year-old as a college student.
  • git merge-tree merges this branch cleanly with Require a Medicaid adult group parent's children to have coverage (42 CFR 435.119(c)), with New Jersey's under-21 age #11012, which keeps the student test in is_parent_for_medicaid_nfc.
  • Not run locally; CI validates.

axiom: TheAxiomFoundation/rulespec-us#2261 queued

🤖 Generated with Claude Code

hua7450 and others added 2 commits November 16, 2026 17:35
42 CFR 435.4 lets a state count an 18-year-old as a dependent child only
if the child is a full-time student in secondary school or equivalent
vocational or technical training. The formula used is_full_time_student,
which at age 18 reflects only college enrollment by default, so it
admitted college students and missed high-school students. It now reads
is_in_secondary_school, as the TANF dependent-child rules do, or a
full-time student who is not a college student.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hua7450 and others added 2 commits November 19, 2026 20:06
…tion-secondary-school

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tion-secondary-school

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

@MaxGhenis MaxGhenis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Agent review for Max, written by Claude Code for Max Ghenis.

Thanks for tightening the Medicaid student rule. A Codex cloud task reviewed a9c8b51 (GPT-6.2 Sol at Extra High effort; chat https://chatgpt.com/local/6b0c587b-9934-83ea-9216-7167e6b1f02b). Its verdict is request changes, with 5 P1 findings:

  1. Part-time high school newly qualifies. At is_parent_for_medicaid_nfc.py:49 and :52, a Texas parent’s only dependent is 18, with is_in_secondary_school: true and is_full_time_student: false. Expect [false, false] for parent and child. The head gives [true, false] and makes the parent Medicaid-eligible at 10% of the federal poverty level (42 CFR §435.4, Dependent child paragraph (1), and Texas Works Handbook A-521).
  2. The fallback ignores an explicit school-level exclusion. At is_parent_for_medicaid_nfc.py:52, a Texas 18-year-old in full-time adult literacy outside secondary school or equivalent training sets is_full_time_student: true, is_in_secondary_school: false and is_full_time_college_student: false. Expect [false, false]. The head still gives [true, false] (42 CFR §435.4, Dependent child paragraph (1)).
  3. Expected graduation after turning 19 still qualifies. At is_parent_for_medicaid_nfc.py:46 and :59, a New Jersey 18-year-old full-time senior expecting to graduate after turning 19 should yield [false, false]. The head gives [true, false] (N.J.A.C. 10:69-3.13(a), PDF p. 69).
  4. The Wisconsin entry misstates the rule and result. source_conflicts/candidates.yaml:14729 and :14739 say the model follows the statute and state plan. For a single caretaker of a part-time 18-year-old high school student expecting to finish before 19, those sources imply false. The head gives true, consistent with the handbook (Wis. Stat. §49.471(4)(a)4.a., Wisconsin S25, PDF p. 13, and BadgerCare Plus Handbook §2.2.1.3).
  5. Deprivation blocks married caretakers. At requires_deprivation.yaml:35 and :43 and is_parent_for_medicaid_nfc.py:75, joint filers with an 18-year-old full-time secondary student expected to finish before 19 get [false, false, false] in Wisconsin and South Carolina. Both state plans eliminated deprivation, so expect [true, true, false] (Wisconsin S25, PDF p. 13, and South Carolina S25, PDF p. 14).

Also worth fixing (P2):

  • student_option.yaml:41 understates the effect. For a low-income New Jersey parent of an 18-year-old college-only dependent, the expected result without qualifying child coverage is NONE and loss of eligibility. With qualifying child coverage, the parent moves to ADULT and stays eligible (42 CFR §435.119(c)).

Confirmed

  • Both parent YAML files passed, with 33 and 4 cases. Both targeted Texas partner cases and all 251 source-conflict tests passed.

Behavior that predates this PR:

  • The adult-literacy and married-caretaker cases also fail on the merge base. An invalid age of −1 passes the base age test on both revisions.
Proposed YAML
- name: Texas college-only input follows the computed student path
  period: 2025
  input:
    people:
      parent: &parent {age: 45, is_tax_unit_head: true, medicaid_income_level: 0.1}
      child: &college {age: 18, is_tax_unit_dependent: true, is_full_time_college_student: true, medicaid_income_level: 0.1}
    tax_units: &pair_tax_units {family: {members: [parent, child]}}
    households: {home: {members: [parent, child], state_code: TX}}
  output:
    is_full_time_student: [false, true]
    is_parent_for_medicaid_nfc: [false, false]
    is_parent_for_medicaid: [false, false]

- name: Texas part-time high school does not qualify the parent
  period: 2025
  input:
    people:
      parent: *parent
      child: {age: 18, is_tax_unit_dependent: true, is_in_secondary_school: true, is_full_time_student: false, medicaid_income_level: 0.1}
    tax_units: *pair_tax_units
    households: {home: {members: [parent, child], state_code: TX}}
  output:
    is_parent_for_medicaid_nfc: [false, false]
    is_parent_for_medicaid: [false, false]

The review did not run test_microsim.py::test_default_dataset_loads_and_runs.

@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.

Program review

Base repository: PolicyEngine/policyengine-us
PR number: 11086
Reviewed head SHA: a9c8b51
Merge base SHA: 3864f7f
Mode: full
Scope: changed behavior and affected dependencies
Source manifest: /private/tmp/policyengine-command-runs/ea33c0bb2b64/pr-11086-review-sources.json
Review status: COMPLETE

Source Documents

Critical

C1 — an 18-year-old explicitly marked part-time in secondary school now qualifies the parent (OPEN)

  • Location: policyengine_us/variables/gov/hhs/medicaid/eligibility/categories/parent/is_parent_for_medicaid_nfc.py:49-54 (attends_secondary_school) and :56-60.
  • Trigger: 2025, Texas (also Wisconsin, and any state that elects the option). Parent age 45, tax-unit head, medicaid_income_level 0.1. Dependent age 18 with is_in_secondary_school: true and is_full_time_student: false.
  • Expected: is_parent_for_medicaid [false, false]. The option requires a "full-time student" under 42 CFR 435.4 (1), Texas A-521 ("attends school full-time"), Wis. Stat. 49.471(4)(a)4.a. and N.J.A.C. 10:69-3.13(a).
  • Observed at head: is_parent_for_medicaid_nfc and is_parent_for_medicaid are both [true, false], in Texas and in Wisconsin. Reproduction: /tmp/policyengine-command-runs/ea33c0bb2b64/pr-11086-policy-diag/repro-out.json.
  • Why this diff causes it: the merge-base formula gated the option on is_full_time_student alone, so the explicit false returned not-a-dependent-child. The new in_secondary_school | (...) term overrides an explicit is_full_time_student: false. The code comment at lines 41-42 ("attendance standing in for full-time enrollment") documents the proxy. However, the input that marks part-time attendance exists, the merge base honored it, and the formula still reads it on the second term.
  • Impact: wrong PARENT-category eligibility for any household-level caller who records part-time attendance. In Texas at 10% of the federal poverty level, the parent is wrongly made Medicaid-eligible. There is no microsimulation effect today, because no dataset populates is_in_secondary_school.
  • Constraint on the fix (not a tested remedy): at age 18, is_full_time_student defaults to false for a secondary-school-only input (repro "TX secondary only": is_full_time_student [false, false]). Simply ANDing with is_full_time_student would therefore deny the common default case, which the PR rightly wants to count. A workable direction is to include is_in_secondary_school in is_full_time_student's own formula, so an explicit false overrides it, and then require full time on the secondary path. That changes a shared variable, so it needs its own check. Alternatively, add a part-time input.

Coordinator assessment: The code review reproduced this independently: with the PR's formula, the Texas parent's category becomes PARENT and they are Medicaid-eligible; with the merge-base formula the result is [false, false] and category NONE. The code reviewer rated it should-address, because at 18 is_full_time_student defaults to false for every secondary-school student, so requiring it outright would break the PR's new Texas secondary-school case. I've kept it critical: the household's inputs say part-time, the cited sources require full time, and the result is a wrong eligibility decision that the merge base got right. Both reviewers point to the same direction for a fix: have is_full_time_student default to true for is_in_secondary_school, so an explicit false still wins, then require full time on the secondary path.

Should Address

A1 — the Wisconsin source-conflict record misstates which reading the model follows (OPEN)

  • Location: source_conflicts/candidates.yaml:14731-14732 (pe_us.follows: statute) and the note at :14739-14742 (us-wi:medicaid-parent-student-option-full-time).
  • The record's question is whether Wisconsin's option requires full-time attendance (statute and state plan) or any attendance (the Handbook paraphrase). The note says "PE-US follows the statute and state plan" and treats attendance as full time "because no input marks part-time attendance".
  • Observed: the model now gives the any-attendance (Handbook) result on the secondary-school path. A Wisconsin 18-year-old with is_in_secondary_school: true and is_full_time_student: false qualifies the parent ([true, false], repro). Also, an input that marks part-time attendance does exist (is_full_time_student: false), and the merge base honored it. Before this PR, the formula followed the statute on exactly this full-time question, although it over-included college students.
  • Expected: the record should describe the behavior accurately. Either set follows to the Handbook reading and add a proxy note, or fix policy-1 and then state the default assumption (attendance presumed full time unless the caller says otherwise).
  • Source: Wis. Stat. 49.471(4)(a)4.a. (text confirmed, includes "full-time").

Suggestions

S1 — the changelog describes only half of the behavior change (OPEN)

  • Location: changelog.d/medicaid-student-option-secondary-school.fixed.md:1.
  • The fragment says only that college students are excluded. The PR also newly counts an 18-year-old flagged is_in_secondary_school, who previously was not a dependent child (repro "TX secondary only": parent [true, false]; PR body table row 2). Mention both changes.

S2 — an unchanged comment now understates the effect in expansion states (OPEN)

  • Location: student_option.yaml:40-42, which says "In Medicaid-expansion states the impact is limited to category assignment".
  • This PR moves parents in New Jersey or Missouri whose only child is an 18-year-old college student from PARENT to ADULT. The diagnostic "Default NJ college-only" confirms it: PARENT to ADULT, still eligible because the child is covered.
  • The ADULT group applies the 42 CFR 435.119(c) child-coverage requirement with an under-19 age limit (meets_medicaid_adult_group_child_coverage_requirement.py:38-42). If the 18-year-old has no coverage, the parent falls to NONE. I traced this in code and did not execute it. It matches Max's P2.
  • Suggest rewording the comment to mention the coverage requirement.

Evidence Gaps

No material gaps reported.

Notes

  • This review covers the same head (a9c8b51) as Max's 11-29 agent review. Of its five P1 items, item 1 is the critical above and item 4 is the Wisconsin record. Items 2 (a full-time non-college student counted through the fallback), 3 (expected completion before 19, which no input represents) and 5 (deprivation blocking married caretakers in Wisconsin and South Carolina, from requires_deprivation.yaml, outside this diff) give the same results at the merge base, so they predate this PR.
  • In microsimulation, the only school input the data sets is is_full_time_college_student (CPS A_HSCOL). With this PR the student option therefore never fires in microdata; before, it fired for 18-year-old college students. That is the intended effect of the PR, and no dataset sets is_in_secondary_school.

Validation Summary

Local tests at the reviewed head (review venv with policyengine-core 3.37.2; the snapshot's uv.lock pins 3.36.0; imports resolved to the snapshot): 261 YAML cases passed and 0 failed. They cover the Medicaid parent category files, medicaid_category, the adult child-coverage file, is_medicaid_eligible and the two Texas partner files. test_source_conflicts.py: 251 passed. With the merge-base formula restored, the changed college and secondary-school cases both fail, so the tests cover the change. Diagnostics: 11 households at the head and the merge base (code), plus 6 households (policy), with no errors. Sources checked: 42 CFR 435.4 and 435.119, N.J.A.C. 10:69-3.13 (the cited #page=69 is correct), Wis. Stat. 49.471, the Texas Works Handbook A-521 and the Missouri manual. The Wisconsin and South Carolina state plan PDFs returned 403; they matter only for the pre-existing deprivation note. CI: 38/38 checks pass at a9c8b51.

Timing

setup seconds: 5.00s; scope seconds: 60.00s; parallel review seconds: 485.10s; policy role seconds: 274.80s; code role seconds: 485.10s; adjudication seconds: 0.00s; consolidation cleanup seconds: 81.70s; elapsed seconds: 685.00s

Review Severity

REQUEST_CHANGES. Open findings: 1 critical, 1 should address, 2 suggestions.

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.

3 participants