Skip to content

Fix duplicate counting in Medicaid non-filer household size #9562

Open

Description

@hua7450

The non-filer branch of medicaid_household_size can count the same person as a spouse, parent, and child-age member. A married couple aged 18 living with their one-year-old child can therefore receive a modeled household size of 6 instead of 3 for each parent, even though everyone belongs to one tax unit.

This occurs without overriding tax_unit_is_filer: with no income and no refundable credits, the model determines that the parents are non-filers. It also occurs with the parent-count inputs omitted, producing 4 instead of 3 for each parent.

Cause and scope

The child-age applicant branch adds:

spouse_count + family_parent_count + family_child_count

These groups overlap. A parent under 19 is also a child-age member, and a spouse can already be included in either family count. The adult branch's separate spouse and child-age counts also need to be checked for overlap when the spouse is child-age.

This is existing shared Medicaid logic, not a bug introduced by the California CCHIP work or the shared income-boundary changes. The overlapping counts are already present in the common base before both PRs.

The implementation is shared across states; the concrete reproductions below were run for California in 2025. An inflated household size increases the poverty guideline used in income comparisons and can affect Medicaid/CHIP eligibility. The zero-income examples isolate the counting error; they do not by themselves demonstrate a change in eligibility.

Reproduction

Save this as a YAML test and run uv run policyengine-core test <file.yaml> -c policyengine_us:

- name: Case 1, non-filing young parents are counted once each.
  period: 2025
  input:
    people:
      person1: {age: 18, own_children_in_household: 1}
      person2: {age: 18, own_children_in_household: 1}
      person3: {age: 1}
    marital_units:
      couple: {members: [person1, person2]}
      child: {members: [person3]}
    households:
      household:
        members: [person1, person2, person3]
        state_code: CA
  output:
    tax_unit_size: 3
    tax_unit_is_filer: false
    medicaid_uses_non_filer_rules: [true, true, false]
    medicaid_household_size: [3, 3, 3]

The input intentionally omits income, filing status, filing propensities, tax_units, families, and spm_units. The structured-input builder puts all three people in one of each omitted group. tax_unit_is_filer: false above is an expected output, not an input override.

Observed failure:

medicaid_household_size@2025: [6. 6. 3.] differs from [3. 3. 3.]

For each parent, the current count is 1 spouse + 2 parents + 3 people under 19 = 6; the correct count is 3 distinct people.

Additional local checks

Six YAML cases were run on the local #9434 worktree with its pending pregnancy-deduplication edits. Filing status was calculated automatically in every case. Array order is parent 1, parent 2, child.

Parents' ages Annual wages Parent-count inputs Pregnancy Computed filer Actual sizes Expected sizes
35 $0 Omitted None false [3, 3, 3] [3, 3, 3]
35 $50,000 Omitted None true [3, 3, 3] [3, 3, 3]
18 $0 Omitted None false [4, 4, 3] [3, 3, 3]
18 $50,000 Omitted None true [3, 3, 3] [3, 3, 3]
18 $0 One child each None false [6, 6, 3] [3, 3, 3]
18 $0 One child each One expected baby false [7, 7, 4] [4, 4, 4]

Result: 3 passed, 3 failed. In the pregnancy case, ca_medicaid_household_pregnancies correctly returned [1, 1, 1]; the remaining excess is in the base member count.

Expected correction

  • Count each included person once across the applicant, spouse, parent, and child/sibling categories. Deduplicating parent/child overlap alone does not resolve spouse overlap.
  • Add YAML regression coverage for the default-filing examples above and spouses represented in separate tax units. Preserve ordinary tax-filer household results.
  • Review medicaid_household_income for the corresponding overlapping-member sums so size and income use consistent membership. The six tests above establish the size failures, not the income effects.
  • Preserve the distinction between family-group membership and the applicant's actual relationships. The broader relationship-link problem is tracked in Medicaid MAGI household: 'living with both parents' proxy pools grandparent income in multigenerational households #9404.
  • Do not work around the counting error by forcing tax_unit_is_filer to true or changing expected outputs to the inflated sizes.

Policy and related work

Activity

  1. added
    bugSomething isn't working
    medicaidMedicaid and related health programs
    on Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmedicaidMedicaid and related health programsvariables

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions