Repository navigation
Fix labels, descriptions, references and units across parameters and variables - #11727
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
hua7450
left a comment
There was a problem hiding this comment.
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_ptcadding 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
-
Ohio add-back deduction: the new label and documentation leave out Section 168(k).
oh_section_179_expense_add_backnow 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.
-
unit = USDon 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.
-
The elasticity unit change rounds them in app-v2 report tables. On app-v2 main,
formatParameterValue(app/src/utils/policyTableHelpers.ts) shows/1as 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
/1on 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.
- Under
Optional
- Baby bonus unit.
baby_bonus.yamlstill hasunit: floatfor a dollar amount. The PR edits that block, socurrency-USDfits here. - NJ threshold block.
earned_income_threshold.yamlusestype: currency-USDwhereunit:belongs and has noperiod:. The PR edits that block's label. - H.R. 7024 Sec. 104 pages. Its effective date is on PDF page 8, so the
actc_lookbacktitle 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.yamlhas 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.
- Issue 630 is a real value error. OTDA 16-ADM-06 sets the 150% limit from July 1, 2016 (130% before), while
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.
498dd05 to
444ba7a
Compare
|
Thanks for the careful review. Point-by-point: Before merge
Optional
Verification
|
hua7450
left a comment
There was a problem hiding this comment.
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.
…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>
444ba7a to
6301910
Compare
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, gainsunit = USD, so it now uprates across years like other dollar inputs (see below).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 todocumentation. 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.rate.yaml: unitcurrency-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: addedperiod: yearand references to 26 U.S.C. 1411(b) and the same instructions page.old_child_age.yamldescription now says "younger than this age", matching the formula (age < p.old_child_age) and ORS 315.266.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.subtractions.yaml: addedlabel: Colorado federal taxable income subtractions(matchesadditions.yaml).oh_section_179_expense_add_back: addedunit = 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 indeductions.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). Renamedoh_federal_conformity_deduction.py→oh_federal_conformity_deductions.pywithgit mv; nothing imports the old path. The other two checklist items were done in #3685.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.actc_lookback.yamlandper_child_actc_phase_in.yamlnow 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'srefundable_ctcreference also adds the bill.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 citedhttp://epolicy.dpss.lacounty.gov(NXDOMAIN) now citehttps://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 toknown_dead_reference_urls/northeast_ca.tomlso the guard blocks it from returning.gov.irs.credits.ctc.phase_out.arpa.in_effectare set; addedperiod: year; unitfloat→currency-USD(it is a dollar amount; no code reads its unit).README.mdlabels to 53 folders:gov/states/{fl,nv,sd,tn,wy}andgov/states/household; the 11 state folders,taxand 29 localities undergov/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 folderssimulation,census,dhs,householdandterritories. Addedtests/code_health/test_parameter_folder_labels.py, which asserts that every agency and jurisdiction folder holding parameters (each folder directly undergov/, each state, territory and local state folder, and each locality) has a README header orindex.yamllabel. It scans files only. Deeper program folders are out of scope: 3,932 of 4,206 folders undergov/have no label today.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 addsassigned_aca_ptcto SPM unit benefits (spm_unit_benefits.py).other_retirement_income/earned_income_threshold.yaml(the block whose label #517 fixes):type: currency-USD→unit: currency-USDand addedperiod: year(its reader,nj_other_retirement_income_exclusion, compares annual earnings). The value stays 3,000.programs.yamlMontgomery County EITC entry:variablemd_montgomery_eitc_refundable→md_montgomery_eitc, andparameter_prefix→gov.local.md.montgomery_county.tax.income.credits.eitc.refundable(the old prefix also resolved to nothing). Removed both keys fromKNOWN_UNRESOLVEDintest_programs_registry.py, as that file requires.Left out
/1unit from elasticities #3774 (elasticity units). This PR first changed the labor supply and capital gains elasticities from/1tofloat. On app-v2 main,formatParameterValue(app/src/utils/policyTableHelpers.ts) shows/1as 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/1with their original descriptions, byte for byte as on main. Remove/1unit from elasticities #3774 waits until app-v2 formats plain decimals with enough precision and will be done in its own PR.No value or formula changes; one input now uprates
mainand at this branch, droppedmetadata,description,documentation,labelandreferencekeys, and compared the rest (values, brackets, breakdown children). Result: 0 differences..pyfiles (base vs head), ignoring assignments tolabel,documentation,referenceandunit, found every file identical. The Ohio conformity file is a pure rename (R100).oh_section_179_expense_add_backnow hasunit = 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.README.mdfolder labels, the dead-URL TOML entries, theprograms.yamlregistry 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.pyplus the folder-label test: 931 passed, 7 skipped, 0 failed.ruff format --check .andruff 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