Repository navigation
Replace dead casetext.com references with live sources - #9627
Merged
Merged
Conversation
casetext.com shut down and every URL now returns HTTP 410 Gone. Repoint all 199 casetext hrefs (55 distinct sections across 23 jurisdictions) to live sources for the same sections: official legislature/code sites where they offer per-section pages, Justia where the state has no free official code site, and Cornell LII for state regulations without usable official deep links. Every replacement was verified to resolve and to show the named section. Also fix titles that misidentified the linked law (a regulation labelled as a statute, a wrong section or chapter number, a Casetext attribution), subsection pins verified wrong against the official text, and URL strings that Python fused into one because they lacked commas or sat in `documentation` instead of `reference`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
force-pushed
the
fix/replace-casetext-references
branch
from
September 25, 2026 17:43
5b6ad21 to
9e57652
Compare
- Oklahoma 710:50-15-49: cite Cornell LII's per-section page (the repo's convention for OAC) instead of the year-stamped Tax Commission PDF, whose page anchor would drift. - New York 112.2/112.3: the repaired links sat in bare dict() statements that were never assigned, so assign them to `reference`. - Oregon: name ORS 316.157 next to the chapter-page reference. - Colorado low-income CDCC note: provider and dependent identification rules are in 39-22-119.5(5)(a)-(c), not (3)(a)(V)-(VI). - Georgia: O.C.G.A. 48-7 is Chapter 7, so fix the "CH17 Income Taxes" label in every title that carries it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t-references Conflicts: main had already replaced the casetext links in md_ctc.py and md_ctc_eligible.py (kept main's versions) and added references to the Arkansas rate schedule (kept main's additions with this branch's Justia link for Ark. Code 26-51-201). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Merged on gates under Max's 2026-10-02 rule that obvious bug fixes merge without his approval, whatever they do to aggregates (cos card closed with "merge on gates").
|
This was referenced Oct 3, 2026
MaxGhenis
added a commit
that referenced
this pull request
Oct 6, 2026
A redirect-following GET of every casetext.com URL #9627 removed (46 statute, 9 regulation), four case pages, three index pages and four made-up paths returned HTTP 410 with the same shutdown notice; only the root redirects, to a Thomson Reuters product page. Update `verified` to that check. #9627's base had 197 casetext.com links (55 distinct URLs), not 199, by git grep. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
added a commit
that referenced
this pull request
Oct 6, 2026
* List casetext.com in the known-dead reference URL guard casetext.com shut down: statute, regulation and case pages return HTTP 410 Gone, and the home page redirects to a Thomson Reuters product page. #9627 replaced all 199 references; this entry keeps new ones out of the package and docs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Test that the casetext.com entry flags statute, regulation and case URLs The casetext.com entry is the guard's only whole-host prefix. Pin what it covers: a statute URL over http with www., a regulation URL and a case URL in a markdown link are each flagged once, and a Wayback copy of a casetext page is not. Without the entry the three flagged examples fail. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Record the 2026-10-06 casetext.com check and the verified link count A redirect-following GET of every casetext.com URL #9627 removed (46 statute, 9 regulation), four case pages, three index pages and four made-up paths returned HTTP 410 with the same shutdown notice; only the root redirects, to a Thomson Reuters product page. Update `verified` to that check. #9627's base had 197 casetext.com links (55 distinct URLs), not 199, by git grep. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Say #9627 removed the 197 casetext.com links, not replaced them #9627 deleted one duplicate North Dakota entry instead of replacing it, so "removed" is the accurate verb. The 197 links and 55 distinct URLs are the casetext.com URLs on the removed lines of #9627's diff. 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
casetext.com shut down: every casetext URL now returns HTTP 410 Gone. This PR removes all 199 casetext hrefs in
policyengine_us/(55 distinct casetext URLs, covering 53 sections across 23 jurisdictions). 198 now point to live sources for the same sections. The 199th was a duplicate, so it was deleted (see North Dakota below). After this PR,grep -rn casetext policyengine_usreturns nothing.Source choice, in order of preference:
Version-qualified casetext slugs map to matching editions where the source keeps them:
Some official sites keep no past editions (Maryland, Arizona, Arkansas on Justia's undated path). Their version-qualified slugs link to the current text, and every subsection the titles cite was checked against that text.
Verification
Every replacement was checked for liveness and for content: the page must show the named section, not just return HTTP 200. codes.ohio.gov, for example, answers a missing section with a 200 "number-not-found" page.
#page=Nindex (pdftotext), or the PDF#nameddest=target (pypdf). Maryland prints "§10–704" with an en dash, so dashes were normalized before matching.Other fixes in the touched references
Titles that misidentified the linked law:
oasdi/agi_limit: the title cited § 79-32,271 (a food-purchase credit). The Social Security subtraction is § 79-32,117(c)(xviii).t57c38.pdf#nameddest=57-38-30p3entry directly above it.Subsection pins checked against the official text and corrected:
amt/tentative_min_tax_ratefoster_youth/phase_out/start($25,000 threshold)max_two_income_subtractionaged/age,aged/amount($1,000 for a filer 65 or older)ctc/amount($500)cdcc/low_income/rate(25%)age_limitincome_thresholdphase_outURLs that Python fused into one string:
md_dependent_care_subtractionand bothms_itemized_deductions_*files lacked commas between tuple elements. These carry the same fix as Fix fused reference URLs repo-wide and correct Arkansas DFA page anchors #9609.al_retirement_exemption,al_retirement_exemption_eligible_person,co_low_income_cdccandco_low_income_cdcc_eligibleput comma-less URLs indocumentation. They now sit in a properreferencetuple; the modeling notes are kept as comments.ca_renter_creditkept its statute URL indocumentation; it is nowreference.ny_additionsandny_agi_subtractionsheld their link in a baredict(title=..., href=...)statement that was never assigned. It is nowreference = dict(...), so the link finally reaches the variable metadata.or_retirement_credit_household_incomenow names ORS 316.157 next to its chapter-page reference.co_low_income_cdcc_eligible: the modeling note moved out ofdocumentationcited (3)(a)(V)-(VI), which doesn't exist. Provider and dependent identification are in § 39-22-119.5(5)(a)-(c).Interaction with #9609
#9609 adds
tests/code_health/test_reference_urls.pyand fixes fused references repo-wide. It also adds commas on three lines this PR rewrites (the MD dependent-care and two MS itemized-deduction tuples). Whichever PR merges second gets a trivial conflict there: keep this PR's lines, which contain #9609's commas plus the new URL.On a trial merge of this branch with #9609, with those three conflicts resolved this way,
test_reference_urls.pypasses 16/16. A mutation check showed the test catches a fused URL planted in a parameter this PR edits. On this branch alone, the test's remaining failures are all fused references in files this PR does not touch; #9609 fixes them.policyengine_us/tests/code_healthpasses 45/45 on this branch.Review
Two independent Opus 5.5 reviewers (legal mapping, and code structure) approved with no blocking findings. Their nits are addressed in the second commit. They also found a Maryland title citing § 10-207(r) for a rule that lives in § 10-208(e); that section-level change is deferred to a follow-up, along with other pre-existing cross-section citation issues.
Mapping
axiom: n/a: reference metadata only
🤖 Generated with Claude Code