Repository navigation
Deduct a California couple's dependents' premiums whatever their marital unit - #10855
Conversation
…r marital unit 22 CCR 50555.2(a) deducts health insurance premiums paid for any person in the family. The couple budget added a tax dependent's premiums only when the dependent shared the couple's marital unit, which a child never does except in the single unit Core builds when a situation omits marital units. Add the premiums of the unmarried tax dependents of a tax unit the couple head, whatever marital unit those dependents are in, and keep a dependent couple from taking their filer's other dependents' premiums. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PavelMakarchuk
left a comment
There was a problem hiding this comment.
Verdict: REQUEST_CHANGES — the fix is right for a joint couple, but a couple who file separately now get two different halves of one budget.
Should address
-
Spouses in two tax units get different halves of the couple budget.
policyengine_us/variables/gov/hhs/medicaid/income/medicaid_optional_senior_or_disabled_countable_income.pylines 118-122 sum the dependents' premiums over each spouse's own tax unit. When the spouses share a marital unit but file separately, only the spouse whose tax unit holds the child takes the premiums.2026, California, couple aged 67 in one marital unit and two tax units, pensions of $36,000 and $24,000, a child aged 10 with $12,000 of premiums in the first spouse's tax unit:
Spouse who claims the child Other spouse Main $29,880 $29,880 This PR $23,880 $29,880 is_optional_senior_or_disabled_income_eligiblesums the two halves over the marital unit, so the couple's total is $53,760: only $6,000 of the $12,000 is deducted. The couple budget is one budget, so both halves should be $23,880. One way: add the spouse'sdependents_premiumswhen the spouse is in a different tax unit (adding it when they share a tax unit would count the child twice). Please add a test for this shape, or state it as a known limitation in the comment if you prefer to leave it for a follow-up.
Suggestions
- Axiom line. TheAxiomFoundation/rulespec-us#1933 is open and has the
pe-paritylabel, so the line is valid. The issue describes "the deduction of health insurance premiums the person pays" from #10364 and does not mention the family members whose premiums a couple takes. A comment on that issue that links this PR would keep the encoding scope complete. - A dependent who is not a child. The rule applies to any unmarried tax dependent of the couple, not only a child (I checked a disabled adult dependent aged 30: the couple takes their $12,000). 22 CCR 50555.2(a) says "any person in the family", so I think this is right, but no test covers it, and the PR title and changelog say "child". The same premiums also reduce the dependent's own budget when the dependent is aged, blind or disabled. This is the same on main when marital units are omitted.
- Single parents and mixed couples (not from this PR). An aged single parent, and an aged person with a non-aged spouse, still deduct only their own premiums: a dependent child's premiums stay out (I get $35,760 for a single parent aged 67 with a $36,000 pension, at the PR head and on main). 22 CCR 50555.2(a) does not limit the deduction to couples. A follow-up issue would be enough.
- New test. "A California couple who are tax dependents do not take the filer's other dependents' premiums" also passes on main. It is still useful: it fails if the
is_tax_unit_head_or_spousecondition on line 119 is removed.
What I verified
- Entity logic. I read the whole formula,
_ssi_couple_total,_ssi_spouse_indexand_ssi_couple_budget_total. The new sum is a tax-unit sum projected to people and masked to heads and spouses; it is vectorized._ssi_couple_budget_totalis unchanged and still servesis_medically_needy_for_medicaidandis_209b_ssi_recipient_income_eligible_for_medicaid. - Both marital-unit shapes give the same result. I ran 12 households (2026, California) at the PR head, on main, and on the PR merged into current main:
- Couple and child, marital units omitted: $23,880 each on main and with the PR. No change.
- Same, marital units sent: $29,880 each on main, $23,880 each with the PR, as the PR body says.
- Couple who are their son's tax dependents (units omitted and sent), a married pair of dependents, a single parent, a mixed-age couple: the same on main and with the PR.
- Second tax unit with its own adult and child ($5,000 and $7,000 of premiums): the couple takes only their own child's $12,000.
- Law. 22 CCR 50555.2(a): "Health insurance premiums shall be deducted if paid by and purchased for any person in the family." The deduction of a dependent child's premiums from the couple's budget follows from it. The section is one short page, so the link without an anchor is fine. I could not open the DHCS letters (ACWDL 00-57, 20-18, 20-24); the PR does not change those references.
- Hand check of the YAML cases. (36,000 + 24,000 - 240 - 12,000) / 2 = 23,880. (12,000 + 6,000 - 240) / 2 = 8,880. Both are correct.
- Tests at the PR head.
medicaid/income/215 passed (the changed file: 51 passed, also after a merge with current main);medicaid/eligibility/categories/,medicare/eligibility/andstates/ms/dom/hmw/723 passed;tests/unit/test_medicaid_abd_ssi_rate_standard_properties.py117 passed. - Partner contract tests. The PR edits no file under
policyengine_us/tests/policy/baseline/partners/, and the folder passes at the PR head (623 passed). - Repo rules.
changelog.d/ca-abd-fpl-dependent-premiums.fixed.mdis a top-level fragment with a valid type. The PR merges into current main without conflicts. CI is 36/36 green.
When a spouse is in another tax unit, add that spouse's dependents' premiums too, so both halves of the couple budget deduct the dependent once. Say "dependents" rather than "child" in the changelog and comment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks, Pavel.
The changed test file passes locally (52 cases). |
PavelMakarchuk
left a comment
There was a problem hiding this comment.
Verdict: APPROVE — spouses who file separately now get the same half of one couple budget, and I found no premium counted twice or taken from another family. One narrow shape is left as a suggestion.
Resolved since the last review
Reviewed at 4374706 (the reply of November 12, 8:42pm EST).
-
Spouses in two tax units — resolved.
medicaid_optional_senior_or_disabled_countable_income.pylines 124-130 add the spouse's dependents' premiums when the spouse is in another tax unit. I ran the household from the last review again (2026, California, couple aged 67 in one marital unit and two tax units, pensions of $36,000 and $24,000, a child aged 10 with $12,000 of premiums in the first spouse's tax unit):Spouse who claims the child Other spouse Main $29,880 $29,880 Last review (4492d41) $23,880 $29,880 Now (4374706) $23,880 $23,880 The new case "California spouses who file separately share their dependent's premiums in one couple budget." covers this shape and passes.
-
Dependents, not only children — resolved. The title, the changelog fragment and the code comment say "dependents". I accept the reason for no new test: a disabled adult dependent aged 30 with $12,000 of premiums, in the second spouse's tax unit, gives $23,880 for both spouses.
-
Axiom — resolved. The comment on TheAxiomFoundation/rulespec-us#1933 (November 12, 8:42pm EST) links this PR, quotes 22 CCR 50555.2(a), names the couple's dependents and the separate-filer rule, and lists the three companion cases. The issue is open with the
pe-paritylabel, soaxiom: TheAxiomFoundation/rulespec-us#1933 queuedis valid. -
Single parents and mixed couples — resolved as a follow-up. #10859 is open and has the $35,760 example. I get the same $35,760 at this head.
Suggestions
-
A spouse who is a tax dependent of the other spouse's tax unit still gets a different half.
medicaid_optional_senior_or_disabled_countable_income.pylines 119-123 give the tax-unit sum only to a head or spouse of the tax unit, and lines 125-130 add the spouse's sum only when the spouse is in another tax unit. When one spouse is a dependent in the tax unit the other spouse heads, neither condition applies to them.The model infers this shape for a married minor when tax roles are omitted. 2026, California, one tax unit, marital units sent (the couple, and the child alone), no tax roles sent: a spouse aged 67 with a $36,000 pension, a blind spouse aged 17 with a $24,000 pension, a child aged 10 with $12,000 of premiums. The model makes the spouse aged 17 a tax dependent.
Spouse aged 67 (head) Spouse aged 17 (dependent) Main $29,880 $29,880 This PR $23,880 $29,880 The same occurs when
is_tax_unit_dependent: trueis sent for one of two spouses aged 67 ($22,880 and $28,880 with $2,000 of premiums for the dependent spouse). The dependent spouse's value is the same as on main, so this is not a regression: the fix does not reach that spouse. One way: also add the spouse's sum when the person is not a head or spouse of their own tax unit, for examplespouse_in_another_tax_unit | ((spouse >= 0) & ~person("is_tax_unit_head_or_spouse", period)). I tried this on a copy: both households give equal halves ($23,880 and $22,880), the other 17 households I ran do not change, and the changed test file still passes (52). A follow-up issue is enough. -
More cases for the separate-filer rule (optional). The one new case has the child in the first spouse's tax unit. A case with a dependent in each spouse's tax unit would also protect against a double count.
What I checked
-
New diff, line by line.
spouseis a person-row index over the whole simulation,safe_spousereplaces -1 with row 0, and each use is masked byspouse >= 0.tax_unit_idis the same expression that_ssi_established_spouse_indicesuses on main.dependents_premiumsis a tax-unit sum projected to people. The spouse's sum is added only when the tax units differ, so one tax unit is never summed twice._ssi_couple_totaland_ssi_couple_budget_totalare unchanged. -
Households (2026, California, couple aged 67 with $36,000 and $24,000 pensions unless stated). I ran 19 households at this head, on main, and on this PR merged into current main (a93cc58). The PR head and the merge give the same values.
Household Main This PR Two tax units, child ($12,000) with the first spouse $29,880 each $23,880 each Two tax units, child with the second spouse $29,880 each $23,880 each Each spouse claims a dependent ($12,000 and $5,000) $29,880 each $21,380 each Same, plus a third tax unit: adult aged 40 ($3,000) and their child ($7,000) $29,880 each $21,380 each Separate filers with a child ($12,000), plus a second couple aged 68 (joint, $30,000 and $10,000) with a child ($7,000) $29,880 each; $19,880 each $23,880 each; $16,380 each Same two couples in two households of one simulation, people in mixed order $29,880; $19,880 $23,880; $16,380 One joint tax unit, marital units sent $29,880 each $23,880 each One joint tax unit, marital units omitted $23,880 each $23,880 each Second spouse is a dependent in a son's tax unit; son's child has $7,000 $29,880 each $23,880 each Separate filers, spouses pay $1,000 and $2,000, child $12,000 $28,380 each $22,380 each Separate filers, disabled adult dependent aged 30 ($12,000) with the second spouse $29,880 each $23,880 each Separate filers, two dependents married to each other ($6,000 each) $29,880 each $29,880 each Single parent aged 67; couple with a spouse aged 50 $35,760; $53,796 Same (#10859) Hand checks: (60,000 - 240 - 12,000 - 5,000) / 2 = 21,380. (30,000 + 10,000 - 240 - 7,000) / 2 = 16,380. (60,000 - 240 - 1,000 - 2,000 - 12,000) / 2 = 22,380. No household counts a premium twice, and no couple takes a premium from another couple, an unrelated adult's tax unit, or the tax unit that claims one of the spouses.
-
Law. 22 CCR 50555.2(a): "Health insurance premiums shall be deducted if paid by and purchased for any person in the family." The section does not mention tax filing, so the same deduction for both halves of a couple budget, whichever spouse claims the dependent, follows from it. I did not open the DHCS letters (ACWDL 00-57, 20-18, 20-24) again; the PR does not change those references.
-
PR body. The third row of the results table ($29,880 on main, $23,880 with the PR) matches my run. The body says 52 cases for the changed file; I count 52.
-
Tests at this head. The changed file: 52 passed.
medicaid/income/: 216 passed. On the merge with current main: the changed file 52 passed,medicaid/income/218 passed,medicaid/eligibility/categories/andmedicare/eligibility/773 passed. -
Partner contract tests. The PR edits no file under
policyengine_us/tests/policy/baseline/partners/. The folder passes at this head and on the merge (623 passed each). -
Repo rules.
changelog.d/ca-abd-fpl-dependent-premiums.fixed.mdis a top-level fragment with a valid type. The PR merges into current main without conflicts. CI is 36/36 green on 4374706 (last check finished November 12, 9:47pm EST). -
Not verified. I ran the tests on Python 3.13; CI uses 3.14. I did not run a microsimulation: the multi-household run above is the only check of the row indexing over more than one household. I did not run the full test suite.
Summary
California's aged, blind and disabled FPL program deducts health insurance premiums "paid by and purchased for any person in the family" (22 CCR 50555.2).
medicaid_optional_senior_or_disabled_countable_incomeadded a tax dependent's premiums to a couple's budget only when the dependent shared the couple's marital unit. A child never shares a couple's marital unit, so the deduction applied only in the single marital unit Core builds when a situation omitsmarital_units. Datasets, and situations that send marital units, left a dependent child's premiums out.This PR adds the premiums of the unmarried tax dependents of a tax unit the couple head, whatever marital unit those dependents are in. Spouses who file separately, in two tax units, each take the dependents of both, so the two halves of the one couple budget agree. Another couple's dependent and an unrelated adult in another tax unit stay out, as before. A couple who are themselves tax dependents don't take the other dependents' premiums from their filer's tax unit. The rule covers any unmarried tax dependent, not only a child, since 22 CCR 50555.2(a) names "any person in the family".
The change is limited to the premium deduction.
_ssi_couple_budget_total, which the 209(b) and medically needy budgets also use, is unchanged: for those, a dependent's whole budget, income included, isn't the couple's.Results
2026, California, couple aged 67 with $36,000 and $24,000 of pensions, dependent child aged 10 with $12,000 of premiums.
Tests
medicaid_optional_senior_or_disabled_countable_income.yaml:The 11 Medicaid and California test files that use health insurance premiums passed locally (132 cases) before review; after review, the changed test file passes (52 cases).
Related
axiom: TheAxiomFoundation/rulespec-us#1933 queued
🤖 Generated with Claude Code