Repository navigation
List casetext.com in the known-dead reference URL guard - #9768
Merged
Merged
Conversation
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>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
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>
Contributor
Author
|
Merged by the US + core hub on its merge gates. Audit:
|
MaxGhenis
added a commit
that referenced
this pull request
Oct 6, 2026
Brings in #9841 (28 percent rate gain and unrecaptured section 1250 gain netted against losses), #9801, #9790, #9779, #9768, #9741 and #9630. Only test_section_911_tax_stacking.py changed on both sides, in different functions, and git merged it without conflict. #9841 passes Schedule D lines 18 and 19 entered already netted through unchanged, and this branch's capital_gains_tax, reforms and tests read the section 911 amounts and Schedule D inputs that #9841 keeps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 6, 2026
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
Adds
casetext.comto the known-dead reference URL guard (policyengine_us/tests/code_health/known_dead_reference_urls/casetext_com.toml), so the offline code-health test fails if a casetext link reappears in the package ordocs/. #9627 removed every casetext link: 197 links to 55 distinct URLs, counted on the removed lines of its diff.mainhas none.The prefix is the whole host,
https://casetext.com/; the guard also matches it overhttp://, withwww., and in any letter case. On 2026-10-06, 70 casetext URLs returned HTTP 410 Gone with a "This service is no longer available" notice. They were every casetext URL tried except the root:www.variantsThe root redirects to a Thomson Reuters product page with no legal text. The evidence is below.
The entry's replacement text points to the sources #9627 used: the official legislature or code site, then law.justia.com, then Cornell LII for state regulations.
Changes in the 2026-10-06 fix round
This round answers an independent agent review that returned REQUEST_CHANGES; the review was not posted on GitHub. It confirmed 410 for a statute page and a case page, but its regulation requests returned access errors, a browser-UA
curl -Lfailed DNS, and its full package and docs scan did not finish.test_dead_urls_are_flaggedgains a statute URL overhttp://www., a regulation URL and a case URL inside a markdown link.test_archived_and_live_urls_are_not_flaggedgains a Wayback copy of a casetext case page.verifiedmoves to 2026-10-06, the date of the check below. The comment now quotes the 410 notice's opening words and corrects the count to 197 links (55 distinct URLs). The earlier body of this PR and Replace dead casetext.com references with live sources #9627's body said 199.main(3bed4d0) without conflicts. The branch still changes only the changelog fragment, the TOML file and the test file.Evidence
Run 2026-10-06 03:09–03:15 UTC with
/usr/bin/curl, the only curl on PATH. The run did not log the curl version;curl --versionreported 8.7.1 afterwards, and the binary is dated before the run. Each URL got oneGET -L --max-redirs 10with curl's default user agent and one with a desktop Safari user agent: 146 requests, every curl exit code 0. The URLs are:http://andhttps://www.variants of one statute and one regulation URL/statute,/regulation,/case)http://varianthttps://www.varianthttps://,http://)www.thomsonreuters.com/en/cocounselhttps://www.)www.thomsonreuters.com/en/cocounselAll 140 responses that ended in 410 have the same 640-byte body (one distinct MD5):
The made-up paths get the same response. So the 410 is a catch-all shutdown response for every non-root path tried, not a removal of individual pages. For example, the N.J.A.C. 18:35-2.9 regulation page returned
HTTP/2 410withcontent-length: 640andserver: cloudflare, and no redirect.The artifacts are saved on the hub host under
~/reviews/us-hub/fixes/9768-evidence/:probe.sh: the exact scripturl_list.tsv: its inputrun/results.tsv: one row per request, with final status, redirect count and final URLrun/hops/: every hop's status line and headersrun/bodies/: every final response bodySUMMARY.md: a row for each regulation, case, index, variant, root and control requestcurl_version.txt: the curl version, recorded after the runTests
These ran locally on Python 3.13.9 with pytest 9.1.1, one process at a time.
casetext_com.tomlremoved, as onmain,pytest test_known_dead_reference_urls.py -k casetextgives 3 failed and 1 passed (exit 1). The statute, regulation and case examples fail; the Wayback example passes.scanned_files()andfind_dead_urls_in_file(). It loads 362 entries across 119 hosts and scans 17,975 files underpolicyengine_us/anddocs/: 6,567.py, 11,065.yaml, 3.yml, 293.mdand 47.ipynb. That is every tracked file with a scanned suffix except the guard's own test file. It finds 0 known-dead URLs, so 0 casetext ones.docs/markdown file and a regulation URL split across two Python string literals in a.pyfile. With them in place,test_package_and_docs_have_no_known_dead_reference_urlsfails (exit 1). The failure names both files and lines and gives the entry's replacement text. The files were removed afterwards.ruff format --checkandruff checkpass on the test file, and the TOML parses.Impact
No model output change. The PR touches a TOML file that only
test_known_dead_reference_urls.pyreads, that test file and a changelog fragment. Searching forknown_dead_reference_urlsfinds no other reader. No variable, parameter or formula changes, so household and microsimulation outputs are unchanged, and no microsimulation was run.axiom: n/a: test data only (code-health guard; no policy provision changes)
🤖 Generated with Claude Code