Repository navigation
Replace dead federal and miscellaneous reference URLs - #9764
Merged
Merged
Conversation
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 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9764 +/- ##
============================================
- Coverage 100.00% 55.75% -44.25%
============================================
Files 4 15 +11
Lines 76 278 +202
Branches 2 8 +6
============================================
+ Hits 76 155 +79
- Misses 0 123 +123
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:
|
- 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 <noreply@anthropic.com>
This was referenced Oct 3, 2026
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 <noreply@anthropic.com>
Contributor
Author
|
Merged by the US + core hub at head Gates:
|
MaxGhenis
added a commit
that referenced
this pull request
Oct 6, 2026
* Skip Quick Feedback coverage when the test scope is narrowed When a change maps to too many test targets, limit_test_paths narrows the run to the directly changed tests. run_tests still passed every changed .py file to coverage --include, so the uploaded report counted lines in those files that the narrowed tests never exercise. On the reference-only PRs #9764 and #9766 that sent codecov/project to 54% and 69% while codecov/patch was 100%. A narrowed run now skips coverage, like the existing path for changes with no Python source. Codecov then gets no partial report and posts no project status, matching PRs that Quick Feedback defers entirely. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Leave only the untested changed sources out of coverage Narrowing is one of two ways Quick Feedback drops a changed file's tests; deferring slow directories (gov/ssa, household, reform, ...) is the other, and it produced the same partial report. Replace the narrowed-scope flag with a per-file rule: a changed source is measured unless it maps to tests and none of them are in this run. Files with no mapped tests keep today's behaviour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Part of the repo-wide audit of dead reference URLs outside tax.ny.gov (follow-up to #9711 and #9730). This PR covers federal agencies and miscellaneous non-state hosts (IRS, SSA, CMS, Medicare, Medicaid, USDA FNS, CBO, KFF, Justia, campaign and nonprofit sites).
#page.parameters/,variables/anddocs/differs from the old line only inside URLs.policyengine_us/tests/code_health/known_dead_reference_urls/federal.tomllists 27 of the dead prefixes, so the offline guard from Replace dead NY tax department reference URLs #9711 fails if they return.How each URL was checked
curl -sL -A "Mozilla/5.0"on 2026-09-30, rechecked with a Chrome user agent. A 403, 429 or bot challenge counted as unknown, not dead, and was rechecked inside a real browser page; URLs still behind a bot wall were left unchanged. A 200 that landed on a home, search, login or not-found page counted as dead.pdftotexton the cited#pagefor PDFs). Disputed items went to an adjudicator under fixed rules: the agency's own site, then another official publisher, then a Wayback capture of the dead URL. Third-party mirrors (taxformfinder.org, NBER and the like) were not accepted for official citations.#pageexists in its PDF. A few replacements behind bot walls were confirmed in a browser instead.Changes
https://content.govdelivery.com/accounts/INOECOSL/bulletins/366774chttps://www.in.gov/fssa/carefinder/system-updates-2023https://content.govdelivery.com/accounts/INOECOSL/bulletins/3f4db24https://www.in.gov/fssa/carefinder/files/ReimbursementRateFAQs.pdfhttps://fns-prod.azureedge.us/sites/default/files/resource-files/csfp-program-fact-sheet-2019.pdfhttps://web.archive.org/web/20230422132035/https://fns-prod.azureedge.us/sites/default/files/resource-files/csfp-program-fact-sheet-2019.pdfhttps://fns-prod.azureedge.us/sites/default/files/resource-files/csfp-revised-incomeGuidelines2024.pdfhttps://web.archive.org/web/20250202034640/https://fns-prod.azureedge.us/sites/default/files/resource-files/csfp-revised-incomeGuidelines2024.pdfhttps://fns-prod.azureedge.us/sites/default/files/resource-files/snap-covid-emergency-allotments-phase-3-guidance.pdfhttps://web.archive.org/web/20220519071036/https://fns-prod.azureedge.us/sites/default/files/resource-files/snap-covid-emergency-allotments-phase-3-guidance.pdfhttps://fns-prod.azureedge.us/sites/default/files/resource-files/snap-fy-2023-cola-adjustments.pdfhttps://www.usda.gov/sites/default/files/guidance-documents/fns.snap-COLAMemoFY23_0.pdfhttps://kamalaharris.com/wp-content/uploads/2024/09/Policy_Book_Economic-Opportunity.pdfhttps://www.kamalaharris.com/wp-content/uploads/2024/09/Policy_Book_Economic-Opportunity.pdfhttps://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/217823https://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.pdfhttps://law.justia.com/codes/north-dakota/2022/title-57/chapter-57-38/section-57-38-30-3/https://ndlegis.gov/cencode/t57c38.pdfhttps://secure.ssa.gov/poms.nsf/lnx/0300605020https://secure.ssa.gov/poms.nsf/lnx/0300605018https://squaremeals.org/Portals/8/FND%20Forms/Program%20Forms/H1666%202025%20Income%20Eligibility%20Guidelines%20for%20the%20Elderly_.pdf?ver=joHDl3vcgPiW3mdgaMM7vA%3d%3dhttps://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%3dhttps://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%7Dhttps://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%7Dhttps://woodacctservices.com/publications/PA%20Income%20Tax%20Forgiveness%20Chart.pdfhttps://web.archive.org/web/20200927055656/https://woodacctservices.com/publications/PA%20Income%20Tax%20Forgiveness%20Chart.pdfhttps://www.pa.gov/content/dam/copapwp-pagov/en/revenue/documents/formsandpublications/papersonalincometaxguide/documents/pitguide_taxforgiveness.pdfhttps://www.acct.org/files/Advocacy/Factsheets%20and%20Summaries/pell%20grant%20eligibility%20changes%20website.pdfhttps://files.eric.ed.gov/fulltext/ED585399.pdfhttps://www.atlantafed.org/-/media/documents/economic-mobility-and-resilience/advancing-careers-for-low-income-families/policy-rules-database/policy-rules-database-technical-manual.pdfhttps://github.com/Research-Division/policy-rules-database/blob/a806195682b7515f01b5739343b91201293dddb4/PRD%20Technical%20Manual.pdfhttps://www.cbo.gov/system/files/2026-02/51138-2026-02-Revenue-Projections.xlsxhttps://www.cbo.gov/system/files/2026-02/51138-2026-02-Revenue.xlsxhttps://www.cms.gov/medicarehttps://www.cms.gov/about-cms/what-we-do/medicarehttps://www.ecfr.gov/current/title-45/subtitle-B/chapter-IV/part-400/subpart-D/section-400.47https://www.ecfr.gov/current/title-45/subtitle-B/chapter-IV/part-400/subpart-E/section-400.53https://www.fns.usda.gov/snap/covid-19-emergency-allotments-guidancehttps://web.archive.org/web/20251117084030/https://www.fns.usda.gov/snap/covid-19-emergency-allotments-guidancehttps://www.fns.usda.gov/snap/simplified-homeless-housing-cost-deduction-questions-and-answershttps://www.usda.gov/sites/default/files/guidance-documents/fns.snap-FarmBill2018Section4004.pdfhttps://www.irs.gov/pub/irs-drop/rp-19-45.pdfhttps://www.irs.gov/pub/irs-drop/rp-19-44.pdfhttps://www.irs.gov/publications/p929https://www.irs.gov/pub/irs-prior/p929--2021.pdfhttps://www.medicaid.gov/medicaid/national-medicaid-chip-program-information/medicaid-childrens-health-insurance-program-basic-health-program-eligibility-levels/index.htmlhttps://www.medicaid.gov/medicaid/national-medicaid-chip-program-information/medicaid-childrens-health-insurance-program-basic-health-program-eligibility-levelshttps://www.medicare.gov/basics/costs/medicare-costs/part-a-costshttps://www.cms.gov/newsroom/fact-sheets/2026-medicare-parts-b-premiums-deductibleshttps://www.medicare.gov/your-medicare-costs/part-b-costshttps://www.medicare.gov/basics/costs/medicare-costshttps://www.oecd.org/economy/growth/OECD-Note-EquivalenceScales.pdfhttps://www.oecd.org/content/dam/oecd/en/data/datasets/income-and-wealth-distribution-databases/idd-tor-2012-onwards.pdfhttps://www.snapscreener.com/blog/pennsylvania-snap-increasehttp://services.dpw.state.pa.us/oimpolicymanuals/snap/512_Categorical_Eligibility/512_1_General_Policy.htmhttps://www.ssa.gov/OACT/COLA/aime.htmlhttps://www.ssa.gov/OACT/COLA/Benefits.htmlLeft unchanged
These URLs are not changed here; each needs more than a URL swap or turned out not to be dead.
https://cms7files1.revize.com/starkcountyoh/Document_center/Offices/Auditor/Services/Homestead%20Exemption/Ohio_Adj_Gross_Income.pdf: unresolved (No copy of the original found, so its contents (and whether any successor is the same document) cannot be verified. Tried: (1) Wayback CDX for the exact URL (0 )https://law.justia.com/codes/mississippi/title-27/chapter-35/general-provisions/section-27-35-4/: unresolved (Best candidate: https://law.justia.com/codes/mississippi/title-27/chapter-35/article-1/section-27-35-4/ . Justia now uses 'article-1' where the dead URL has 'ge)https://www.cbo.gov/system/files/2026-02/: adjudicated unresolved: Not a standalone URL: line 11 of cbo_net_business_income.py is the first half of a concatenated literal. Manual edit: merge lines 11-12 into one literal https://www.cbo.gov/system/files/2026-02/51138-https://www.cbo.gov/system/files/2026-02/51313-2026-02-ssi.xlsx: not-dead (The URL is live and is linked as 'Feb 2026' under Supplemental Security Income on https://www.cbo.gov/data/baseline-projections-selected-programs (checked in th)https://www.fns.usda.gov/sites/default/files/resource-files/2024-09-30-SUA-Table-FY25-508-Update.xlsx: unresolved (FNS is now the Food and Nutrition Administration (www.fna.usda.gov); its SUA page (https://www.fna.usda.gov/snap/eligibility/deduction/standard-utility-allowanc)https://www.kff.org/interactive/subsidy-calculator-202?/: not-dead (All four occurrences are comments under a live href (https://www.kff.org/interactive/subsidy-calculator/). The prior-year calculators the comment points to are )https://www.medicaid.gov/federal-policy-guidance/downloads/: not-dead (The URL actually cited is https://www.medicaid.gov/federal-policy-guidance/downloads/cib12082025.pdf#page=6, and it is live. The PDF is the CMCS Informational B)https://www.snapscreener.com/blog/emergency-allotments: unresolved (Tried: (1) SNAP Screener successor: the post is gone and nothing on the site's sitemap covers emergency allotments; (3) Wayback: CDX returns 403 for snapscreene)Not listed in the guard
https://kamalaharris.com/wp-content/uploads/2024/09/Policy_Book_Economic-Opportunity.pdf: replacement differs only in scheme or www., which the guard treats as the same URL.https://www.cms.gov/medicare: still matches repo text after the rewrite (policyengine_us/variables/gov/hhs/medicare/eligibility/is_medicare_eligible.py: https://www.cms.gov/medicare).Changes after review
An independent review (GPT-6.1 Sol) requested changes; this push addresses both blockers:
base,rate_increment,dependent_rateandtax_backnow cite the live official PIT guide chapter on pa.gov (page 8 shows the $6,500 table; page 9 shows the $9,500 per-dependent increment) instead of an archived third-party copy. Their reference titles still name the old page numbers.Not changed, with reasons:
blobview at a pinned commit in the Atlanta Fed's ownResearch-Divisionrepository. The raw URL downloads the file where the blob view displays it; neither honours#page=57.selectedRowsparameter, so the replacement is a capture of the same KFF table without that parameter. This is the one exception to the same-URL archive rule.available.yamlswitches states on October 1. That is a policy question about the parameter, not the link, and is left for a separate look.Split string literals (commit 490ef11)
A scan of every Python string constant with the literals joined found one federal dead URL that the line-based rewrite and guard both missed.
cbo_net_business_income.pywrote the dead CBO workbook as two adjacent literals ("https://www.cbo.gov/system/files/2026-02/"+"51138-2026-02-Revenue-Projections.xlsx"). It now cites the replacement the federal list already records (51138-2026-02-Revenue.xlsx). Ruff collapses the now-single literal onto the assignment line; the AST is otherwise unchanged.The guard now also scans each
.pyfile with string literals that end one line and continue on the next joined back together, keeping line numbers. Before this commit the old file scanned clean; with the join it reports line 11. Two new tests cover the join and the line numbering. The guard file has 35 passed locally.Verification
pytest policyengine_us/tests/code_health/test_known_dead_reference_urls.pypasses locally, including the new entries.ruff format --check .(locked ruff 0.15.5) passes.axiom: n/a: reference-only
🤖 Generated with Claude Code