Skip to content

Fix labels, descriptions, references and units across parameters and variables - #11727

Merged
DTrim99 merged 2 commits into
mainfrom
metadata-labels-references
Dec 4, 2026
Merged

DTrim99 merged 2 commits into
mainfrom
metadata-labels-references

Conversation

@DTrim99

@DTrim99 DTrim99 commented Dec 3, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #517
Fixes #1300
Fixes #1449
Fixes #1655
Fixes #3122
Fixes #3229
Fixes #3496
Fixes #3607
Fixes #3653
Fixes #3756
Fixes #4583
Fixes #11719

Summary

This PR fixes metadata only: labels, descriptions, references, units and folder labels. It also fixes one programs registry entry and renames one file to match its class. No parameter value or formula changes. One input variable, oh_section_179_expense_add_back, gains unit = USD, so it now uprates across years like other dollar inputs (see below).

Item What changed
#517 Removed the trailing period from 19 parameter labels, 1 folder label (gov/states/dc/tax/income/credits/ctc/README.md) and 4 variable labels (taxsim_sprofinc, taxsim_pprofinc, divorce_year, capped_property_taxes). The two TAXSIM labels held a second sentence ("Assumed zero."), which moves to documentation. A recount on main found 21 parameter labels, but one was the DC folder and one (gov.abolitions.capped_property_taxes) is built from the variable label, so it is fixed by the variable change. Descriptions keep their periods: they are full sentences under the current convention.
#1300 NIIT rate.yaml: unit currency-USD → /1 (a rate, matching e.g. gov/irs/payroll/medicare/rate/*.yaml); added a label, period: year, a sentence-style description, and references to 26 U.S.C. 1411(a)(1) and the 2024 Form 8960 instructions (#page=2, "Application to Individuals": 3.8% and the thresholds). threshold.yaml: added period: year and references to 26 U.S.C. 1411(b) and the same instructions page.
#1449 Oregon EITC old_child_age.yaml description now says "younger than this age", matching the formula (age < p.old_child_age) and ORS 315.266.
#1655 Maryland max_care_expense_year_offset.yaml: cites Md. Code, Tax-Gen. § 10-108(a) (amendments do not affect Maryland taxable income for the year enacted or earlier years; (c) is the revenue exception), rewrites the description, and fixes the "ammendet" typo.
#3122 Colorado subtractions.yaml: added label: Colorado federal taxable income subtractions (matches additions.yaml).
#3229 oh_section_179_expense_add_back: added unit = USD, the label "Ohio deduction of prior-year Section 168(k) and 179 depreciation add-backs", a documentation string naming both sections, and references. R.C. 5747.01(A)(18)(a)(i) and booklet line 27 ("sections 168(k) and 179 depreciation adjustments") both cover bonus depreciation, and this variable is the model's only line 27 input; the variable name stays. The variable sits in deductions.yaml, so the statute is R.C. 5747.01(A)(18) (the later-year deduction of the add-back), not (A)(17) (the add-back itself); the form reference is the 2025 Ohio Schedule of Adjustments, Line 27, Ohio Depreciation Deduction (booklet PDF pages 22-23). Renamed oh_federal_conformity_deduction.py → oh_federal_conformity_deductions.py with git mv; nothing imports the old path. The other two checklist items were done in #3685.
#3496 Exemption phase-out start.yaml: added Rev. Proc. 2013-35 (2014, #page=16), 2014-61 (2015, #page=16), 2015-53 (2016, pages 16-17) and 2016-55 (2017, #page=18). Every 2014-2017 figure for all five filing statuses matches the Rev. Proc. table. 2013 is statutory and already cited.
#3607 Minimum wage description now says PolicyEngine uses it only as a threshold in program rules (SNAP and Medicaid work requirements, the New Mexico CDCC income limit, the South Dakota and Oklahoma child care activity tests) and that changing it does not change modeled wages or employment. These five readers are the only ones on main.
#3653 Wyden-Smith actc_lookback.yaml and per_child_actc_phase_in.yaml now cite the H.R. 7024 engrossed bill text on congress.gov (Sec. 104, PDF pages 6-8, with the effective date on page 8; Sec. 101, PDF pages 3-4) in place of the Senate Finance summary. The reform's refundable_ctc reference also adds the bill.
#3756 The 3 remaining ca_tanf_* variables (a fourth, ca_tanf_other_unearned_income, was fixed on main by #11726 with a CDSS MPP citation, kept on rebase) that cited http://epolicy.dpss.lacounty.gov (NXDOMAIN) now cite https://my.dpss.lacounty.gov/public/en/home/epolicy/program/calworks/income/income-definitions.html (200, "44-101 Income Definitions"). Added [[dead]] entries for both schemes of the old host to known_dead_reference_urls/northeast_ca.toml so the guard blocks it from returning.
#4583 AFA baby bonus description now says the bonus is added to the ARPA child amount and only changes the CTC when the ARPA amounts and gov.irs.credits.ctc.phase_out.arpa.in_effect are set; added period: year; unit float → currency-USD (it is a dollar amount; no code reads its unit).
#11719 Added one-line README.md labels to 53 folders: gov/states/{fl,nv,sd,tn,wy} and gov/states/household; the 11 state folders, tax and 29 localities under gov/local/ (the seven new California county labels follow the existing siblings "Alameda", "Los Angeles" and "Riverside": "Contra Costa", "Marin", "Orange", "San Bernardino", "Santa Clara", "San Francisco" and "San Mateo"); gov/territories/vi; and the five top-level folders simulation, census, dhs, household and territories. Added tests/code_health/test_parameter_folder_labels.py, which asserts that every agency and jurisdiction folder holding parameters (each folder directly under gov/, each state, territory and local state folder, and each locality) has a README header or index.yaml label. It scans files only. Deeper program folders are out of scope: 3,932 of 4,206 folders under gov/ have no label today.
No issue gov/contrib/ubi_center/flat_tax/deduct_ptc.yaml: the description and label said it deducts the PTC from the flat tax; the switch actually adds assigned_aca_ptc to SPM unit benefits (spm_unit_benefits.py).
No issue New Jersey other_retirement_income/earned_income_threshold.yaml (the block whose label #517 fixes): type: currency-USD → unit: currency-USD and added period: year (its reader, nj_other_retirement_income_exclusion, compares annual earnings). The value stays 3,000.
No issue programs.yaml Montgomery County EITC entry: variable md_montgomery_eitc_refundable → md_montgomery_eitc, and parameter_prefix → gov.local.md.montgomery_county.tax.income.credits.eitc.refundable (the old prefix also resolved to nothing). Removed both keys from KNOWN_UNRESOLVED in test_programs_registry.py, as that file requires.

Left out

  • Remove /1 unit from elasticities #3774 (elasticity units). This PR first changed the labor supply and capital gains elasticities from /1 to float. On app-v2 main, formatParameterValue (app/src/utils/policyTableHelpers.ts) shows /1 as a percentage and every other non-currency unit with exactly one decimal, so report parameter tables would show a 0.25 substitution elasticity as "0.3" and a -0.05 income elasticity as "-0.1". The change is reverted here: those files are back to /1 with their original descriptions, byte for byte as on main. Remove /1 unit from elasticities #3774 waits until app-v2 formats plain decimals with enough precision and will be done in its own PR.
  • Cite primary sources for BBCE #630 (New York BBCE earned-income limit). The primary source, NY OTDA 16-ADM-06, sets the 150% limit effective July 1, 2016 (Sections IV and VIII). The parameter starts at 2015-10-01, so citing the ADM correctly needs a value change (130% before July 2016), which is outside this metadata-only PR. Cite 16-ADM-06 and fix the start date for New York's BBCE earned income limit #11744 handles it.
  • H.R. 7024 Social Security tax excess. H.R. 7024 multiplies the Social Security tax excess by the number of children, and the Wyden-Smith reform doesn't. That is a formula change and will be a separate issue or PR.

No value or formula changes; one input now uprates

  • A script loaded each of the 30 changed parameter YAML files at main and at this branch, dropped metadata, description, documentation, label and reference keys, and compared the rest (values, brackets, breakdown children). Result: 0 differences.
  • An AST comparison of all 11 changed variable and reform .py files (base vs head), ignoring assignments to label, documentation, reference and unit, found every file identical. The Ohio conformity file is a pure rename (R100).
  • Uprating disclosure. oh_section_179_expense_add_back now has unit = USD. Dollar input variables with that unit get the default uprating (policyengine_us/tools/default_uprating.py), which the repo requires for every dollar input, so this input now uprates like the others: a value entered for an earlier year is uprated to later years. Before, a value carried over to later years unchanged. For example, a 10,000 deduction entered for 2024 used to carry to 2026 as 10,000 and now becomes 11,090.33; for a single Ohio filer with $80,000 of wages, 2026 Ohio income tax goes from $1,481.50 to $1,451.52. Results for the year a value is entered don't change. The changelog fragment says the same.
  • The remaining changes are new README.md folder labels, the dead-URL TOML entries, the programs.yaml registry entry, two test files and the changelog fragment.

Tests

Run on the review-fix head with policyengine-core 3.40.0 (matching uv.lock):

  • policyengine_us/tests/code_health/ (including the new folder-label test): 1,157 passed, 1 skipped, 0 failed.
  • policyengine_us/tests/test_programs_registry.py plus the folder-label test: 931 passed, 7 skipped, 0 failed.
  • YAML tests for Ohio deductions, New Jersey exclusions, the AFA baby bonus and other-dependent credit reforms, and labor supply responses: 176 passed, 0 failed.
  • ruff format --check . and ruff check .: clean.

On the earlier head, YAML tests for the other touched areas (Oregon EITC, Colorado subtractions, NIIT, capped property taxes, Maryland dependent care subtraction, CalWORKs, the Wyden-Smith CTC expansion reform) also passed; the review fixes don't touch their files' values or formulas.

axiom: n/a: labels, descriptions, references and units only; no parameter value or formula change (one dollar input now uprates across years, disclosed above)

🤖 Generated with Claude Code

@codecov

codecov Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (f980c92) to head (6301910).
⚠️ Report is 117 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #11727      +/-   ##
===========================================
+ Coverage   95.34%   100.00%   +4.65%     
===========================================
  Files           1         2       +1     
  Lines          86        16      -70     
  Branches        2         0       -2     
===========================================
- Hits           82        16      -66     
+ Misses          4         0       -4     
Flag Coverage Δ
unittests 100.00% <100.00%> (+4.65%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@DTrim99
DTrim99 requested a review from hua7450 December 3, 2026 19:50
@DTrim99
DTrim99 marked this pull request as ready for review December 3, 2026 19:51

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

Thanks, David. This is a careful cleanup:

  • No value, date or breakdown changes in any YAML file.
  • The references check out: the four Rev. Procs. (pages and every 2014-2017 value), the NIIT statute and Form 8960 page, H.R. 7024's sections, Md. Tax-Gen. 10-108(a) and ORS 315.266.
  • The new descriptions match the code: the five minimum-wage readers, the AFA baby bonus needing the ARPA amounts, and deduct_ptc adding the PTC to SPM unit benefits.
  • The Montgomery County registry entry resolves.
  • The folder-label test checks what it says, with no exemption list.

Three things before I approve.

Before merge

  1. Ohio add-back deduction: the new label and documentation leave out Section 168(k). oh_section_179_expense_add_back now reads "Ohio deduction of prior-year Section 179 depreciation add-backs", and the documentation names Section 179 only. Both sources the PR cites also cover 168(k):

    • R.C. 5747.01(A)(18)(a)(i): "five-sixths of qualifying section 179 depreciation expense or depreciation expense allowed by subsection (k) of section 168".
    • The 2025 IT 1040 booklet (pages 22-23), line 27: "Internal Revenue Code sections 168(k) and 179 depreciation adjustments".

    This variable is the model's only line 27 input, so a caller who follows the label would leave out the bonus-depreciation part. A label like "Ohio deduction of prior-year Section 168(k) and 179 depreciation add-backs", with both sections in the documentation, fixes it. The variable name can stay.

  2. unit = USD on that variable changes results. Dollar inputs with that unit get the default uprating (tools/default_uprating.py, lines 120-133).

    • Example: a 10,000 deduction entered for 2024 becomes 11,090.33 in 2026. For a single filer with $80,000 of wages, 2026 Ohio tax drops from $1,481.50 to $1,451.52. Same-year results don't change.
    • Fix: keeping the uprating is right, since the repo requires an uprater for every dollar input. But the changelog fragment and the PR body say nothing changes results, so please say there that this input now uprates like other dollar inputs.
  3. The elasticity unit change rounds them in app-v2 report tables. On app-v2 main, formatParameterValue (app/src/utils/policyTableHelpers.ts) shows /1 as a percentage and gives every other non-currency unit exactly one decimal.

    • Under float, report parameter tables would show a 0.25 substitution elasticity as "0.3" and a -0.05 income elasticity as "-0.1". The input box does show plain decimals, as you intended.
    • This is the check your PR body lists before merging. Either keep /1 on the elasticities and move the change to its own PR once app-v2 formats plain decimals with more precision, or land that app-v2 change first.

Optional

  • Baby bonus unit. baby_bonus.yaml still has unit: float for a dollar amount. The PR edits that block, so currency-USD fits here.
  • NJ threshold block. earned_income_threshold.yaml uses type: currency-USD where unit: belongs and has no period:. The PR edits that block's label.
  • H.R. 7024 Sec. 104 pages. Its effective date is on PDF page 8, so the actc_lookback title could end #page 6-8.
  • California locality labels. The new ones read "Contra Costa County, CA" and "San Francisco, CA", while the existing siblings read "Alameda", "Los Angeles" and "Riverside".
  • Follow-ups, separate PRs.
    • Issue 630 is a real value error. OTDA 16-ADM-06 sets the 150% limit from July 1, 2016 (130% before), while ny/earned_income.yaml has 1.5 from 2015-10-01.
    • H.R. 7024 multiplies the Social Security tax excess by the number of children, which the Wyden-Smith reform doesn't.

The three failing CI checks are the Core 3.42 failures every PR has today (the Social Security state-machine test and two SPM tests), not this diff.

@DTrim99
DTrim99 force-pushed the metadata-labels-references branch from 498dd05 to 444ba7a Compare December 4, 2026 00:51
@DTrim99

DTrim99 commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks for the careful review. Point-by-point:

Before merge

  1. Ohio add-back label (Section 168(k)). Fixed. oh_section_179_expense_add_back now reads "Ohio deduction of prior-year Section 168(k) and 179 depreciation add-backs", and the documentation names Section 168(k) bonus depreciation and Section 179 expense, matching R.C. 5747.01(A)(18)(a)(i) and line 27 of the 2025 IT 1040 booklet. The variable name stays.
  2. unit = USD changes results across years. Kept the unit, since the repo requires an uprater for every dollar input, and disclosed the change in both the changelog fragment and the PR body: a value entered for an earlier year now uprates to later years instead of carrying over flat, and same-year results don't change. I reproduced your example locally: 10,000 entered for 2024 becomes 11,090.33 in 2026, and 2026 Ohio tax for a single filer with $80,000 of wages goes from $1,481.50 to $1,451.52. The "no values or formulas change" section of the PR body now names this exception.
  3. Elasticity units (Remove /1 unit from elasticities #3774). Reverted and deferred. The six elasticity and multiplier files (labor supply income, substitution, the two age multipliers, by_position_and_decile, and the three capital gains elasticities) are back to unit: /1 with their original descriptions, restored byte for byte from main. Fixes #3774 is gone from the PR body. Remove /1 unit from elasticities #3774 waits until app-v2's formatParameterValue shows plain decimals with enough precision; it will be done in its own PR.

Optional

  • Baby bonus unit. Fixed: baby_bonus.yaml is now unit: currency-USD. No code reads its unit; the reform only reads the value.
  • NJ threshold block. Fixed: earned_income_threshold.yaml now has unit: currency-USD in place of type: currency-USD, plus period: year, since its reader (nj_other_retirement_income_exclusion) compares annual earnings to it. The value stays 3,000.
  • H.R. 7024 Sec. 104 pages. Fixed: the actc_lookback title now ends #page 6-8. I checked the engrossed PDF: Sec. 104 starts on page 6 and its effective date, subsection (c), is on page 8.
  • California locality labels. Fixed: the seven new California county folders now follow the existing siblings ("Alameda", "Los Angeles", "Riverside"), so they read "Contra Costa", "Marin", "Orange", "San Bernardino", "Santa Clara", "San Francisco" and "San Mateo". The folder-label test still passes.
  • Follow-ups (separate PRs).

Verification

  • Values-only check: each of the 30 changed parameter YAMLs, compared between main and this branch with metadata, description, documentation, label and reference dropped, shows 0 value or bracket differences.
  • An AST comparison of the 11 changed variable and reform .py files, ignoring label, documentation, reference and unit, finds every file identical.
  • Tests (policyengine-core 3.40.0, matching uv.lock): tests/code_health/ 1,157 passed, 1 skipped; test_programs_registry.py plus the folder-label test 931 passed, 7 skipped; YAML tests for Ohio deductions, NJ exclusions, the AFA baby bonus and other-dependent credit reforms, and labor supply responses 176 passed, 0 failed.
  • ruff format and ruff check: clean.

@DTrim99
DTrim99 requested a review from hua7450 December 4, 2026 00:52

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

Thanks, David. All three fixes check out at 444ba7a:

  • Ohio add-back label. It now names Section 168(k) and 179, matching R.C. 5747.01(A)(18) and line 27 of the 2025 Ohio Schedule of Adjustments, "Deduction of prior year 168(k) and 179 depreciation add-backs".
  • Uprating disclosure. The changelog fragment and the PR body both say this input now uprates. The example is right: 10,000 entered for 2024 becomes 11,090.33 in 2026.
  • Elasticity units. All six files are back to main byte for byte, and the PR no longer says it closes 3774.

The optional items are done too: the baby bonus and New Jersey threshold units, the actc_lookback page range and the California locality labels. Nothing else in the PR changed since the last review.

Approving.

Optional, separate PRs:

  • The New Jersey threshold file cites the same instructions PDF twice, on two hosts.
  • H.R. 7024 multiplies the Social Security tax excess by the number of children, which the Wyden-Smith reform formula doesn't.

DTrim99 and others added 2 commits December 3, 2026 21:23
…variables

- Strip trailing periods from 19 parameter labels, 1 folder label and 4
  variable labels (#517).
- Add 26 U.S.C. 1411 and Form 8960 references to the NIIT rate and
  threshold; set the rate's unit to /1 (#1300).
- Say "younger than" in the Oregon EITC young child age description (#1449).
- Cite Md. Code, Tax-Gen. 10-108(a) on the Maryland CDCC year offset (#1655).
- Label Colorado subtractions (#3122).
- Add unit, label, documentation and R.C. 5747.01(A)(18) references to
  oh_section_179_expense_add_back; rename oh_federal_conformity_deduction.py
  to match its class (#3229).
- Cite Rev. Procs. 2013-35, 2014-61, 2015-53 and 2016-55 on the exemption
  phase-out start (#3496).
- Note the minimum wage's program-rule scope in its description (#3607).
- Point Wyden-Smith references at the H.R. 7024 bill text (#3653).
- Replace the dead epolicy.dpss.lacounty.gov host on 4 CalWORKs variables
  and guard against it (#3756).
- Use unit float for labor supply and capital gains elasticities (#3774).
- Say when the AFA baby bonus takes effect (#4583).
- Label 53 unlabelled agency, state, territory and local parameter folders
  and test that they stay labelled (#11719).
- Describe what the flat tax deduct_ptc switch does.
- Point the Montgomery County EITC registry entry at md_montgomery_eitc and
  its parameters.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ticity units, optional cleanups

- Ohio prior-year depreciation add-back: label and documentation name Section 168(k) as well as Section 179.
- Changelog fragment discloses that the Ohio input now uprates like other dollar inputs.
- Revert the elasticity and multiplier unit changes and description rewording (#3774 deferred).
- AFA baby bonus unit currency-USD; NJ earned income threshold unit and period; H.R. 7024 Sec. 104 pages 6-8; California county labels match their siblings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DTrim99
DTrim99 force-pushed the metadata-labels-references branch from 444ba7a to 6301910 Compare December 4, 2026 02:28
@DTrim99
DTrim99 merged commit 3397b2b into main Dec 4, 2026
38 checks passed
@DTrim99
DTrim99 deleted the metadata-labels-references branch December 4, 2026 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment