Repository navigation
Conversation
- Connecticut Paid Leave and the Oregon statewide transit tax read zero before contributions began (January 2021, July 2018) instead of carrying their first value back to 2015. - Massachusetts PFML (from October 2019), New Jersey TDI and FLI, New York Paid Family Leave (from 2018) and Rhode Island TDI take each year's published rate and wage base for 2018-2023, where they read zero. - New rate variables for Massachusetts PFML, the Oregon transit tax and the Vermont Child Care Contribution average the rates in force at the four quarter starts, so a partial first year counts only its months in force. - YAML tests pin a pre-start year and historical years for each state. A property-based test compares every month's stored values with the published tables, and each contribution with the published rate times taxable wages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
marked this pull request as ready for review
November 7, 2026 20:05
This was referenced Nov 7, 2026
…er-averaged rates #10285 (merged 2026-11-09) added employer_state_payroll_premium_deduction_share and Massachusetts' 2027 swap of the family and medical deduction caps. This merge resolves its conflicts with the 2018-2027 histories: - The MA employee and employer rate variables read family_employee_share beside medical_employee_share at each quarter start. - The MA and VT employee contributions multiply the averaged permitted amount by state_payroll_premium_deduction_share. The employer contributions and employer_total_additional_state_payroll_tax add the undeducted part, as #10285 does at January 1. - family_employee_share starts at 1 on 2019-10-01, when contributions began: DFML's 2019-2023 rate pages let the employer withhold the whole family contribution. medical_employee_share keeps 0.4 from 2019-10-01 and takes #10285's 2027 value of 1. - The history invariants check the family share in the schedule, draw a deduction share for each worker in the differential, and widen the employer bound by the employee part the employer may cover. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ates Six YAML cases whose expected values apply the published rates by hand: - Massachusetts 2019 at a 0.5 deduction share: the worker pays half of the October-December permitted amount (47.25 on $100,000) and the employer pays its own share plus the other half (140.25); the employer total adds the same half of the employee rate on $1,000,000 (1,402.50). - Vermont 2024 at a 0.5 deduction share: 27.50 and 192.50 on $100,000, and 1,925 for the employer total on $1,000,000. - The 2027 rate variables after the swap of caps and rates: 0.46% for the employee and 0.42% for an employer with 25 covered individuals. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
PolicyEngine-US modeled most state employee payroll taxes only under current law. A 2018-2024 run therefore charged contributions before some programs began and left out others that were already collecting. This PR gives each affected parameter its published history from 2018 on:
2021-01-01: 0.005) and the Oregon statewide transit tax (2018-07-01: 0.001) had no zero entry, sobackdate_parameterscarried their first value back to 2015 (FIRST_MODELED_YEAR). Both now read zero before contributions began.ct/.../paid_leave/employee_ratefamily_rate,medical_rate,family_employee_share,medical_employee_share,employer_headcount_thresholdstatewide_transit/employee_rateEvery parameter cites its sources in its metadata. For 2019-2023 the MA files cite Wayback captures of the DFML rate pages and of its notice of the delayed start.
Before and after
An audit script,
state_payroll_at_15k.py, computes employee state payroll tax for one household in every state and year: a single parent aged 30 with a child aged 5, earning $15,000 in 2019 dollars, which PE's CPI-U carries to each year. The table shows only the states whose values change; CA, CO, DE, ME, MN, PA and WA keep theirs.Each changed cell equals the published rate times the year's earnings ($14,770.87 in 2018 ... $17,828.11 in 2023). For example, MA 2019 is 0.378% for one quarter of $15,000 ($14.17); NY 2018 is New York's $31.20 Disability Benefits maximum plus 0.126% PFL ($49.81); OR 2018 is 0.1% for half the year ($7.39).
Already right on main, so unchanged here: CO FAMLI starts in 2023, Oregon Paid Leave in 2023, WA Cares counts half of 2023 (the 2023 WA figure is 0.5821% PFML plus half of 0.58%), CA SDI carries the full DE 3395 history (#10255), and Pennsylvania's UC employee rate is 0.06% through 2022 and 0.07% from 2023.
Years before 2018
New Jersey TDI and FLI and Rhode Island TDI collected contributions before 2018. This PR does not encode earlier years: a standing ruling (d2493) holds pre-2018 backfills of this kind, and a queued decision (d2612) asks whether these wait too. Their parameters start at 2018-01-01, so
backdate_parameterscarries the 2018 value back to 2015-2017. Comments in the files and the invariant test label that as an intended approximation. Programs that began after 2015 keep a0000-01-01: 0entry and read zero before their start.Invariants
policyengine_us/tests/core/test_state_payroll_tax_history_invariants.pycopies the published tables (not the model's parameters) and checks:employer_total_additional_state_payroll_taxequals the worker-level employer contribution for Massachusetts and Vermont when the employer-total wages equal the worker's.Two mutation checks each failed both the schedule and the differential tests: New York's 2019 rate set to 0.00154, and, after the merge with #10285, Massachusetts' family employee share set to 0.4 from October 2019.
Test plan
make format(ruff 0.15.5, the locked version)changelog.d/state-payroll-tax-history.fixed.mdYAML, 62 new cases (114 → 176 in the payroll folders): a pre-start year and historical years for each state, partial first years for MA, OR and VT, #10285's deduction share in the MA and VT partial years, the 2027 MA rate variables, wage-base and annual-maximum caps, the MA employer headcount threshold, and the employer-total paths for MA and VT. CI group:
test-yaml-no-structural-states. Run side by side on this machine, one process each, the payroll folders take 56.9 s of test time (143 s CPU) with a 5.83 GB peak footprint on this branch (23 files), against 48.4 s (134 s CPU) and 5.73 GB on main at 61d9e85 (16 files).Python, one new file in the Rest Python
coregroup;rest_python_shards.pyplaces it at its group's median time until a CI report measures it. It needs Python because YAML cannot state for-all properties, read a parameter at each month, or compare two code paths. Alone it takes 12.5 s in pytest (75 s wall including the model import), with a 1.43 GB peak footprint against 1.12 GB for the import by itself. The rate variables read only the four quarter starts; a household calculation with monthly programs such as SNAP already builds all twelve monthly parameter snapshots, so there they add none.Run locally on Python 3.13 at the head commit: the payroll YAML folders for every state with payroll tests plus
gov/states/tax/payroll(176 passed); this PR's invariant file, #10285's deduction-share invariant file and the CBO payroll contrib test (10 passed); andtests/code_health(533 passed, 1 skipped). No partner contract test undertests/policy/baseline/partners/sets an affected state in 2015-2023.Overlap with other PRs
employer_state_payroll_premium_deduction_shareand Massachusetts' 2027 swap of the family and medical deduction caps. This PR merges main and resolves the conflicts:ma_employee_paid_leave_contribution_rateandma_employer_paid_leave_contribution_rate, which now readfamily_employee_shareas well asmedical_employee_share.family_employee_sharestarts at 1 on October 1, 2019, not 2024: DFML's 2019-2023 rate pages let the employer withhold the whole family contribution from the start.employer_total_additional_state_payroll_tax.py; git merges the two cleanly at its head 780a23e.employer_total_additional_state_payroll_tax.py; git merges that file with this PR cleanly. Its one conflict, inemployer_total_additional_state_payroll_tax.yaml, comes from Let employers deduct less than the permitted state payroll premium, and apply Massachusetts' PFML cap swap from 2027 #10285 on main.employee_state_payroll_tax.py, which this PR does not touch.Follow-ups, not in this PR
#10700 takes on all four:
#10700 and this PR both edit
employer_total_additional_state_payroll_tax.py; git merges the two cleanly at #10700's head 8cf5f12.axiom: TheAxiomFoundation/rulespec-us#2069 (RI TDI, new), TheAxiomFoundation/rulespec-us#2070 (OR statewide transit, new), and TheAxiomFoundation/rulespec-us#1817 (MA), TheAxiomFoundation/rulespec-us#1820 (NY), TheAxiomFoundation/rulespec-us#1823 (VT), TheAxiomFoundation/rulespec-us#1826 (CT) and TheAxiomFoundation/rulespec-us#1827 (NJ), each extended with its 2018-2023 history, queued
All seven wait on corpus ingestion of the historical sources, requested in axiom-corpus#893. Each issue carries the verbatim sources and companion tests from the same published values as the YAML tests here.
🤖 Generated with Claude Code