From 5fef9521f329ca9f76a8d5ad4dc540d9f76b01e1 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sat, 3 Oct 2026 07:38:42 -0400 Subject: [PATCH 1/3] Replace dead federal and miscellaneous reference URLs Repoints 52 references in 51 files whose URLs no longer resolve to the same document at a live official URL or a pinned Wayback capture of the dead URL. Only URLs change. Lists 27 of the dead prefixes in known_dead_reference_urls/federal.toml so the offline guard keeps them out. Also makes parse_entries use re.fullmatch so a prefix cannot end in a newline (nit from the #9730 review). Co-Authored-By: Claude Opus 5.5 --- changelog.d/dead-urls-federal.fixed.md | 1 + .../calibration/gov/cbo/income_by_source.yaml | 2 +- .../gov/hhs/medicaid/totals/spending.yaml | 2 +- .../harris/capital_gains/in_effect.yaml | 2 +- .../gov/ed/pell_grant/efc/automatic_zero.yaml | 2 +- .../gov/hhs/head_start/age_range.yaml | 2 +- .../early_head_start/age_limit.yaml | 2 +- .../categories/adult/income_limit.yaml | 2 +- .../categories/infant/income_limit.yaml | 2 +- .../categories/older_child/income_limit.yaml | 2 +- .../categories/parent/income_limit.yaml | 2 +- .../categories/young_adult/income_limit.yaml | 2 +- .../categories/young_child/income_limit.yaml | 2 +- .../premium_free_quarters_threshold.yaml | 2 +- .../reduced_premium_quarters_threshold.yaml | 2 +- .../hhs/tanf/non_cash/income_limit/gross.yaml | 2 +- .../income/amt/exemption/child/amount.yaml | 2 +- .../gov/simulation/aime_lookback_years.yaml | 2 +- .../social_security/aime/indexing_age.yaml | 4 +- .../ga/tax/income/credits/refundable.yaml | 2 +- .../credits/surplus_tax_rebate/amount.yaml | 2 +- .../in/fssa/ccdf/income/get_on_fpg_rate.yaml | 2 +- .../in/fssa/ccdf/income/stay_on_smi_rate.yaml | 2 +- .../states/in/fssa/ccdf/rates/full_time.yaml | 2 +- .../plan_529_contributions/cap.yaml | 2 +- .../plan_529_contributions/cap.yaml | 2 +- .../pa/tax/income/forgiveness/base.yaml | 2 +- .../income/forgiveness/dependent_rate.yaml | 2 +- .../eligibility_income_sources.yaml | 2 +- .../income/forgiveness/rate_increment.yaml | 2 +- .../pa/tax/income/forgiveness/tax_back.yaml | 2 +- .../gov/states/tx/dta/csfp/fpg_limit.yaml | 2 +- .../parameters/gov/usda/csfp/amount.yaml | 2 +- .../parameters/gov/usda/csfp/fpg_limit.yaml | 2 +- .../snap/emergency_allotment/in_effect.yaml | 2 +- .../snap/emergency_allotment/minimum.yaml | 2 +- .../homeless/available.yaml | 2 +- .../homeless/deduction.yaml | 2 +- .../known_dead_reference_urls/federal.toml | 139 ++++++++++++++++++ .../test_known_dead_reference_urls.py | 7 +- .../gov/hhs/medicare/costs/medicare_cost.py | 2 +- .../hhs/medicare/costs/medicare_enrolled.py | 2 +- .../hhs/medicare/costs/medicare_gross_cost.py | 2 +- .../part_a/is_premium_free_part_a.py | 2 +- .../part_b/gross_medicare_part_b_premium.py | 2 +- ...oss_medicare_part_b_premium_if_enrolled.py | 2 +- .../part_b/medicare_part_b_premium.py | 2 +- .../kiddie_tax/amt_kiddie_tax_applies.py | 2 +- .../gov/ssa/social_security/ss_aime.py | 2 +- .../income/credits/ga_surplus_tax_rebate.py | 2 +- .../ms_529_deduction.py | 2 +- .../nd_529_deduction.py | 2 +- .../dshs/rca/eligibility/wa_rca_eligible.py | 2 +- .../spm_unit_oecd_equiv_net_income'.py | 2 +- 54 files changed, 198 insertions(+), 53 deletions(-) create mode 100644 changelog.d/dead-urls-federal.fixed.md create mode 100644 policyengine_us/tests/code_health/known_dead_reference_urls/federal.toml diff --git a/changelog.d/dead-urls-federal.fixed.md b/changelog.d/dead-urls-federal.fixed.md new file mode 100644 index 00000000000..71b546270f2 --- /dev/null +++ b/changelog.d/dead-urls-federal.fixed.md @@ -0,0 +1 @@ +Replace dead federal and miscellaneous reference URLs (IRS, SSA, CMS, USDA, CBO, Medicaid, KFF, Justia and others) with live successors or pinned Wayback captures, and guard against their return. diff --git a/policyengine_us/parameters/calibration/gov/cbo/income_by_source.yaml b/policyengine_us/parameters/calibration/gov/cbo/income_by_source.yaml index 59043d2ddc9..74ae47aba21 100644 --- a/policyengine_us/parameters/calibration/gov/cbo/income_by_source.yaml +++ b/policyengine_us/parameters/calibration/gov/cbo/income_by_source.yaml @@ -14,7 +14,7 @@ metadata: - title: Revenue Projections, by Category | Congressional Budget Office | February 2026 # Source: https://www.cbo.gov/data/budget-economic-data # Sheet 3.Individual Income Tax Details - href: https://www.cbo.gov/system/files/2026-02/51138-2026-02-Revenue-Projections.xlsx + href: https://www.cbo.gov/system/files/2026-02/51138-2026-02-Revenue.xlsx adjusted_gross_income: metadata: label: Total AGI diff --git a/policyengine_us/parameters/calibration/gov/hhs/medicaid/totals/spending.yaml b/policyengine_us/parameters/calibration/gov/hhs/medicaid/totals/spending.yaml index bd8ed3f9a97..e27760c42dd 100644 --- a/policyengine_us/parameters/calibration/gov/hhs/medicaid/totals/spending.yaml +++ b/policyengine_us/parameters/calibration/gov/hhs/medicaid/totals/spending.yaml @@ -14,7 +14,7 @@ metadata: - title: Medicaid Spending by State, Category, and Source of Funds, FY 2021 (millions) | MACPAC href: https://www.macpac.gov/wp-content/uploads/2022/12/MACSTATS_Dec2022_WEB-508.pdf#page=59 - title: Total Medicaid Spending | KFF | 2020 - href: https://web.archive.org/web/20211129161302/https://www.kff.org/medicaid/state-indicator/total-medicaid-spending/?currentTimeframe=0&selectedRows=%7B%22states%22:%7B%22all%22:%7B%7D%7D%7D&sortModel=%7B%22colId%22:%22Location%22,%22sort%22:%22asc%22%7D + href: https://web.archive.org/web/20220810000951/https://www.kff.org/medicaid/state-indicator/total-medicaid-spending/?currentTimeframe=0&sortModel=%7B%22colId%22:%22Location%22,%22sort%22:%22asc%22%7D AL: 2020-01-01: 6_127_207_059 diff --git a/policyengine_us/parameters/gov/contrib/harris/capital_gains/in_effect.yaml b/policyengine_us/parameters/gov/contrib/harris/capital_gains/in_effect.yaml index 90069230bd6..b0bc0dea1d6 100644 --- a/policyengine_us/parameters/gov/contrib/harris/capital_gains/in_effect.yaml +++ b/policyengine_us/parameters/gov/contrib/harris/capital_gains/in_effect.yaml @@ -5,7 +5,7 @@ metadata: label: Harris capital gains tax reform in effect reference: - title: A New Way Forward for the Middle Class - href: https://kamalaharris.com/wp-content/uploads/2024/09/Policy_Book_Economic-Opportunity.pdf#page=73 + href: https://www.kamalaharris.com/wp-content/uploads/2024/09/Policy_Book_Economic-Opportunity.pdf#page=73 values: 0000-01-01: false diff --git a/policyengine_us/parameters/gov/ed/pell_grant/efc/automatic_zero.yaml b/policyengine_us/parameters/gov/ed/pell_grant/efc/automatic_zero.yaml index 2a35d4289bf..dff2eff18e2 100644 --- a/policyengine_us/parameters/gov/ed/pell_grant/efc/automatic_zero.yaml +++ b/policyengine_us/parameters/gov/ed/pell_grant/efc/automatic_zero.yaml @@ -17,7 +17,7 @@ values: metadata: reference: - title: PELL GRANT ELIGIBILITY CHANGES - href: https://www.acct.org/files/Advocacy/Factsheets%20and%20Summaries/pell%20grant%20eligibility%20changes%20website.pdf. + href: https://files.eric.ed.gov/fulltext/ED585399.pdf. 2013-08-01: value: 24_000 metadata: diff --git a/policyengine_us/parameters/gov/hhs/head_start/age_range.yaml b/policyengine_us/parameters/gov/hhs/head_start/age_range.yaml index d1d12256e42..623f0fa64e1 100644 --- a/policyengine_us/parameters/gov/hhs/head_start/age_range.yaml +++ b/policyengine_us/parameters/gov/hhs/head_start/age_range.yaml @@ -24,4 +24,4 @@ metadata: - title: U.S. Department of Health & Human Services Head Start Policy and Regulations, 1302.12 Determining, verifying, and documenting eligibility. (b) href: https://eclkc.ohs.acf.hhs.gov/policy/45-cfr-chap-xiii/1302-12-determining-verifying-documenting-eligibility - title: Federal Reserve Bank of Atlanta, Policy Rules Database (PRD), 2.1.8 Head Start and Early Head Start - href: https://www.atlantafed.org/-/media/documents/economic-mobility-and-resilience/advancing-careers-for-low-income-families/policy-rules-database/policy-rules-database-technical-manual.pdf#page=58 + href: https://github.com/Research-Division/policy-rules-database/blob/a806195682b7515f01b5739343b91201293dddb4/PRD%20Technical%20Manual.pdf#page=57 diff --git a/policyengine_us/parameters/gov/hhs/head_start/early_head_start/age_limit.yaml b/policyengine_us/parameters/gov/hhs/head_start/early_head_start/age_limit.yaml index 890181b774a..5e53488f721 100644 --- a/policyengine_us/parameters/gov/hhs/head_start/early_head_start/age_limit.yaml +++ b/policyengine_us/parameters/gov/hhs/head_start/early_head_start/age_limit.yaml @@ -11,5 +11,5 @@ metadata: - title: U.S. Department of Health & Human Services Head Start Policy and Regulations, 1302.12 Determining, verifying, and documenting eligibility. (b) href: https://eclkc.ohs.acf.hhs.gov/policy/45-cfr-chap-xiii/1302-12-determining-verifying-documenting-eligibility - title: Federal Reserve Bank of Atlanta, Policy Rules Database (PRD), 2.1.8 Head Start and Early Head Start - href: https://www.atlantafed.org/-/media/documents/economic-mobility-and-resilience/advancing-careers-for-low-income-families/policy-rules-database/policy-rules-database-technical-manual.pdf#page=58 + href: https://github.com/Research-Division/policy-rules-database/blob/a806195682b7515f01b5739343b91201293dddb4/PRD%20Technical%20Manual.pdf#page=57 diff --git a/policyengine_us/parameters/gov/hhs/medicaid/eligibility/categories/adult/income_limit.yaml b/policyengine_us/parameters/gov/hhs/medicaid/eligibility/categories/adult/income_limit.yaml index cea777c71af..d17a2f2186d 100644 --- a/policyengine_us/parameters/gov/hhs/medicaid/eligibility/categories/adult/income_limit.yaml +++ b/policyengine_us/parameters/gov/hhs/medicaid/eligibility/categories/adult/income_limit.yaml @@ -12,7 +12,7 @@ metadata: - title: medicaidscreener.com href: https://www.medicaidscreener.com/?p=table - title: Medicaid, Children's Health Insurance Program, & Basic Health Program Eligibility Levels - href: https://www.medicaid.gov/medicaid/national-medicaid-chip-program-information/medicaid-childrens-health-insurance-program-basic-health-program-eligibility-levels/index.html + href: https://www.medicaid.gov/medicaid/national-medicaid-chip-program-information/medicaid-childrens-health-insurance-program-basic-health-program-eligibility-levels - title: Medicaid and CHIP Eligibility, Enrollment, Renewal, and Cost Sharing Policies as of January 2018 href: https://files.kff.org/attachment/Report-Medicaid-and-CHIP-Eligibility-Enrollment-Renewal-and-Cost-Sharing-Policies-as-of-January-2018#page=36 - title: Proposed Extension of Existing Loss of Medicaid SEP | DC Health Benefit Exchange Authority diff --git a/policyengine_us/parameters/gov/hhs/medicaid/eligibility/categories/infant/income_limit.yaml b/policyengine_us/parameters/gov/hhs/medicaid/eligibility/categories/infant/income_limit.yaml index 8f93bb2d441..2ffc0d12b38 100644 --- a/policyengine_us/parameters/gov/hhs/medicaid/eligibility/categories/infant/income_limit.yaml +++ b/policyengine_us/parameters/gov/hhs/medicaid/eligibility/categories/infant/income_limit.yaml @@ -12,7 +12,7 @@ metadata: - title: medicaidscreener.com href: https://www.medicaidscreener.com/?p=table - title: Medicaid, Children's Health Insurance Program, & Basic Health Program Eligibility Levels - href: https://www.medicaid.gov/medicaid/national-medicaid-chip-program-information/medicaid-childrens-health-insurance-program-basic-health-program-eligibility-levels/index.html + href: https://www.medicaid.gov/medicaid/national-medicaid-chip-program-information/medicaid-childrens-health-insurance-program-basic-health-program-eligibility-levels - title: Medicaid and CHIP Eligibility, Enrollment, Renewal, and Cost Sharing Policies as of January 2018 href: https://files.kff.org/attachment/Report-Medicaid-and-CHIP-Eligibility-Enrollment-Renewal-and-Cost-Sharing-Policies-as-of-January-2018#page=26 - title: Medicaid and CHIP Eligibility Levels | CMS Data.Medicaid.gov dataset page (April 1, 2018) diff --git a/policyengine_us/parameters/gov/hhs/medicaid/eligibility/categories/older_child/income_limit.yaml b/policyengine_us/parameters/gov/hhs/medicaid/eligibility/categories/older_child/income_limit.yaml index 8cc875165ca..daaaec51b36 100644 --- a/policyengine_us/parameters/gov/hhs/medicaid/eligibility/categories/older_child/income_limit.yaml +++ b/policyengine_us/parameters/gov/hhs/medicaid/eligibility/categories/older_child/income_limit.yaml @@ -12,7 +12,7 @@ metadata: - title: medicaidscreener.com href: https://www.medicaidscreener.com/?p=table - title: Medicaid, Children's Health Insurance Program, & Basic Health Program Eligibility Levels - href: https://www.medicaid.gov/medicaid/national-medicaid-chip-program-information/medicaid-childrens-health-insurance-program-basic-health-program-eligibility-levels/index.html + href: https://www.medicaid.gov/medicaid/national-medicaid-chip-program-information/medicaid-childrens-health-insurance-program-basic-health-program-eligibility-levels - title: Medicaid and CHIP Eligibility, Enrollment, Renewal, and Cost Sharing Policies as of January 2018 href: https://files.kff.org/attachment/Report-Medicaid-and-CHIP-Eligibility-Enrollment-Renewal-and-Cost-Sharing-Policies-as-of-January-2018#page=26 - title: Medicaid and CHIP Eligibility Levels | CMS Data.Medicaid.gov dataset page (April 1, 2018) diff --git a/policyengine_us/parameters/gov/hhs/medicaid/eligibility/categories/parent/income_limit.yaml b/policyengine_us/parameters/gov/hhs/medicaid/eligibility/categories/parent/income_limit.yaml index 78d765ffba8..7ce8fe41abb 100644 --- a/policyengine_us/parameters/gov/hhs/medicaid/eligibility/categories/parent/income_limit.yaml +++ b/policyengine_us/parameters/gov/hhs/medicaid/eligibility/categories/parent/income_limit.yaml @@ -14,7 +14,7 @@ metadata: - title: medicaidscreener.com href: https://www.medicaidscreener.com/?p=table - title: Medicaid, Children's Health Insurance Program, & Basic Health Program Eligibility Levels - href: https://www.medicaid.gov/medicaid/national-medicaid-chip-program-information/medicaid-childrens-health-insurance-program-basic-health-program-eligibility-levels/index.html + href: https://www.medicaid.gov/medicaid/national-medicaid-chip-program-information/medicaid-childrens-health-insurance-program-basic-health-program-eligibility-levels - title: Medicaid and CHIP Eligibility, Enrollment, Renewal, and Cost Sharing Policies as of January 2018 href: https://files.kff.org/attachment/Report-Medicaid-and-CHIP-Eligibility-Enrollment-Renewal-and-Cost-Sharing-Policies-as-of-January-2018#page=36 - title: Proposed Extension of Existing Loss of Medicaid SEP | DC Health Benefit Exchange Authority diff --git a/policyengine_us/parameters/gov/hhs/medicaid/eligibility/categories/young_adult/income_limit.yaml b/policyengine_us/parameters/gov/hhs/medicaid/eligibility/categories/young_adult/income_limit.yaml index 2529c18a510..52031ba7a08 100644 --- a/policyengine_us/parameters/gov/hhs/medicaid/eligibility/categories/young_adult/income_limit.yaml +++ b/policyengine_us/parameters/gov/hhs/medicaid/eligibility/categories/young_adult/income_limit.yaml @@ -10,7 +10,7 @@ metadata: - title: medicaidscreener.com href: https://www.medicaidscreener.com/?p=table - title: Medicaid, Children's Health Insurance Program, & Basic Health Program Eligibility Levels - href: https://www.medicaid.gov/medicaid/national-medicaid-chip-program-information/medicaid-childrens-health-insurance-program-basic-health-program-eligibility-levels/index.html + href: https://www.medicaid.gov/medicaid/national-medicaid-chip-program-information/medicaid-childrens-health-insurance-program-basic-health-program-eligibility-levels - title: Medicaid and CHIP Eligibility Levels | CMS Data.Medicaid.gov dataset page (April 1, 2018) href: https://data.medicaid.gov/dataset/d7e4cccb-1c56-5b5d-acce-5e7744c6d3b4 - title: Medicaid and CHIP Eligibility Levels | CMS Data.Medicaid.gov CSV download (April 1, 2018) diff --git a/policyengine_us/parameters/gov/hhs/medicaid/eligibility/categories/young_child/income_limit.yaml b/policyengine_us/parameters/gov/hhs/medicaid/eligibility/categories/young_child/income_limit.yaml index b2eaadf86e6..1dc595bddc1 100644 --- a/policyengine_us/parameters/gov/hhs/medicaid/eligibility/categories/young_child/income_limit.yaml +++ b/policyengine_us/parameters/gov/hhs/medicaid/eligibility/categories/young_child/income_limit.yaml @@ -12,7 +12,7 @@ metadata: - title: medicaidscreener.com href: https://www.medicaidscreener.com/?p=table - title: Medicaid, Children's Health Insurance Program, & Basic Health Program Eligibility Levels - href: https://www.medicaid.gov/medicaid/national-medicaid-chip-program-information/medicaid-childrens-health-insurance-program-basic-health-program-eligibility-levels/index.html + href: https://www.medicaid.gov/medicaid/national-medicaid-chip-program-information/medicaid-childrens-health-insurance-program-basic-health-program-eligibility-levels - title: Medicaid and CHIP Eligibility, Enrollment, Renewal, and Cost Sharing Policies as of January 2018 href: https://files.kff.org/attachment/Report-Medicaid-and-CHIP-Eligibility-Enrollment-Renewal-and-Cost-Sharing-Policies-as-of-January-2018#page=26 - title: Medicaid and CHIP Eligibility Levels | CMS Data.Medicaid.gov dataset page (April 1, 2018) diff --git a/policyengine_us/parameters/gov/hhs/medicare/part_a/premium_free_quarters_threshold.yaml b/policyengine_us/parameters/gov/hhs/medicare/part_a/premium_free_quarters_threshold.yaml index 8a68ad8c2a8..bc6ab7c2646 100644 --- a/policyengine_us/parameters/gov/hhs/medicare/part_a/premium_free_quarters_threshold.yaml +++ b/policyengine_us/parameters/gov/hhs/medicare/part_a/premium_free_quarters_threshold.yaml @@ -5,6 +5,6 @@ metadata: label: Premium-free Part A quarters threshold reference: - title: Medicare.gov - Part A costs - href: https://www.medicare.gov/basics/costs/medicare-costs/part-a-costs + href: https://www.cms.gov/newsroom/fact-sheets/2026-medicare-parts-b-premiums-deductibles values: 2000-01-01: 40 diff --git a/policyengine_us/parameters/gov/hhs/medicare/part_a/reduced_premium_quarters_threshold.yaml b/policyengine_us/parameters/gov/hhs/medicare/part_a/reduced_premium_quarters_threshold.yaml index 555fcca7691..7dd5c6b25d3 100644 --- a/policyengine_us/parameters/gov/hhs/medicare/part_a/reduced_premium_quarters_threshold.yaml +++ b/policyengine_us/parameters/gov/hhs/medicare/part_a/reduced_premium_quarters_threshold.yaml @@ -5,6 +5,6 @@ metadata: label: Reduced Part A premium quarters threshold reference: - title: Medicare.gov - Part A costs - href: https://www.medicare.gov/basics/costs/medicare-costs/part-a-costs + href: https://www.cms.gov/newsroom/fact-sheets/2026-medicare-parts-b-premiums-deductibles values: 2000-01-01: 30 diff --git a/policyengine_us/parameters/gov/hhs/tanf/non_cash/income_limit/gross.yaml b/policyengine_us/parameters/gov/hhs/tanf/non_cash/income_limit/gross.yaml index b0287b22766..d2f4d09931e 100644 --- a/policyengine_us/parameters/gov/hhs/tanf/non_cash/income_limit/gross.yaml +++ b/policyengine_us/parameters/gov/hhs/tanf/non_cash/income_limit/gross.yaml @@ -113,7 +113,7 @@ OR: 2022-01-01: 2 PA: 2015-10-01: 1.6 - # https://www.snapscreener.com/blog/pennsylvania-snap-increase + # http://services.dpw.state.pa.us/oimpolicymanuals/snap/512_Categorical_Eligibility/512_1_General_Policy.htm 2022-10-01: 2 RI: 2015-10-01: 1.85 diff --git a/policyengine_us/parameters/gov/irs/income/amt/exemption/child/amount.yaml b/policyengine_us/parameters/gov/irs/income/amt/exemption/child/amount.yaml index 52fb6b73285..36b10011c14 100644 --- a/policyengine_us/parameters/gov/irs/income/amt/exemption/child/amount.yaml +++ b/policyengine_us/parameters/gov/irs/income/amt/exemption/child/amount.yaml @@ -16,7 +16,7 @@ metadata: - title: 2021 IRS data release href: https://www.irs.gov/pub/irs-drop/rp-20-45.pdf#page=12 - title: 2020 IRS data release - href: https://www.irs.gov/pub/irs-drop/rp-19-45.pdf#page=12 + href: https://www.irs.gov/pub/irs-drop/rp-19-44.pdf#page=12 - title: 2019 IRS data release href: https://www.irs.gov/pub/irs-drop/rp-18-57.pdf#page=15 uprating: gov.irs.uprating diff --git a/policyengine_us/parameters/gov/simulation/aime_lookback_years.yaml b/policyengine_us/parameters/gov/simulation/aime_lookback_years.yaml index eb4b713c31a..f7768f6bc6c 100644 --- a/policyengine_us/parameters/gov/simulation/aime_lookback_years.yaml +++ b/policyengine_us/parameters/gov/simulation/aime_lookback_years.yaml @@ -7,4 +7,4 @@ metadata: label: AIME lookback years reference: - title: Social Security AIME calculation - href: https://www.ssa.gov/OACT/COLA/aime.html + href: https://www.ssa.gov/OACT/COLA/Benefits.html#aime diff --git a/policyengine_us/parameters/gov/ssa/social_security/aime/indexing_age.yaml b/policyengine_us/parameters/gov/ssa/social_security/aime/indexing_age.yaml index 74e851ff2e0..61d6a097340 100644 --- a/policyengine_us/parameters/gov/ssa/social_security/aime/indexing_age.yaml +++ b/policyengine_us/parameters/gov/ssa/social_security/aime/indexing_age.yaml @@ -9,6 +9,6 @@ metadata: - title: 42 U.S.C. § 415(b)(3)(A) href: https://www.law.cornell.edu/uscode/text/42/415#b_3_A - title: Social Security POMS RS 00605.020 - href: https://secure.ssa.gov/poms.nsf/lnx/0300605020 + href: https://secure.ssa.gov/poms.nsf/lnx/0300605018 - title: SSA AIME Calculation - href: https://www.ssa.gov/OACT/COLA/aime.html + href: https://www.ssa.gov/OACT/COLA/Benefits.html#aime diff --git a/policyengine_us/parameters/gov/states/ga/tax/income/credits/refundable.yaml b/policyengine_us/parameters/gov/states/ga/tax/income/credits/refundable.yaml index 936af2120a3..1f9d0ff3da5 100644 --- a/policyengine_us/parameters/gov/states/ga/tax/income/credits/refundable.yaml +++ b/policyengine_us/parameters/gov/states/ga/tax/income/credits/refundable.yaml @@ -11,4 +11,4 @@ metadata: label: Georgia refundable income tax credits reference: - title: Official Code of Georgia Annotated | O.C.G.A. § 48-7-20.2(b), (d) - href: https://law.justia.com/codes/georgia/2022/title-48/chapter-7/article-2/section-48-7-20-2/ + href: https://www.legis.ga.gov/api/legislation/document/20232024/217823 diff --git a/policyengine_us/parameters/gov/states/ga/tax/income/credits/surplus_tax_rebate/amount.yaml b/policyengine_us/parameters/gov/states/ga/tax/income/credits/surplus_tax_rebate/amount.yaml index f65d960ca05..58ca7a76918 100644 --- a/policyengine_us/parameters/gov/states/ga/tax/income/credits/surplus_tax_rebate/amount.yaml +++ b/policyengine_us/parameters/gov/states/ga/tax/income/credits/surplus_tax_rebate/amount.yaml @@ -8,7 +8,7 @@ metadata: label: Georgia surplus tax rebate amount reference: - title: Official Code of Georgia Annotated | O.C.G.A. § 48-7-20.2(b)(1)(B) - href: https://law.justia.com/codes/georgia/2022/title-48/chapter-7/article-2/section-48-7-20-2/ + href: https://www.legis.ga.gov/api/legislation/document/20232024/217823 - title: HB 162 (2023), one-time refund of 2021 income taxes href: https://www.legis.ga.gov/api/legislation/document/20232024/217823#page=2 diff --git a/policyengine_us/parameters/gov/states/in/fssa/ccdf/income/get_on_fpg_rate.yaml b/policyengine_us/parameters/gov/states/in/fssa/ccdf/income/get_on_fpg_rate.yaml index 0171a6af060..41ae02fa544 100644 --- a/policyengine_us/parameters/gov/states/in/fssa/ccdf/income/get_on_fpg_rate.yaml +++ b/policyengine_us/parameters/gov/states/in/fssa/ccdf/income/get_on_fpg_rate.yaml @@ -18,4 +18,4 @@ metadata: - title: Income to Get on CCDF href: https://www.in.gov/fssa/carefinder/files/Income-Get-on-CCDF.pdf - title: OECOSL bulletin, New CCDF Reimbursement Rates and Expanded Income Eligibility (127% to 150% FPL eff. Aug 1, 2023) - href: https://content.govdelivery.com/accounts/INOECOSL/bulletins/366774c + href: https://www.in.gov/fssa/carefinder/system-updates-2023 diff --git a/policyengine_us/parameters/gov/states/in/fssa/ccdf/income/stay_on_smi_rate.yaml b/policyengine_us/parameters/gov/states/in/fssa/ccdf/income/stay_on_smi_rate.yaml index 465274c5a8b..e3c68579087 100644 --- a/policyengine_us/parameters/gov/states/in/fssa/ccdf/income/stay_on_smi_rate.yaml +++ b/policyengine_us/parameters/gov/states/in/fssa/ccdf/income/stay_on_smi_rate.yaml @@ -12,4 +12,4 @@ metadata: - title: Income to Stay On CCDF href: https://www.in.gov/fssa/carefinder/files/Income-Stay-On-CCDF.pdf - title: OECOSL bulletin, New CCDF Reimbursement Rates and Expanded Income Eligibility (eff. Aug 1, 2023) - href: https://content.govdelivery.com/accounts/INOECOSL/bulletins/366774c + href: https://www.in.gov/fssa/carefinder/system-updates-2023 diff --git a/policyengine_us/parameters/gov/states/in/fssa/ccdf/rates/full_time.yaml b/policyengine_us/parameters/gov/states/in/fssa/ccdf/rates/full_time.yaml index 8c1cc8d39b3..08b3aad5e33 100644 --- a/policyengine_us/parameters/gov/states/in/fssa/ccdf/rates/full_time.yaml +++ b/policyengine_us/parameters/gov/states/in/fssa/ccdf/rates/full_time.yaml @@ -27,7 +27,7 @@ metadata: - title: OECOSL press release, Updated Child Care Voucher Rates (Sept. 4, 2025; percentage cuts by age group) href: https://www.in.gov/fssa/carefinder/files/Updated-Child-Care-Voucher-Rates-.pdf - title: OECOSL bulletin, CCDF reimbursement rate changes effective Oct. 5, 2025 - href: https://content.govdelivery.com/accounts/INOECOSL/bulletins/3f4db24 + href: https://www.in.gov/fssa/carefinder/files/ReimbursementRateFAQs.pdf LICENSED_CENTER: BASE: diff --git a/policyengine_us/parameters/gov/states/ms/tax/income/adjustments/plan_529_contributions/cap.yaml b/policyengine_us/parameters/gov/states/ms/tax/income/adjustments/plan_529_contributions/cap.yaml index 8d202c68b54..322d831dd9b 100644 --- a/policyengine_us/parameters/gov/states/ms/tax/income/adjustments/plan_529_contributions/cap.yaml +++ b/policyengine_us/parameters/gov/states/ms/tax/income/adjustments/plan_529_contributions/cap.yaml @@ -8,7 +8,7 @@ metadata: - filing_status reference: - title: Mississippi Code § 27-7-18(2) - href: https://law.justia.com/codes/mississippi/2022/title-27/chapter-7/article-1/section-27-7-18/ + href: https://billstatus.ls.state.ms.us/documents/2017/pdf/SB/2300-2399/SB2311SG.pdf#page=53 - title: Mississippi Income Tax Instructions 2025 href: https://www.dor.ms.gov/sites/default/files/tax-forms/individual/80100251%202.pdf#page=12 diff --git a/policyengine_us/parameters/gov/states/nd/tax/income/taxable_income/subtractions/plan_529_contributions/cap.yaml b/policyengine_us/parameters/gov/states/nd/tax/income/taxable_income/subtractions/plan_529_contributions/cap.yaml index 674b0de6450..d43bb304f31 100644 --- a/policyengine_us/parameters/gov/states/nd/tax/income/taxable_income/subtractions/plan_529_contributions/cap.yaml +++ b/policyengine_us/parameters/gov/states/nd/tax/income/taxable_income/subtractions/plan_529_contributions/cap.yaml @@ -8,7 +8,7 @@ metadata: - filing_status reference: - title: North Dakota Century Code § 57-38-30.3(2)(p) - href: https://law.justia.com/codes/north-dakota/2022/title-57/chapter-57-38/section-57-38-30-3/ + href: https://ndlegis.gov/cencode/t57c38.pdf#page=34 - title: 2025 North Dakota income tax instructions href: https://www.tax.nd.gov/sites/www/files/documents/forms/individual/2025-iit/2025-individual-income-tax-booklet.pdf#page=14 diff --git a/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/base.yaml b/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/base.yaml index 5617a6ee355..58770d0848e 100644 --- a/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/base.yaml +++ b/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/base.yaml @@ -7,7 +7,7 @@ metadata: label: PA base eligibility income reference: - title: PA PIT Guide - Chapter 20, Tax Forgiveness, page 15 - href: https://woodacctservices.com/publications/PA%20Income%20Tax%20Forgiveness%20Chart.pdf#page=15 + href: https://web.archive.org/web/20200927055656/https://woodacctservices.com/publications/PA%20Income%20Tax%20Forgiveness%20Chart.pdf#page=15 - title: PA Form PA-40 Instructions, page 39 href: https://www.revenue.pa.gov/FormsandPublications/FormsforIndividuals/PIT/Documents/2021/2021_pa-40in.pdf#page=39 - title: 2024 Pennsylvania Personal Income Tax Return Instructions (PA-40 IN), PA SCHEDULE SP (LINE 21), Section III diff --git a/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/dependent_rate.yaml b/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/dependent_rate.yaml index 304defcefa5..cac3d550872 100644 --- a/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/dependent_rate.yaml +++ b/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/dependent_rate.yaml @@ -7,7 +7,7 @@ metadata: label: PA tax forgiveness rate increase for each additional dependent reference: - title: PA PIT Guide - Chapter 20, Tax Forgiveness, page 15 - href: https://woodacctservices.com/publications/PA%20Income%20Tax%20Forgiveness%20Chart.pdf#page=15 + href: https://web.archive.org/web/20200927055656/https://woodacctservices.com/publications/PA%20Income%20Tax%20Forgiveness%20Chart.pdf#page=15 - title: PA Form PA-40 Instructions, page 39 href: https://www.revenue.pa.gov/FormsandPublications/FormsforIndividuals/PIT/Documents/2021/2021_pa-40in.pdf#page=39 - title: 2024 Pennsylvania Personal Income Tax Return Instructions (PA-40 IN), PA SCHEDULE SP (LINE 21), Section III diff --git a/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/eligibility_income_sources.yaml b/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/eligibility_income_sources.yaml index 48bc87465fc..af48c2f0952 100644 --- a/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/eligibility_income_sources.yaml +++ b/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/eligibility_income_sources.yaml @@ -18,6 +18,6 @@ metadata: label: PA eligibility income sources reference: - title: PA PIT Guide - Chapter 20, Tax Forgiveness, page 15 - href: https://woodacctservices.com/publications/PA%20Income%20Tax%20Forgiveness%20Chart.pdf#page15 + href: https://www.pa.gov/content/dam/copapwp-pagov/en/revenue/documents/formsandpublications/papersonalincometaxguide/documents/pitguide_taxforgiveness.pdf#page=5 - title: PA Form PA-40 Instructions, page 1 href: https://www.revenue.pa.gov/FormsandPublications/FormsforIndividuals/PIT/Documents/2021/2021_pa-40in.pdf#page=39 diff --git a/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/rate_increment.yaml b/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/rate_increment.yaml index e89f55d2ac9..378454652b2 100644 --- a/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/rate_increment.yaml +++ b/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/rate_increment.yaml @@ -7,7 +7,7 @@ metadata: label: PA tax forgiveness rate decrease for each additional increment of eligibility income reference: - title: PA PIT Guide - Chapter 20, Tax Forgiveness, page 15 - href: https://woodacctservices.com/publications/PA%20Income%20Tax%20Forgiveness%20Chart.pdf#page=15 + href: https://web.archive.org/web/20200927055656/https://woodacctservices.com/publications/PA%20Income%20Tax%20Forgiveness%20Chart.pdf#page=15 - title: PA Form PA-40 Instructions, page 39 href: https://www.revenue.pa.gov/FormsandPublications/FormsforIndividuals/PIT/Documents/2021/2021_pa-40in.pdf#page=39 - title: 2024 Pennsylvania Personal Income Tax Return Instructions (PA-40 IN), PA SCHEDULE SP (LINE 21), Section III diff --git a/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/tax_back.yaml b/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/tax_back.yaml index 8221d315b6d..e433c6ca40b 100644 --- a/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/tax_back.yaml +++ b/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/tax_back.yaml @@ -7,7 +7,7 @@ metadata: label: PA tax forgiveness percentage reference: - title: PA PIT Guide - Chapter 20, Tax Forgiveness, page 15 - href: https://woodacctservices.com/publications/PA%20Income%20Tax%20Forgiveness%20Chart.pdf#page=15 + href: https://web.archive.org/web/20200927055656/https://woodacctservices.com/publications/PA%20Income%20Tax%20Forgiveness%20Chart.pdf#page=15 - title: PA Form PA-40 Instructions, page 39 href: https://www.revenue.pa.gov/FormsandPublications/FormsforIndividuals/PIT/Documents/2021/2021_pa-40in.pdf#page=39 - title: 2024 Pennsylvania Personal Income Tax Return Instructions (PA-40 IN), PA SCHEDULE SP (LINE 21), Section III diff --git a/policyengine_us/parameters/gov/states/tx/dta/csfp/fpg_limit.yaml b/policyengine_us/parameters/gov/states/tx/dta/csfp/fpg_limit.yaml index a345eb1ab8d..34b3ce15476 100644 --- a/policyengine_us/parameters/gov/states/tx/dta/csfp/fpg_limit.yaml +++ b/policyengine_us/parameters/gov/states/tx/dta/csfp/fpg_limit.yaml @@ -7,4 +7,4 @@ metadata: label: Texas Commodity Supplemental Food Program FPG limit reference: - title: Texas Department of Agriculture Commodity Supplemental Food Program Income Eligibility Guidelines for the Elderly - href: https://squaremeals.org/Portals/8/FND%20Forms/Program%20Forms/H1666%202025%20Income%20Eligibility%20Guidelines%20for%20the%20Elderly_.pdf?ver=joHDl3vcgPiW3mdgaMM7vA%3d%3d + href: https://web.archive.org/web/20251104061444/https://squaremeals.org/Portals/8/FND%20Forms/Program%20Forms/H1666%202025%20Income%20Eligibility%20Guidelines%20for%20the%20Elderly_.pdf?ver=joHDl3vcgPiW3mdgaMM7vA%3d%3d diff --git a/policyengine_us/parameters/gov/usda/csfp/amount.yaml b/policyengine_us/parameters/gov/usda/csfp/amount.yaml index cae878a8bb1..eab0381d2cd 100644 --- a/policyengine_us/parameters/gov/usda/csfp/amount.yaml +++ b/policyengine_us/parameters/gov/usda/csfp/amount.yaml @@ -15,7 +15,7 @@ metadata: label: Commodity Supplemental Food Program amount reference: - title: Commodity Supplemental Food Program Fact Sheet (2019) - href: https://fns-prod.azureedge.us/sites/default/files/resource-files/csfp-program-fact-sheet-2019.pdf + href: https://web.archive.org/web/20230422132035/https://fns-prod.azureedge.us/sites/default/files/resource-files/csfp-program-fact-sheet-2019.pdf - title: CSFP Final Caseload Assignments for the 2020 Caseload Cycle href: https://www.fns.usda.gov/csfp/final-caseload-assignments-2020-caseload-cycle - title: CSFP Additional Caseload Assignments for the 2021 Caseload Cycle diff --git a/policyengine_us/parameters/gov/usda/csfp/fpg_limit.yaml b/policyengine_us/parameters/gov/usda/csfp/fpg_limit.yaml index 5dcf03df036..5a4e470c49f 100644 --- a/policyengine_us/parameters/gov/usda/csfp/fpg_limit.yaml +++ b/policyengine_us/parameters/gov/usda/csfp/fpg_limit.yaml @@ -10,4 +10,4 @@ metadata: - title: COMMODITY SUPPLEMENTAL FOOD PROGRAM | 247.9 Eligibility requirements href: https://www.ecfr.gov/current/title-7/part-247#p-247.9(b) - title: Commodity Supplemental Food Program (CSFP) | Revised Income Guidelines - href: https://fns-prod.azureedge.us/sites/default/files/resource-files/csfp-revised-incomeGuidelines2024.pdf + href: https://web.archive.org/web/20250202034640/https://fns-prod.azureedge.us/sites/default/files/resource-files/csfp-revised-incomeGuidelines2024.pdf diff --git a/policyengine_us/parameters/gov/usda/snap/emergency_allotment/in_effect.yaml b/policyengine_us/parameters/gov/usda/snap/emergency_allotment/in_effect.yaml index b56a5c0c273..075bb3698ce 100644 --- a/policyengine_us/parameters/gov/usda/snap/emergency_allotment/in_effect.yaml +++ b/policyengine_us/parameters/gov/usda/snap/emergency_allotment/in_effect.yaml @@ -130,7 +130,7 @@ metadata: propagate_metadata_to_children: true reference: - title: SNAP COVID-19 Emergency Allotments Guidance - href: https://www.fns.usda.gov/snap/covid-19-emergency-allotments-guidance + href: https://web.archive.org/web/20251117084030/https://www.fns.usda.gov/snap/covid-19-emergency-allotments-guidance - title: "SNAP Screener: SNAP Emergency Allotments & Maximum Benefit Amounts" href: https://www.snapscreener.com/blog/emergency-allotments unit: bool diff --git a/policyengine_us/parameters/gov/usda/snap/emergency_allotment/minimum.yaml b/policyengine_us/parameters/gov/usda/snap/emergency_allotment/minimum.yaml index 4e6563ad888..5c0699786cf 100644 --- a/policyengine_us/parameters/gov/usda/snap/emergency_allotment/minimum.yaml +++ b/policyengine_us/parameters/gov/usda/snap/emergency_allotment/minimum.yaml @@ -9,4 +9,4 @@ metadata: label: SNAP emergency allotment minimum reference: - title: "USDA: Supplemental Nutrition Assistance Program (SNAP) - Emergency Allotments" - href: https://fns-prod.azureedge.us/sites/default/files/resource-files/snap-covid-emergency-allotments-phase-3-guidance.pdf#page=3 + href: https://web.archive.org/web/20220519071036/https://fns-prod.azureedge.us/sites/default/files/resource-files/snap-covid-emergency-allotments-phase-3-guidance.pdf#page=3 diff --git a/policyengine_us/parameters/gov/usda/snap/income/deductions/excess_shelter_expense/homeless/available.yaml b/policyengine_us/parameters/gov/usda/snap/income/deductions/excess_shelter_expense/homeless/available.yaml index fcab3cd5221..78bf2ae3b92 100644 --- a/policyengine_us/parameters/gov/usda/snap/income/deductions/excess_shelter_expense/homeless/available.yaml +++ b/policyengine_us/parameters/gov/usda/snap/income/deductions/excess_shelter_expense/homeless/available.yaml @@ -207,4 +207,4 @@ metadata: - title: SNAP State Options Report, 14th Report (May 2018) href: https://www.fns.usda.gov/sites/default/files/snap/14-State-Options.pdf#page=19 - title: SNAP – Questions and Answers Related to Food and Nutrition Services Policy Memos Regarding Title IV Provisions of the Agriculture Improvement Act of 2018 - href: https://www.fns.usda.gov/snap/simplified-homeless-housing-cost-deduction-questions-and-answers + href: https://www.usda.gov/sites/default/files/guidance-documents/fns.snap-FarmBill2018Section4004.pdf#page=2 diff --git a/policyengine_us/parameters/gov/usda/snap/income/deductions/excess_shelter_expense/homeless/deduction.yaml b/policyengine_us/parameters/gov/usda/snap/income/deductions/excess_shelter_expense/homeless/deduction.yaml index 5a3a128a092..e9996194f95 100644 --- a/policyengine_us/parameters/gov/usda/snap/income/deductions/excess_shelter_expense/homeless/deduction.yaml +++ b/policyengine_us/parameters/gov/usda/snap/income/deductions/excess_shelter_expense/homeless/deduction.yaml @@ -34,7 +34,7 @@ metadata: - title: SNAP FY2022 Maximum Allotments and Deductions href: https://fns-prod.azureedge.us/sites/default/files/media/file/FY22-Maximum-Allotments-Deductions.pdf#page=2 - title: SNAP FY2023 Cost-of-Living Adjustments - href: https://fns-prod.azureedge.us/sites/default/files/resource-files/snap-fy-2023-cola-adjustments.pdf#page=5 + href: https://www.usda.gov/sites/default/files/guidance-documents/fns.snap-COLAMemoFY23_0.pdf#page=5 - title: SNAP FY2024 Cost-of-Living Adjustments href: https://www.fns.usda.gov/snap/fy-2024-cola - title: SNAP FY2025 Cost-of-Living Adjustments diff --git a/policyengine_us/tests/code_health/known_dead_reference_urls/federal.toml b/policyengine_us/tests/code_health/known_dead_reference_urls/federal.toml new file mode 100644 index 00000000000..fbf5d7aac47 --- /dev/null +++ b/policyengine_us/tests/code_health/known_dead_reference_urls/federal.toml @@ -0,0 +1,139 @@ +# Dead reference URLs retired in the federal batch of the 2026-09-30 audit. +# Each prefix failed a GET request (404/410, a soft 404, a dead host or a +# persistent server error) on the date given; see the PR for evidence. +# See test_known_dead_reference_urls.py for the format. + +[[dead]] +prefix = "https://content.govdelivery.com/accounts/INOECOSL/bulletins/366774c" +verified = "2026-10-01" +replacement = "https://www.in.gov/fssa/carefinder/system-updates-2023" + +[[dead]] +prefix = "https://content.govdelivery.com/accounts/INOECOSL/bulletins/3f4db24" +verified = "2026-10-01" +replacement = "https://www.in.gov/fssa/carefinder/files/ReimbursementRateFAQs.pdf" + +[[dead]] +prefix = "https://fns-prod.azureedge.us/sites/default/files/resource-files/csfp-program-fact-sheet-2019.pdf" +verified = "2026-10-01" +replacement = "https://web.archive.org/web/20230422132035/https://fns-prod.azureedge.us/sites/default/files/resource-files/csfp-program-fact-sheet-2019.pdf" + +[[dead]] +prefix = "https://fns-prod.azureedge.us/sites/default/files/resource-files/csfp-revised-incomeGuidelines2024.pdf" +verified = "2026-10-01" +replacement = "https://web.archive.org/web/20250202034640/https://fns-prod.azureedge.us/sites/default/files/resource-files/csfp-revised-incomeGuidelines2024.pdf" + +[[dead]] +prefix = "https://fns-prod.azureedge.us/sites/default/files/resource-files/snap-covid-emergency-allotments-phase-3-guidance.pdf" +verified = "2026-10-01" +replacement = "https://web.archive.org/web/20220519071036/https://fns-prod.azureedge.us/sites/default/files/resource-files/snap-covid-emergency-allotments-phase-3-guidance.pdf" + +[[dead]] +prefix = "https://fns-prod.azureedge.us/sites/default/files/resource-files/snap-fy-2023-cola-adjustments.pdf" +verified = "2026-10-01" +replacement = "https://www.usda.gov/sites/default/files/guidance-documents/fns.snap-COLAMemoFY23_0.pdf" + +[[dead]] +prefix = "https://law.justia.com/codes/georgia/2022/title-48/chapter-7/article-2/section-48-7-20-2/" +verified = "2026-10-01" +replacement = "https://www.legis.ga.gov/api/legislation/document/20232024/217823" + +[[dead]] +prefix = "https://law.justia.com/codes/mississippi/2022/title-27/chapter-7/article-1/section-27-7-18/" +verified = "2026-10-01" +replacement = "https://billstatus.ls.state.ms.us/documents/2017/pdf/SB/2300-2399/SB2311SG.pdf" + +[[dead]] +prefix = "https://law.justia.com/codes/north-dakota/2022/title-57/chapter-57-38/section-57-38-30-3/" +verified = "2026-10-01" +replacement = "https://ndlegis.gov/cencode/t57c38.pdf" + +[[dead]] +prefix = "https://secure.ssa.gov/poms.nsf/lnx/0300605020" +verified = "2026-10-01" +replacement = "https://secure.ssa.gov/poms.nsf/lnx/0300605018" + +[[dead]] +prefix = "https://squaremeals.org/Portals/8/FND%20Forms/Program%20Forms/H1666%202025%20Income%20Eligibility%20Guidelines%20for%20the%20Elderly_.pdf?ver=joHDl3vcgPiW3mdgaMM7vA%3d%3d" +verified = "2026-10-01" +replacement = "https://web.archive.org/web/20251104061444/https://squaremeals.org/Portals/8/FND%20Forms/Program%20Forms/H1666%202025%20Income%20Eligibility%20Guidelines%20for%20the%20Elderly_.pdf?ver=joHDl3vcgPiW3mdgaMM7vA%3d%3d" + +[[dead]] +prefix = "https://web.archive.org/web/20211129161302/https://www.kff.org/medicaid/state-indicator/total-medicaid-spending/?currentTimeframe=0&selectedRows=%7B%22states%22:%7B%22all%22:%7B%7D%7D%7D&sortModel=%7B%22colId%22:%22Location%22,%22sort%22:%22asc%22%7D" +verified = "2026-10-01" +replacement = "https://web.archive.org/web/20220810000951/https://www.kff.org/medicaid/state-indicator/total-medicaid-spending/?currentTimeframe=0&sortModel=%7B%22colId%22:%22Location%22,%22sort%22:%22asc%22%7D" + +[[dead]] +prefix = "https://woodacctservices.com/publications/PA%20Income%20Tax%20Forgiveness%20Chart.pdf" +verified = "2026-10-01" +replacement = "One of: https://web.archive.org/web/20200927055656/https://woodacctservices.com/publications/PA%20Income%20Tax%20Forgiveness%20Chart.pdf; https://www.pa.gov/content/dam/copapwp-pagov/en/revenue/documents/formsandpublications/papersonalincometaxguide/documents/pitguide_taxforgiveness.pdf" + +[[dead]] +prefix = "https://www.acct.org/files/Advocacy/Factsheets%20and%20Summaries/pell%20grant%20eligibility%20changes%20website.pdf" +verified = "2026-10-01" +replacement = "https://files.eric.ed.gov/fulltext/ED585399.pdf" + +[[dead]] +prefix = "https://www.atlantafed.org/-/media/documents/economic-mobility-and-resilience/advancing-careers-for-low-income-families/policy-rules-database/policy-rules-database-technical-manual.pdf" +verified = "2026-10-01" +replacement = "https://github.com/Research-Division/policy-rules-database/blob/a806195682b7515f01b5739343b91201293dddb4/PRD%20Technical%20Manual.pdf" + +[[dead]] +prefix = "https://www.cbo.gov/system/files/2026-02/51138-2026-02-Revenue-Projections.xlsx" +verified = "2026-10-01" +replacement = "https://www.cbo.gov/system/files/2026-02/51138-2026-02-Revenue.xlsx" + +[[dead]] +prefix = "https://www.ecfr.gov/current/title-45/subtitle-B/chapter-IV/part-400/subpart-D/section-400.47" +verified = "2026-10-01" +replacement = "https://www.ecfr.gov/current/title-45/subtitle-B/chapter-IV/part-400/subpart-E/section-400.53" + +[[dead]] +prefix = "https://www.fns.usda.gov/snap/covid-19-emergency-allotments-guidance" +verified = "2026-10-01" +replacement = "https://web.archive.org/web/20251117084030/https://www.fns.usda.gov/snap/covid-19-emergency-allotments-guidance" + +[[dead]] +prefix = "https://www.fns.usda.gov/snap/simplified-homeless-housing-cost-deduction-questions-and-answers" +verified = "2026-10-01" +replacement = "https://www.usda.gov/sites/default/files/guidance-documents/fns.snap-FarmBill2018Section4004.pdf" + +[[dead]] +prefix = "https://www.irs.gov/pub/irs-drop/rp-19-45.pdf" +verified = "2026-10-01" +replacement = "https://www.irs.gov/pub/irs-drop/rp-19-44.pdf" + +[[dead]] +prefix = "https://www.irs.gov/publications/p929" +verified = "2026-10-01" +replacement = "https://www.irs.gov/pub/irs-prior/p929--2021.pdf" + +[[dead]] +prefix = "https://www.medicaid.gov/medicaid/national-medicaid-chip-program-information/medicaid-childrens-health-insurance-program-basic-health-program-eligibility-levels/index.html" +verified = "2026-10-01" +replacement = "https://www.medicaid.gov/medicaid/national-medicaid-chip-program-information/medicaid-childrens-health-insurance-program-basic-health-program-eligibility-levels" + +[[dead]] +prefix = "https://www.medicare.gov/basics/costs/medicare-costs/part-a-costs" +verified = "2026-10-01" +replacement = "https://www.cms.gov/newsroom/fact-sheets/2026-medicare-parts-b-premiums-deductibles" + +[[dead]] +prefix = "https://www.medicare.gov/your-medicare-costs/part-b-costs" +verified = "2026-10-01" +replacement = "https://www.medicare.gov/basics/costs/medicare-costs" + +[[dead]] +prefix = "https://www.oecd.org/economy/growth/OECD-Note-EquivalenceScales.pdf" +verified = "2026-10-01" +replacement = "https://www.oecd.org/content/dam/oecd/en/data/datasets/income-and-wealth-distribution-databases/idd-tor-2012-onwards.pdf" + +[[dead]] +prefix = "https://www.snapscreener.com/blog/pennsylvania-snap-increase" +verified = "2026-10-01" +replacement = "http://services.dpw.state.pa.us/oimpolicymanuals/snap/512_Categorical_Eligibility/512_1_General_Policy.htm" + +[[dead]] +prefix = "https://www.ssa.gov/OACT/COLA/aime.html" +verified = "2026-10-01" +replacement = "https://www.ssa.gov/OACT/COLA/Benefits.html" diff --git a/policyengine_us/tests/code_health/test_known_dead_reference_urls.py b/policyengine_us/tests/code_health/test_known_dead_reference_urls.py index 3c64d39a0ef..79c2c4534a0 100644 --- a/policyengine_us/tests/code_health/test_known_dead_reference_urls.py +++ b/policyengine_us/tests/code_health/test_known_dead_reference_urls.py @@ -64,7 +64,9 @@ def parse_entries(name: str, text: str) -> list[tuple[str, str, str]]: prefix, verified, replacement = ( entry[key] for key in ("prefix", "verified", "replacement") ) - head = isinstance(prefix, str) and re.match(r"(https?://[^/\s]+)/\S*$", prefix) + head = isinstance(prefix, str) and re.fullmatch( + r"(https?://[^/\s]+)/\S*", prefix + ) if not head: raise ValueError(f"{name}: not an http(s) URL with a path: {prefix!r}") if not head.group(1).isascii() or head.group(1) != head.group(1).lower(): @@ -294,6 +296,9 @@ def test_fast_scan_matches_naive_scan_across_hosts(): GOOD_ENTRY + 'notes = "x"\n', GOOD_ENTRY.replace('"https://www.example.gov/a.pdf"', "5"), GOOD_ENTRY.replace("https://www.example.gov/a.pdf", "https://www.example.gov"), + GOOD_ENTRY.replace( + '"https://www.example.gov/a.pdf"', '"https://www.example.gov/a.pdf\\n"' + ), GOOD_ENTRY.replace("https://www.example.gov", "https://WWW.Example.gov"), GOOD_ENTRY.replace("2026-09-30", "2026-13-45"), GOOD_ENTRY.replace('"https://example.org/"', '" "'), diff --git a/policyengine_us/variables/gov/hhs/medicare/costs/medicare_cost.py b/policyengine_us/variables/gov/hhs/medicare/costs/medicare_cost.py index d331f2cb9d1..29da4f02627 100644 --- a/policyengine_us/variables/gov/hhs/medicare/costs/medicare_cost.py +++ b/policyengine_us/variables/gov/hhs/medicare/costs/medicare_cost.py @@ -12,7 +12,7 @@ class medicare_cost(Variable): ) unit = USD definition_period = YEAR - reference = "https://www.cms.gov/medicare" + reference = "https://www.cms.gov/about-cms/what-we-do/medicare" defined_for = "medicare_enrolled" def formula(person, period, parameters): diff --git a/policyengine_us/variables/gov/hhs/medicare/costs/medicare_enrolled.py b/policyengine_us/variables/gov/hhs/medicare/costs/medicare_enrolled.py index fb75e870616..8a120089937 100644 --- a/policyengine_us/variables/gov/hhs/medicare/costs/medicare_enrolled.py +++ b/policyengine_us/variables/gov/hhs/medicare/costs/medicare_enrolled.py @@ -7,6 +7,6 @@ class medicare_enrolled(Variable): label = "Medicare enrolled" documentation = "Whether the person is enrolled in Medicare (Part A and/or Part B)" definition_period = YEAR - reference = "https://www.cms.gov/medicare" + reference = "https://www.cms.gov/about-cms/what-we-do/medicare" defined_for = "is_medicare_eligible" adds = ["takes_up_medicare_if_eligible"] diff --git a/policyengine_us/variables/gov/hhs/medicare/costs/medicare_gross_cost.py b/policyengine_us/variables/gov/hhs/medicare/costs/medicare_gross_cost.py index 4df092079d5..48533e92fb4 100644 --- a/policyengine_us/variables/gov/hhs/medicare/costs/medicare_gross_cost.py +++ b/policyengine_us/variables/gov/hhs/medicare/costs/medicare_gross_cost.py @@ -12,7 +12,7 @@ class medicare_gross_cost(Variable): ) unit = USD definition_period = YEAR - reference = "https://www.cms.gov/medicare" + reference = "https://www.cms.gov/about-cms/what-we-do/medicare" defined_for = "medicare_enrolled" def formula(person, period, parameters): diff --git a/policyengine_us/variables/gov/hhs/medicare/eligibility/part_a/is_premium_free_part_a.py b/policyengine_us/variables/gov/hhs/medicare/eligibility/part_a/is_premium_free_part_a.py index c2b36d0389d..ecb781a6635 100644 --- a/policyengine_us/variables/gov/hhs/medicare/eligibility/part_a/is_premium_free_part_a.py +++ b/policyengine_us/variables/gov/hhs/medicare/eligibility/part_a/is_premium_free_part_a.py @@ -11,7 +11,7 @@ class is_premium_free_part_a(Variable): "Approximately 99% of Medicare beneficiaries qualify for premium-free Part A." ) definition_period = YEAR - reference = "https://www.medicare.gov/basics/costs/medicare-costs/part-a-costs" + reference = "https://www.cms.gov/newsroom/fact-sheets/2026-medicare-parts-b-premiums-deductibles" defined_for = "is_medicare_eligible" def formula(person, period, parameters): diff --git a/policyengine_us/variables/gov/hhs/medicare/eligibility/part_b/gross_medicare_part_b_premium.py b/policyengine_us/variables/gov/hhs/medicare/eligibility/part_b/gross_medicare_part_b_premium.py index f984d84e945..df2cd3bfe20 100644 --- a/policyengine_us/variables/gov/hhs/medicare/eligibility/part_b/gross_medicare_part_b_premium.py +++ b/policyengine_us/variables/gov/hhs/medicare/eligibility/part_b/gross_medicare_part_b_premium.py @@ -8,7 +8,7 @@ class gross_medicare_part_b_premium(Variable): unit = USD definition_period = YEAR defined_for = "is_medicare_eligible" - reference = "https://www.medicare.gov/your-medicare-costs/part-b-costs" + reference = "https://www.medicare.gov/basics/costs/medicare-costs#partB" documentation = "Annual Medicare Part B premium before Medicare Savings Program coverage, including any income-related monthly adjustment amount. Based on modified adjusted gross income from 2 years prior." def formula(person, period, parameters): diff --git a/policyengine_us/variables/gov/hhs/medicare/eligibility/part_b/gross_medicare_part_b_premium_if_enrolled.py b/policyengine_us/variables/gov/hhs/medicare/eligibility/part_b/gross_medicare_part_b_premium_if_enrolled.py index ba7a0e90d10..0dfc72bc864 100644 --- a/policyengine_us/variables/gov/hhs/medicare/eligibility/part_b/gross_medicare_part_b_premium_if_enrolled.py +++ b/policyengine_us/variables/gov/hhs/medicare/eligibility/part_b/gross_medicare_part_b_premium_if_enrolled.py @@ -8,7 +8,7 @@ class gross_medicare_part_b_premium_if_enrolled(Variable): unit = USD definition_period = YEAR defined_for = "medicare_enrolled" - reference = "https://www.medicare.gov/your-medicare-costs/part-b-costs" + reference = "https://www.medicare.gov/basics/costs/medicare-costs#partB" documentation = ( "Annual Medicare Part B premium for enrolled beneficiaries before " "Medicare Savings Program coverage, including any income-related " diff --git a/policyengine_us/variables/gov/hhs/medicare/eligibility/part_b/medicare_part_b_premium.py b/policyengine_us/variables/gov/hhs/medicare/eligibility/part_b/medicare_part_b_premium.py index 4eae71074ba..b6d75b0ed52 100644 --- a/policyengine_us/variables/gov/hhs/medicare/eligibility/part_b/medicare_part_b_premium.py +++ b/policyengine_us/variables/gov/hhs/medicare/eligibility/part_b/medicare_part_b_premium.py @@ -8,7 +8,7 @@ class medicare_part_b_premium(Variable): unit = USD definition_period = YEAR defined_for = "medicare_enrolled" - reference = "https://www.medicare.gov/your-medicare-costs/part-b-costs" + reference = "https://www.medicare.gov/basics/costs/medicare-costs#partB" documentation = "Annual Medicare Part B premium paid out of pocket by the enrollee, net of Medicare Savings Program coverage." def formula(person, period, parameters): diff --git a/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax/kiddie_tax/amt_kiddie_tax_applies.py b/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax/kiddie_tax/amt_kiddie_tax_applies.py index 10a0727b9a3..12764615823 100644 --- a/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax/kiddie_tax/amt_kiddie_tax_applies.py +++ b/policyengine_us/variables/gov/irs/tax/federal_income/alternative_minimum_tax/kiddie_tax/amt_kiddie_tax_applies.py @@ -9,7 +9,7 @@ class amt_kiddie_tax_applies(Variable): documentation = "Whether the kiddie tax applies to the tax unit" reference = [ "https://www.law.cornell.edu/uscode/text/26/1#g_2_A", - "https://www.irs.gov/publications/p929", + "https://www.irs.gov/pub/irs-prior/p929--2021.pdf", ] def formula(tax_unit, period, parameters): diff --git a/policyengine_us/variables/gov/ssa/social_security/ss_aime.py b/policyengine_us/variables/gov/ssa/social_security/ss_aime.py index 02d843eebf5..6578620d639 100644 --- a/policyengine_us/variables/gov/ssa/social_security/ss_aime.py +++ b/policyengine_us/variables/gov/ssa/social_security/ss_aime.py @@ -15,7 +15,7 @@ class ss_aime(Variable): ) unit = USD reference = ( - "https://www.ssa.gov/OACT/COLA/aime.html", + "https://www.ssa.gov/OACT/COLA/Benefits.html#aime", "https://www.law.cornell.edu/uscode/text/42/415#b", ) diff --git a/policyengine_us/variables/gov/states/ga/tax/income/credits/ga_surplus_tax_rebate.py b/policyengine_us/variables/gov/states/ga/tax/income/credits/ga_surplus_tax_rebate.py index f7c2acd7e99..be635f01bf5 100644 --- a/policyengine_us/variables/gov/states/ga/tax/income/credits/ga_surplus_tax_rebate.py +++ b/policyengine_us/variables/gov/states/ga/tax/income/credits/ga_surplus_tax_rebate.py @@ -8,7 +8,7 @@ class ga_surplus_tax_rebate(Variable): unit = USD definition_period = YEAR reference = ( - "https://law.justia.com/codes/georgia/2022/title-48/chapter-7/article-2/section-48-7-20-2/", + "https://www.legis.ga.gov/api/legislation/document/20232024/217823", "https://www.legis.ga.gov/api/legislation/document/20232024/217823#page=2", ) defined_for = StateCode.GA diff --git a/policyengine_us/variables/gov/states/ms/tax/income/adjustments/plan_529_contributions/ms_529_deduction.py b/policyengine_us/variables/gov/states/ms/tax/income/adjustments/plan_529_contributions/ms_529_deduction.py index 0fc3d8a349d..83e6f1caf2a 100644 --- a/policyengine_us/variables/gov/states/ms/tax/income/adjustments/plan_529_contributions/ms_529_deduction.py +++ b/policyengine_us/variables/gov/states/ms/tax/income/adjustments/plan_529_contributions/ms_529_deduction.py @@ -8,7 +8,7 @@ class ms_529_deduction(Variable): unit = USD definition_period = YEAR reference = ( - "https://law.justia.com/codes/mississippi/2022/title-27/chapter-7/article-1/section-27-7-18/", + "https://billstatus.ls.state.ms.us/documents/2017/pdf/SB/2300-2399/SB2311SG.pdf#page=53", "https://www.dor.ms.gov/sites/default/files/tax-forms/individual/80100251%202.pdf#page=12", ) defined_for = StateCode.MS diff --git a/policyengine_us/variables/gov/states/nd/tax/income/taxable_income/subtractions/plan_529_contributions/nd_529_deduction.py b/policyengine_us/variables/gov/states/nd/tax/income/taxable_income/subtractions/plan_529_contributions/nd_529_deduction.py index c08576609ba..52db7ec5421 100644 --- a/policyengine_us/variables/gov/states/nd/tax/income/taxable_income/subtractions/plan_529_contributions/nd_529_deduction.py +++ b/policyengine_us/variables/gov/states/nd/tax/income/taxable_income/subtractions/plan_529_contributions/nd_529_deduction.py @@ -8,7 +8,7 @@ class nd_529_deduction(Variable): unit = USD definition_period = YEAR reference = ( - "https://law.justia.com/codes/north-dakota/2022/title-57/chapter-57-38/section-57-38-30-3/", + "https://ndlegis.gov/cencode/t57c38.pdf#page=34", "https://www.tax.nd.gov/sites/www/files/documents/forms/individual/2025-iit/2025-individual-income-tax-booklet.pdf#page=14", ) defined_for = StateCode.ND diff --git a/policyengine_us/variables/gov/states/wa/dshs/rca/eligibility/wa_rca_eligible.py b/policyengine_us/variables/gov/states/wa/dshs/rca/eligibility/wa_rca_eligible.py index 331c3aace7e..f032ca508bd 100644 --- a/policyengine_us/variables/gov/states/wa/dshs/rca/eligibility/wa_rca_eligible.py +++ b/policyengine_us/variables/gov/states/wa/dshs/rca/eligibility/wa_rca_eligible.py @@ -10,7 +10,7 @@ class wa_rca_eligible(Variable): reference = ( "https://app.leg.wa.gov/wac/default.aspx?cite=388-400-0030", "https://app.leg.wa.gov/wac/default.aspx?cite=388-466-0120", - "https://www.ecfr.gov/current/title-45/subtitle-B/chapter-IV/part-400/subpart-D/section-400.47", + "https://www.ecfr.gov/current/title-45/subtitle-B/chapter-IV/part-400/subpart-E/section-400.53", "https://www.ecfr.gov/current/title-45/subtitle-B/chapter-IV/part-400/subpart-J/section-400.211", ) # Two WAC 388-400-0030 exclusions are not tracked at the moment: diff --git a/policyengine_us/variables/household/income/spm_unit/spm_unit_oecd_equiv_net_income'.py b/policyengine_us/variables/household/income/spm_unit/spm_unit_oecd_equiv_net_income'.py index 1384f741fb5..a6f62320d6c 100644 --- a/policyengine_us/variables/household/income/spm_unit/spm_unit_oecd_equiv_net_income'.py +++ b/policyengine_us/variables/household/income/spm_unit/spm_unit_oecd_equiv_net_income'.py @@ -8,7 +8,7 @@ class spm_unit_oecd_equiv_net_income(Variable): unit = USD documentation = "Equivalised net income for the SPM unit under the OECD method (divided by the sqare root of the number of persons in the household)" definition_period = YEAR - reference = "https://www.oecd.org/economy/growth/OECD-Note-EquivalenceScales.pdf" + reference = "https://www.oecd.org/content/dam/oecd/en/data/datasets/income-and-wealth-distribution-databases/idd-tor-2012-onwards.pdf#page=2" def formula(spm_unit, period, parameters): number_of_people = spm_unit.nb_persons() From a4e4e673356722d05d6d31bc601fe28c5e093d0c Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sat, 3 Oct 2026 14:32:59 -0400 Subject: [PATCH 2/3] Address review of the federal dead-URL batch - Drop the stray period after the ERIC URL in automatic_zero.yaml; the old href carried it too, and with it the link returns 404. - Point the four Pennsylvania tax forgiveness references at the live official PIT guide chapter (page 8 for the base and rate increment, page 9 for the dependent increment and tax-back percentages) instead of an archived third-party copy. Co-Authored-By: Claude Opus 5.5 --- .../parameters/gov/ed/pell_grant/efc/automatic_zero.yaml | 2 +- .../parameters/gov/states/pa/tax/income/forgiveness/base.yaml | 2 +- .../gov/states/pa/tax/income/forgiveness/dependent_rate.yaml | 2 +- .../gov/states/pa/tax/income/forgiveness/rate_increment.yaml | 2 +- .../gov/states/pa/tax/income/forgiveness/tax_back.yaml | 2 +- .../tests/code_health/known_dead_reference_urls/federal.toml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/policyengine_us/parameters/gov/ed/pell_grant/efc/automatic_zero.yaml b/policyengine_us/parameters/gov/ed/pell_grant/efc/automatic_zero.yaml index dff2eff18e2..a14ca0c4bfa 100644 --- a/policyengine_us/parameters/gov/ed/pell_grant/efc/automatic_zero.yaml +++ b/policyengine_us/parameters/gov/ed/pell_grant/efc/automatic_zero.yaml @@ -17,7 +17,7 @@ values: metadata: reference: - title: PELL GRANT ELIGIBILITY CHANGES - href: https://files.eric.ed.gov/fulltext/ED585399.pdf. + href: https://files.eric.ed.gov/fulltext/ED585399.pdf 2013-08-01: value: 24_000 metadata: diff --git a/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/base.yaml b/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/base.yaml index 58770d0848e..2d53e44ab89 100644 --- a/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/base.yaml +++ b/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/base.yaml @@ -7,7 +7,7 @@ metadata: label: PA base eligibility income reference: - title: PA PIT Guide - Chapter 20, Tax Forgiveness, page 15 - href: https://web.archive.org/web/20200927055656/https://woodacctservices.com/publications/PA%20Income%20Tax%20Forgiveness%20Chart.pdf#page=15 + href: https://www.pa.gov/content/dam/copapwp-pagov/en/revenue/documents/formsandpublications/papersonalincometaxguide/documents/pitguide_taxforgiveness.pdf#page=8 - title: PA Form PA-40 Instructions, page 39 href: https://www.revenue.pa.gov/FormsandPublications/FormsforIndividuals/PIT/Documents/2021/2021_pa-40in.pdf#page=39 - title: 2024 Pennsylvania Personal Income Tax Return Instructions (PA-40 IN), PA SCHEDULE SP (LINE 21), Section III diff --git a/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/dependent_rate.yaml b/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/dependent_rate.yaml index cac3d550872..09a22b1553f 100644 --- a/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/dependent_rate.yaml +++ b/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/dependent_rate.yaml @@ -7,7 +7,7 @@ metadata: label: PA tax forgiveness rate increase for each additional dependent reference: - title: PA PIT Guide - Chapter 20, Tax Forgiveness, page 15 - href: https://web.archive.org/web/20200927055656/https://woodacctservices.com/publications/PA%20Income%20Tax%20Forgiveness%20Chart.pdf#page=15 + href: https://www.pa.gov/content/dam/copapwp-pagov/en/revenue/documents/formsandpublications/papersonalincometaxguide/documents/pitguide_taxforgiveness.pdf#page=9 - title: PA Form PA-40 Instructions, page 39 href: https://www.revenue.pa.gov/FormsandPublications/FormsforIndividuals/PIT/Documents/2021/2021_pa-40in.pdf#page=39 - title: 2024 Pennsylvania Personal Income Tax Return Instructions (PA-40 IN), PA SCHEDULE SP (LINE 21), Section III diff --git a/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/rate_increment.yaml b/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/rate_increment.yaml index 378454652b2..b85dddf8946 100644 --- a/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/rate_increment.yaml +++ b/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/rate_increment.yaml @@ -7,7 +7,7 @@ metadata: label: PA tax forgiveness rate decrease for each additional increment of eligibility income reference: - title: PA PIT Guide - Chapter 20, Tax Forgiveness, page 15 - href: https://web.archive.org/web/20200927055656/https://woodacctservices.com/publications/PA%20Income%20Tax%20Forgiveness%20Chart.pdf#page=15 + href: https://www.pa.gov/content/dam/copapwp-pagov/en/revenue/documents/formsandpublications/papersonalincometaxguide/documents/pitguide_taxforgiveness.pdf#page=8 - title: PA Form PA-40 Instructions, page 39 href: https://www.revenue.pa.gov/FormsandPublications/FormsforIndividuals/PIT/Documents/2021/2021_pa-40in.pdf#page=39 - title: 2024 Pennsylvania Personal Income Tax Return Instructions (PA-40 IN), PA SCHEDULE SP (LINE 21), Section III diff --git a/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/tax_back.yaml b/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/tax_back.yaml index e433c6ca40b..de97ae1b8df 100644 --- a/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/tax_back.yaml +++ b/policyengine_us/parameters/gov/states/pa/tax/income/forgiveness/tax_back.yaml @@ -7,7 +7,7 @@ metadata: label: PA tax forgiveness percentage reference: - title: PA PIT Guide - Chapter 20, Tax Forgiveness, page 15 - href: https://web.archive.org/web/20200927055656/https://woodacctservices.com/publications/PA%20Income%20Tax%20Forgiveness%20Chart.pdf#page=15 + href: https://www.pa.gov/content/dam/copapwp-pagov/en/revenue/documents/formsandpublications/papersonalincometaxguide/documents/pitguide_taxforgiveness.pdf#page=9 - title: PA Form PA-40 Instructions, page 39 href: https://www.revenue.pa.gov/FormsandPublications/FormsforIndividuals/PIT/Documents/2021/2021_pa-40in.pdf#page=39 - title: 2024 Pennsylvania Personal Income Tax Return Instructions (PA-40 IN), PA SCHEDULE SP (LINE 21), Section III diff --git a/policyengine_us/tests/code_health/known_dead_reference_urls/federal.toml b/policyengine_us/tests/code_health/known_dead_reference_urls/federal.toml index fbf5d7aac47..9b057e6cc21 100644 --- a/policyengine_us/tests/code_health/known_dead_reference_urls/federal.toml +++ b/policyengine_us/tests/code_health/known_dead_reference_urls/federal.toml @@ -66,7 +66,7 @@ replacement = "https://web.archive.org/web/20220810000951/https://www.kff.org/me [[dead]] prefix = "https://woodacctservices.com/publications/PA%20Income%20Tax%20Forgiveness%20Chart.pdf" verified = "2026-10-01" -replacement = "One of: https://web.archive.org/web/20200927055656/https://woodacctservices.com/publications/PA%20Income%20Tax%20Forgiveness%20Chart.pdf; https://www.pa.gov/content/dam/copapwp-pagov/en/revenue/documents/formsandpublications/papersonalincometaxguide/documents/pitguide_taxforgiveness.pdf" +replacement = "https://www.pa.gov/content/dam/copapwp-pagov/en/revenue/documents/formsandpublications/papersonalincometaxguide/documents/pitguide_taxforgiveness.pdf" [[dead]] prefix = "https://www.acct.org/files/Advocacy/Factsheets%20and%20Summaries/pell%20grant%20eligibility%20changes%20website.pdf" From 490ef11e6623d43c59dc285810c4ab9ae85bcc37 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sat, 3 Oct 2026 16:48:27 -0400 Subject: [PATCH 3/3] Catch dead URLs split across Python string literals The guard scanned line by line, so a URL written as two adjacent string literals was invisible to it, and the line-based rewrite skipped it too. cbo_net_business_income.py still cited the dead CBO revenue workbook that way. Point it at the same replacement the federal list records, and make the guard also scan Python files with literals that end one line and continue the next joined back together. Co-Authored-By: Claude Opus 5.5 --- .../test_known_dead_reference_urls.py | 71 ++++++++++++++++++- .../gov/cbo/income/cbo_net_business_income.py | 5 +- 2 files changed, 71 insertions(+), 5 deletions(-) diff --git a/policyengine_us/tests/code_health/test_known_dead_reference_urls.py b/policyengine_us/tests/code_health/test_known_dead_reference_urls.py index 79c2c4534a0..ae4fae3d7cc 100644 --- a/policyengine_us/tests/code_health/test_known_dead_reference_urls.py +++ b/policyengine_us/tests/code_health/test_known_dead_reference_urls.py @@ -179,6 +179,41 @@ def find_dead_urls(text: str, by_host=None, order=None) -> list[tuple[int, str, return hits +def join_split_string_literals(text: str) -> str: + """Apply Python's implicit concatenation to string literals that end + one line and continue on the next, so a URL split across them reads + whole on the first line. Consumed lines become empty, which keeps every + later line number.""" + lines = text.split("\n") + target = None + for index, line in enumerate(lines): + stripped = line.strip() + if ( + target is not None + and stripped[:1] in {'"', "'"} + and lines[target].rstrip()[-1:] in {'"', "'"} + ): + lines[target] = lines[target].rstrip()[:-1] + stripped[1:] + lines[index] = "" + else: + target = index + return "\n".join(lines) + + +def find_dead_urls_in_file( + text: str, suffix: str, by_host=None, order=None +) -> list[tuple[int, str, str]]: + """`find_dead_urls`, plus, for Python, URLs split across literals.""" + hits = find_dead_urls(text, by_host, order) + if suffix == ".py": + hits += [ + hit + for hit in find_dead_urls(join_split_string_literals(text), by_host, order) + if hit not in hits + ] + return sorted(hits, key=lambda hit: hit[0]) + + def test_known_dead_url_entries_are_well_formed(): prefixes = [prefix for prefix, _, _ in KNOWN_DEAD_URL_PREFIXES] assert prefixes, "no entries loaded from " + str(DATA_DIR) @@ -279,6 +314,38 @@ def test_fast_scan_matches_naive_scan_across_hosts(): ), repr(text) +def test_urls_split_across_python_string_literals_are_flagged(): + _, by_host, order = build_index(SYNTHETIC_ENTRIES) + source = ( + "reference = (\n" + ' "https://www.tax.ny.gov/a/"\n' + ' "b.pdf#page=3",\n' + ' "https://www.tax.ny.gov/a/b.pdfx"\n' + ")\n" + ) + assert find_dead_urls(source, by_host, order) == [] + assert find_dead_urls_in_file(source, ".py", by_host, order) == [ + (2, "https://www.tax.ny.gov/a/b.pdf", "https://example.org/") + ] + # Other file types are scanned line by line only. + assert find_dead_urls_in_file(source, ".yaml", by_host, order) == [] + + +def test_joining_split_literals_keeps_line_numbers(): + source = 'x = (\n "a"\n "b"\n \'c\' \n\n "d"\n)\ny = "e"\n' + assert join_split_string_literals(source).split("\n") == [ + "x = (", + " \"abc'", + "", + "", + "", + ' "d"', + ")", + 'y = "e"', + "", + ] + + GOOD_ENTRY = ( '[[dead]]\nprefix = "https://www.example.gov/a.pdf"\n' 'verified = "2026-09-30"\nreplacement = "https://example.org/"\n' @@ -344,7 +411,9 @@ def test_package_and_docs_have_no_known_dead_reference_urls(): violations = [] for path in scanned_files(): text = path.read_text(encoding="utf-8", errors="replace") - for number, prefix, replacement in find_dead_urls(text): + for number, prefix, replacement in find_dead_urls_in_file( + text, path.suffix.lower() + ): violations.append( f"{path.relative_to(REPO.parent)}:{number} cites {prefix} " f"(dead); use {replacement}" diff --git a/policyengine_us/variables/gov/cbo/income/cbo_net_business_income.py b/policyengine_us/variables/gov/cbo/income/cbo_net_business_income.py index 1406b313396..0aeefeb0704 100644 --- a/policyengine_us/variables/gov/cbo/income/cbo_net_business_income.py +++ b/policyengine_us/variables/gov/cbo/income/cbo_net_business_income.py @@ -7,10 +7,7 @@ class cbo_net_business_income(Variable): label = "CBO net business income" unit = USD definition_period = YEAR - reference = ( - "https://www.cbo.gov/system/files/2026-02/" - "51138-2026-02-Revenue-Projections.xlsx" - ) + reference = "https://www.cbo.gov/system/files/2026-02/51138-2026-02-Revenue.xlsx" adds = [ "self_employment_income", "tax_unit_partnership_s_corp_income",