Repository navigation
Conversation
|
Cross-repo note for the hub, from the session behind #10067. No change requested on this PR. A producer for the pre-tax input is coming. PolicyEngine/microcosm#1189 as opened wrote the reported premium (
So this PR is a prerequisite for that data. The "no One point for the audit, relayed from that session. On Microcosm's PUF-support rows the non-pre-tax premium is not #10067 adds federal Schedule A tests under this contract: eight YAML cases in |
The first independent review asked for changes on five points; each held up against sources. Anchor and universe. BEA NIPA 7.8 line 17 is not an active-worker series: BEA's State Personal Income methodology (December 2025, paragraphs 3.18 and 3.19) says it covers active and retired employees, as CMS NHE Table 24 does. The stage now prices every current policyholder, scales that universe to NHE Table 24 (the anchor #454 chose), and writes the column for employed policyholders only. Retiree and COBRA dollars are priced and left out, not loaded onto workers. BEA and MEPS-IC's own private-sector enrollment total are recorded beside the anchor verdict. Payment status. "Employer pays some" subtracts the contribution of an employee who pays one: MEPS-IC's average contribution divided by one minus the published share of enrollees with no contribution (Tables II.C/D/E.4.a). A cohort with MEPS-IC's own mix reproduces the published cell mean. Gates. Both gates fail when a raw ASEC coverage column is missing. The anchor gate recomputes the anchor-universe total at release weights and bands the employed share. The evidence file carries the base and export signal verdicts, so a waived failure stays on the record. An ACS local build refuses a frame whose input is null on some rows instead of default-filling it. The output family is registered at the raw-stage operator boundary. Pre-tax premium. Removed from this change. PolicyEngine-US treats the premium inputs as disjoint (PolicyEngine/policyengine-us#10046), so a producer must move those dollars out of the reported premium on an engine that includes that change. The earlier derivation is kept on branch esi-pre-tax-premiums-454. The stage now has one output and no seeded draw; the seed-protocol registration is reverted. Measured on the default pinned pool, target year 2024, before calibration: $925.7B over 74.0M employed policyholders with a positive premium, mean $12,515. Receipts regenerated for both pools. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Preserve North Dakota paid SE medical costs and New Jersey per-dependent SE exclusions alongside disjoint employee payroll premiums. Keep CMS ESI uprating and both branches' cases; add two combined regression cases. Record Max's d1314 ruling (2026-10-11): keep the pre-tax premium in MSA gross income, as main does; Minn. Stat. 256D.35 subd. 10.
Keep CMS out-of-pocket uprating, state credit and CI/publishing updates from main d97b916. All original premium test and variable paths remain unchanged; validate the overlapping CMS MOOP parameter and input routing.
The premium inputs previously left pretax payroll treatment ambiguous. Under the hub's settled disjoint-input contract, a caller supplying $3,000 of non-pretax premiums and $2,000 of pretax payroll premiums paid $5,000 in total. Several benefit consumers counted only the $3,000; this PR counts $5,000 where the program's definition includes both payment methods.
The PR documents the employee premium leaves and the separate employer-paid leaf. It adds pretax payments locally in SPM MOOP, SNAP, HUD, Missouri child care, Pennsylvania child care, Orange County General Relief and New Jersey medical deductions. SSI now excludes qualified cafeteria-plan salary-reduction premiums from wages, without excluding retirement deferrals or reducing self-employment income. North Dakota renter-refund income excludes pretax payments once as excluded income while continuing to deduct unreimbursed medical costs actually paid, including self-employed premiums restored by merged #10055. The CRFB reform is unchanged here; its premium-base change is split into a separate draft PR for Max's methodology decision.
Input contract and invariants
pre_tax_health_insurance_premiumscontains employee premiums paid through pretax payroll deductions. It remains a leaf with no formula and retains main's CMS ESI-premium uprating from #10083.health_insurance_premiums,health_insurance_premiums_without_medicare_part_b,other_health_insurance_premiums, reported Medicare Part B and long-term care premium inputs exclude those payroll payments. Applicable non-pretax aggregates and decomposed inputs are alternative representations; their overlapping components must not be added together.employer_sponsored_insurance_premiumsand do not enter employee medical expenses.mi_household_resources; therefore total Michigan resources need not remain fixed when benefits are allowed to respond. North Dakota income remains unchanged through its distinct income-exclusion and medical-expense routes.The shared
medical_expense_health_insurance_premiumsformula remains non-pretax. Consumers that count both sets add the separate leaf locally; consumers that exclude pretax keep the shared aggregate alone. Its documentation now makes that choice explicit.Consumer audit
Round 1 audited main at
fe0c3a651cf27a9974074dbbfd5bcac5684c85f2; round 2 audited main at05907577140ce06f38b45777a05f479181161164using variable and parameter references, including downstream medical-expense consumers. The initial resolved merge incorporated mainde3815f4ccec7c698f4c6c6a5e024acd79f3579b; a second merge incorporates newer fetched maind97b9164c69f3295da44f3ace67985cc5bcf2fbd, including #10055, #10083 and #10097. “Correct” describes this premium contract, not complete coverage of every provision in the program. Derived taxes/benefits inherit the treatment of the listed wage, premium, and expense consumers.pre_tax_contributions; FICA wages,fica_pre_tax_contributionsMinnesota MSA methodology. Max ruled in d1314 (2026-10-11): keep the pre-tax premium in MSA gross income, as main does; Minn. Stat. 256D.35 subd. 10. The statute defines gross income before deductions and disregards. This ruling selects the implemented treatment of an employee's cafeteria-plan premium and closes the methodology item from hub review r2.
Rule 9500.1206 primarily governs General Assistance under 9500.1200; Combined Manual 0017 adopts GA gross-income conventions for non-SSI MSA recipients and substitutes the full federal benefit rate for SSI recipients. Under Max's ruling, the gross eligibility test and guardian-fee base restore the employee salary reduction excluded from SSI wages, preserving main's treatment of the person's own gross wages. 256D.435 continues to supply SSI exclusions for net eligibility and payment. No MSA code or expectation reversion was required when merging main.
In the first new MSA fixture, gross income remains $1,950 ($1,700 gross wages + $250 Social Security), the guardian allowance is $97.50 (5% of $1,950), and MSA is $155 ($1,055 + $97.50 - $997.50 countable income). Excluding the premium from gross would instead produce $1,850, $92.50 and $150; d1314 selects the former treatment. The separate SSI wage exclusion remains in the net calculation.
Medically needy eligibility currently models ABD applicants using SSI countable income. This PR retains the non-pretax-only medical expense aggregate to avoid a blanket second deduction after correcting SSI wages. Kansas explicitly prohibits that repetition. Utah allows employee payroll premiums, paired with gross-income payroll rules. The audit does not establish a universal federal exclusion of pretax premiums as expenses. State-specific sequencing remains a limitation of the existing annual proxy; IRS employer-provided tax classification alone does not establish third-party payment for Medicaid.
The audit also noted pre-existing limits unrelated to this contract: Montana's premium/floor treatment, Washington's unmodeled Medigap component, New Mexico's federal-itemization adjustment, and Alabama's separate small-business insurance deduction. They are reported here without expanding this patch.
Round 2
Removed the CRFB parameter/test changes from this PR in an additive revert commit and opened #10066 from current main. That draft separates the definite after-tax double count from the choice to restore qualified employee salary reductions. Added 16 integration cases: two MSP, two student, one child allocation, SSI spouse/parent deeming, optional Medicaid spouse/parent deeming, two Connecticut SSP, and five Minnesota MSA. Parental fixtures assign singleton marital units to unmarried people and assert zero spousal deeming. The Hypothesis property now includes one-person and two-person married units in every state/example and freezes SSI payments for the Michigan spending invariant. MSA gross eligibility and guardian fees now restore the capped wage exclusion; net eligibility/payment retain it. Medicaid spenddown sequencing remains limited as described above.
Validation
Final merge head:
b5a0b3cc588d95f00768d6e664e3d3075f851313, incorporating newer fetched maind97b9164c69f3295da44f3ace67985cc5bcf2fbd.The first resolved merge head
d939e639e39ed331f842e8b06c920fd111d1b121(mainde3815f4ccec7c698f4c6c6a5e024acd79f3579b) passed all 25 requested and adjacent files: 117 YAML cases and 57 pytest cases. This covers every one of the PR's 21 changed test files relative to the original merge base, all conflicted/adjacent YAML files, the new premium-input property, and the existing ESI uprating, SE premium conservation and Schedule A pretax properties.Main advanced during validation. A read-only dependency audit confirmed that all 47 original PR test/variable paths remain unchanged and the fixtures supply premium amounts at their test period. The additional CMS MOOP uprating change is covered on the final merge tree by
test_cms_moop_uprating.py: 58 passing parameter/metadata tests, including the changed extension helper and input routing. No repeat of unaffected files was needed. Across both merge steps, all 26 files passed (232 cases total). The table's first 25 rows ran on the first merge head; its final row ran on the final merge tree.Each file ran directly in a separate foreground process, sequentially, using Python 3.13.9 and PolicyEngine Core 3.33.2. All runs set
OMP_NUM_THREADS=4 OPENBLAS_NUM_THREADS=4 MKL_NUM_THREADS=4 VECLIB_MAXIMUM_THREADS=4 NUMEXPR_NUM_THREADS=4 OMP_WAIT_POLICY=PASSIVEandPYTHONPATHto this checkout. YAML usedpython -m policyengine_core.scripts.policyengine_command test <file> -c policyengine_us; Python usedpython -m pytest -q <file>. No folder run, microsimulation or parallel heavy test process was used.make formatand the PR diff against main'sgit diff --checkpassed.policyengine_us/tests/)policy/baseline/gov/states/nd/tax/property/renters_refund/nd_renters_refund_income.yamlpolicy/baseline/gov/states/nj/tax/income/deductions/nj_medical_expense_deduction.yamlpolicy/baseline/household/expense/health/medical_expense_health_insurance_premiums.yamlpolicy/baseline/gov/hhs/medicaid/eligibility/categories/medically_needy/medicaid_medically_needy_medical_expenses.yamlpolicy/baseline/gov/hhs/medicaid/income/deemed/from_ineligible_parent/medicaid_optional_senior_or_disabled_unearned_income_deemed_from_ineligible_parent.yamlpolicy/baseline/gov/hhs/medicaid/income/deemed/from_ineligible_spouse/medicaid_optional_senior_or_disabled_income_deemed_from_ineligible_spouse.yamlpolicy/baseline/gov/hhs/medicare/savings_programs/income/msp_countable_income.yamlpolicy/baseline/gov/hud/hud_medical_expenses.yamlpolicy/baseline/gov/local/ca/oc/general_relief/income/ca_oc_general_relief_countable_income_person.yamlpolicy/baseline/gov/ssa/ssi/eligibility/income/deemed/from_ineligible_parent.yamlpolicy/baseline/gov/ssa/ssi/eligibility/income/deemed/from_ineligible_spouse.yamlpolicy/baseline/gov/ssa/ssi/eligibility/income/deemed/ssi_ineligible_child_allocation.yamlpolicy/baseline/gov/ssa/ssi/eligibility/income/ssi_blind_or_disabled_working_student_exclusion.yamlpolicy/baseline/gov/ssa/ssi/income/ssi_earned_income.yamlpolicy/baseline/gov/ssa/ssi/income/ssi_engaged_in_sga.yamlpolicy/baseline/gov/states/ct/dss/ssp/premium_input_contract.yamlpolicy/baseline/gov/states/mn/dhs/msa/premium_input_contract.yamlpolicy/baseline/gov/states/mo/dese/ccs/income/mo_ccs_adjusted_income.yamlpolicy/baseline/gov/states/pa/dhs/ccw/pa_ccw_adjusted_income.yamlpolicy/baseline/gov/usda/snap/income/deductions/snap_allowable_medical_expenses.yamlpolicy/baseline/household/income/spm_unit/spm_unit_medical_out_of_pocket_expenses.yamlcore/test_esi_premium_uprating.pycore/test_medical_expense_premium_conservation.pycore/test_schedule_a_pre_tax_premium_invariants.pycore/test_premium_input_contract.pycore/test_cms_moop_uprating.pytest_esi_premium_uprating.pytest_medical_expense_premium_conservation.pytest_schedule_a_pre_tax_premium_invariants.pytest_premium_input_contract.pytest_cms_moop_uprating.pyThe new
test_premium_input_contract.pyproperty checks generated transfers between disjoint employee payment methods, eight generated plus two explicit examples, across singleton and married-couple units in seven states. It uses the shared read-only reference system and fresh paired synthetic simulations for isolation, with no dataset load or repeated full-model construction. These measured costs include process/model startup on the contended local macOS machine and do not estimate incremental Linux CI group cost. The other four Python files already exist on main and verify preservation of main's uprating and Schedule A/SE premium behavior. This PR adds no CI jobs or runners.The first ND run passed all 14 cases; its external
/usr/bin/time -lresource reporter then failed because the sandbox deniedsysctl kern.clockrate. The raw passing test output is preserved, and its RSS is unavailable. Later files used a sandbox-compatible per-child resource measurement. No failing policy behavior was concealed or expectations rewritten.The round-1 run passed 81 YAML cases across 12 files (38 added and 43 preserved) before the CRFB split, plus the original one-person property. The revised property retains eight generated examples and two explicit examples. Every changed YAML file is run directly, foreground, one at a time. The Python property exercises generated premium transfers rather than duplicating the policy formulas; explicit examples cover zero, complete transfer, and no transfer. Frozen eligibility/program premiums isolate payment treatment from legitimate MAGI-induced coverage changes. The Kansas spenddown case starts from raw wages of $27,020, age 65 and $4,000 of pretax premiums, and verifies SSI earnings of $23,020 and countable income of $11,000. It explicitly disables the separate SSI-recipient Medicaid pathway, so its eligibility assertion detects an erroneous second premium deduction.
No partner files are edited. Read-only inventory found 144 partner YAML files, no pretax or employer-paid inputs, and only zero direct-premium inputs. No relevant partner output movement is expected from those facts; partner scenarios are not rewritten to make the model pass.
The property belongs to the existing Rest/core CI subgroup; no jobs or concurrency are added. Baseline successful main Rest/core at the previously audited main commit ran 830 tests with external elapsed 681.09 seconds and peak RSS 6,756,660 KiB (6.44 GiB). The new file did not exist on main, so its standalone baseline file cost is zero. The round-1 property's standalone run took 901.06 seconds including process/model startup and peaked at 3,317,071,872 bytes (3.09 GiB RSS) on the contended local macOS machine, with one math-library thread. Pytest reported 720.09 seconds. These local measurements are not an estimate of incremental Linux subgroup cost; updated Linux group time/memory remains for hub/CI validation.
Changelog:
changelog.d/hub-premium-input-contract-1010.fixed.md.axiom: TheAxiomFoundation/rulespec-us#1706 TheAxiomFoundation/rulespec-us#1714 TheAxiomFoundation/rulespec-us#1358 TheAxiomFoundation/rulespec-us#1654 TheAxiomFoundation/rulespec-us#1732 TheAxiomFoundation/rulespec-us#1733 TheAxiomFoundation/rulespec-us#1734 TheAxiomFoundation/rulespec-us#1735 TheAxiomFoundation/rulespec-us#1736 TheAxiomFoundation/rulespec-us#1737 queued
Maintainer Axiom follow-up is required. The signed encoder is not available in this workspace; no billed encoder run was requested or performed. The primary provisions and companion tests are listed above.
Merge with main
Merged main
de3815f4ccec7c698f4c6c6a5e024acd79f3579bintohub-premium-input-contract-1010with a merge commit, then incorporated newer fetched maind97b9164c69f3295da44f3ace67985cc5bcf2fbdin a second merge commit. #10055 is included in main and this merge. Its self-employed premium exclusions and paid-cost handling are retained alongside this PR's disjoint-input contract.policyengine_us/variables/gov/states/nj/tax/income/deductions/nj_medical_expense_deduction.pypolicyengine_us/tests/policy/baseline/gov/states/nj/tax/income/deductions/nj_medical_expense_deduction.yamlpolicyengine_us/variables/gov/states/nd/tax/property/renters_refund/nd_renters_refund_income.pypolicyengine_us/tests/policy/baseline/gov/states/nd/tax/property/renters_refund/nd_renters_refund_income.yamlTwo new combined YAML cases exercise nonzero SE deductions and pretax premiums together: ND $40,000 - $3,000 - ($5,500 + $1,000) = $30,500; NJ $1,000 + $5,500 + $3,000 - $800 = $8,700. Existing cases and expectations from both branches are retained unchanged.
The combined NJ medical base is
itemized_medical_expenses - excluded_dependent_premiums + pretax premiums. The combined ND calculation subtracts pretax premiums once and subtractsitemized_medical_expenses + itemized_medical_expenses_applied_exclusion, preserving #10055's distinction between a computed federal subtotal and a caller-supplied subtotal.#10083, commit
35f3c1f92a, uprates both employee pretax and employer-paid ESI premiums by CMS ESI premium per enrollee. The resolved input documentation retains that uprating and its fixed coverage/share assumptions while stating that employee and employer payments are disjoint. #10097, commitbee8954716, uprates HSA payroll contributions by the IRC 223(b)(2) contribution limit; this merge retains that behavior.Main advanced while the original sequential validation was running. Its five additional commits include #10084, the CMS out-of-pocket uprating refresh, plus state-credit and CI/publishing updates. They change none of the original PR's 21 test files or 26 variable files. Existing premium fixtures supply inputs at the test period, so the revised MOOP uprating does not alter those explicit amounts. The merge retains these main changes and adds a targeted run of the 58-case CMS MOOP parameter file; that file also checks the changed extension helper without constructing a microsimulation.
The NJ and ND YAML files and affected premium properties are included in the merge validation recorded above. Minnesota gross treatment remains as selected in d1314.
Merge with main (2)
Merged main
f4539bc050400372ac2a4a8634b7df70c9a960bfin merge commit138dd41db27eee29e28f93b7a7d4d8d298c30f47. The conflicts inhealth_insurance_premiums_without_medicare_part_b.pyandlong_term_health_insurance_premiums.pykeep this PR's disjoint-input documentation plus #10085's unchanged comments and uprating (CMS ESI premium per enrollee and CPI-U medical care, respectively). The three clean premium-file merges retain both sides' changes: direct-purchase, Part B and ESI series alongside this PR's documentation. No additional formula or uprating change was introduced.Checked #10055's payer attribution, bounded SE exclusions, paid-cost restoration and supplied subtotals against the consumers and combined ND/NJ cases; checked #10085's cross-year ESI movement assertions against this PR's same-year premium-transfer contract. No contradictory assertions were found.
All 24 required files passed: 219 Python + 115 YAML = 334 tests, one file per foreground process, sequentially, with all required thread caps. This covers all 21 PR-changed test files plus premium uprating (155), conservation (5), and CMS MOOP (58). Main already includes #10221, so the formerly stale CMS expectation passes unchanged.
make formatand diff whitespace checks passed.The PR delta against the new merge base has the same 48 paths and identical ordered additions/deletions as
d97b9164c6..b5a0b3cc58; its substance is unchanged. The zero-impact measurement above remains tied to its recorded old base/head; no microsimulation was rerun. Main advanced during validation toa2f63c1235(#9913 plus a version update); its 11 paths do not overlap this PR. These tests cover thef4539bc050merge tree.Hub microsimulation impact (current head)
A real microsimulation on the default dataset, main at the merge base
f4539bc050against this PR's head138dd41db2, for 2025 and 2026. The runs went one at a time under the shared heavy-job lock. Sums are weighted.ssissi_countable_incomemedicaid_household_incomemn_msact_sspmi_household_resourcesmsp_countable_incomesnapsnap_allowable_medical_expenseshud_medical_expensesnd_renters_refundnj_medical_expense_deductionspm_unit_medical_out_of_pocket_expensesca_oc_general_reliefmo_ccspa_ccwstate_income_taxincome_taxhousehold_net_incomehousehold_benefitsNo record changes in either year across all 20 outputs, as at the earlier head
b5a0b3cc58. That matches the dataset check: neitherDEFAULT_DATASETat main nor the certifiedpopulace-us-2024-spm-20260909build (revision9a814a3b3b) has apre_tax_health_insurance_premiumscolumn, and the variable has no formula, so the baseline pre-tax additions and exclusion are zero on the pinned dataset. The split CRFB draft changes its premium addback sources and is checked in that PR.Comparison files are in
fixes/10046-impact/on the hub host.