Repository navigation
Remove orphaned IRS premium tax credit parameter files - #11756
Merged
Merged
Conversation
#5480 deleted the IRS-section premium tax credit variables, but their parameters under gov.irs.credits.premium_tax_credit (eligibility and the phase-out starting and ending rates) stayed behind. Nothing in the model reads them; the premium tax credit uses the gov.aca parameters. Fixes #4211 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hua7450
approved these changes
Dec 4, 2026
hua7450
left a comment
Collaborator
There was a problem hiding this comment.
Checked:
- Nothing reads the three files. After merging with current main, no reference remains to
gov.irs.credits.premium_tax_credit, its folder path,is_ptc_eligibleorptc_phase_out_rate, and the folder is gone entirely. - The premium tax credit runs on the
gov.acaparameters, so no result changes. - The branch merges cleanly with current main.
One thing for after merge: PolicyEngine/policyengine-api#4406 is still open. It should merge before the API's next bundle update, since the API's installed-folders test names this folder.
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.
Fixes #4211
What was wrong
#5480 deleted the IRS-section premium tax credit variables (
is_ptc_eligible,premium_tax_creditandptc_phase_out_rateundervariables/gov/irs/credits/premium_tax_credit/), which answered the concern raised on this issue. Their three parameter files stayed behind:parameters/gov/irs/credits/premium_tax_credit/eligibility.yamlparameters/gov/irs/credits/premium_tax_credit/phase_out/starting_rate.yamlparameters/gov/irs/credits/premium_tax_credit/phase_out/ending_rate.yamlNothing in the model reads them. The premium tax credit is computed in
variables/gov/aca/ptc/from thegov.acaparameters (ptc_income_eligibility.yaml,required_contribution_percentage/). These orphans still show up in the parameter catalog, though, so users can edit parameters that have no effect.The fix
Delete the three files and add a
removedchangelog fragment.Checks that nothing reads them, on current
main:credits.premium_tax_credit,premium_tax_credit.phase_out,premium_tax_credit.eligibilityor the folder path. The remainingpremium_tax_credithits are the ACA variable of that name,net_premium_tax_creditandpremium_tax_credit_in_force, none of which reads these parameters.parameters.gov.irs.creditsinto this subtree;tools/pinned_tbs.pyonly walks the EITC, CTC and CDCC subtrees.Who is affected
No household or microsimulation result changes. The parameter paths
gov.irs.credits.premium_tax_credit.eligibilityandgov.irs.credits.premium_tax_credit.phase_out.{starting,ending}_ratedisappear from the app's parameter catalog, so a saved reform that still sets one of them would fail to load the parameter.Downstream:
tests/integration/test_v2_catalog_installed_folders.pypublishesgov.irs.credits.premium_tax_credit.phase_outas its example US bracket scale, and raisesLookupErroronce the installed model lacks the folder. The API pins policyengine 6.20.5 (policyengine-us 2.2.2), so nothing breaks until a bundle update brings in this change. Companion PR: Publish the AOTC scale instead of the IRS PTC folder in the installed-folders test policyengine-api#4406 (tracking issue Stop publishing the IRS premium tax credit folder in the installed-folders catalog test policyengine-api#4405) swaps in the American Opportunity Credit scale, and it should merge before that bundle update.tests/unit/v2/test_parameter_search_file.pyuses the name only in a synthetic record and needs no change.Tests
policyengine_us/tests/code_health/: 1,155 passed, 1 skipped.policyengine_us/tests/policy/baseline/gov/aca/ptc/: 177 passed (this also builds the full parameter tree without the folder).No new tests: the change only deletes unused parameters.
axiom: n/a: removes unused parameter files
🤖 Generated with Claude Code