Repository navigation
Conversation
Add the row and citation types, schema validation, the capture-hash check for every cited source, and the lookup by family and income year or date. The lookup refuses with a typed error in a gap, and an overlap must be a named alternative. Invented-row tests cover the schema and the refusals, with Hypothesis properties and a differential rounding oracle. Built by a Subfleet build lane; committed by the orchestrating session. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pin 135 public captures (statutes, Statutes at Large, CFR, POMS and IRS publications) with their URLs, retrieval times, sizes and SHA-256, and assemble 90 coverage rules across 49 families and 20 threshold series. Fourteen rows refuse unsettled historical questions, and every rare exclusion carries both readings with no negligible candidate chosen. Conformance tests check the cited hashes and passages, every family and year coordinate, and five published worked examples. This is partial: the open questions in the registry list what remains. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The coverage rules are opt-in, and nothing in the historical projection imports them. List the two new source files as post-review exclusions in the birth-evidence script and its expected tuple, and assert that neither module is reachable from the birth-evidence reducer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
A Codex build lane did this work in a workspace that cannot commit. Its eight steps edit the same fragment files, so they land together. 1. Move the registry out of the pinned-bytes path. The registry, its fragment files and assemble_registry.py move to data/external/income_resources_ce1/, where review diffs show them (.gitattributes marks data/external/snapshots/** binary). Captures and manifests stay put. The loader and tests take separate registry and capture roots, with an invented-capture test of that. 2. Remove the duplicate capture of 97 Stat. 65. statute_97_pg65.pdf and govinfo_statute97_pg65.pdf were byte-identical; the first goes, and every citation, manifest and inventory entry points to the second, keeping both retrieval events. 3. Pin SSA's coverage-threshold table from the Internet Archive's copy (snapshot 20261013081352), since SSA refused the direct request. Its domestic-employee and election-worker values for 1994-2026 agree with the registry's IRS-derived values. Its pre-1994 footnote, $50 per quarter for domestic employees, agrees with the registry's 1968-1993 threshold and the statute. The original SOURCE_BLOCKED record is kept, with its archived resolution. 4. Extend the prevalence search records for rare exclusions and for 26 U.S.C. 1402(e) exemptions. No search found a cited, pinned bound for a whole target population, so every strict reading stays unresolved, every negligible_candidate stays null, and neither reading is chosen. 5. Settle historical coverage questions where a primary source does. Ten of the fourteen open questions close, and four stay open with their searches. Conflicting guidance stays as named options. 6. Add self-employment modifiers and earnings-test history: 18 rules in nine families (rentals, specified passive income, Puerto Rico, territorial residency, sections 911 and 931, treaty fishing, health insurance, partner death), the original pre-1978 subparagraph (D) and the section 416(l) retirement-age schedule. The earnings-test concept accessor still refuses every year whose dependencies are unverified. 7. Pin past editions of the Code sections the histories rely on, as official section granules where they exist, and label what each edition establishes. Editions that could not be found are recorded, not inferred. 8. Add nine published worked examples, from IRS Publications 15, 51, 517 and 926, POMS and the State and Local Coverage Handbook, each a separately collected conformance test against the lookup that cites its passage. The registry now holds 114 rules in 58 families, 21 threshold series, 5 table definitions, 18 published examples and 9 open questions. Every rule is still awaiting_ce2. Invariants: those of the original CE1 assignment, each with its Hypothesis property, now sampling the larger registry. New properties cover the archived table's values, the 1968-1993 quarterly threshold, the 1985-2026 fishing per-trip bound, the earnings-test accessor's refusal of unverified years, and a stale generated registry against its fragments. Captures: the snapshot folder grows from 171.0 MB to 219.0 MB. New captures are section HTML or XML where one exists. Two whole-issue PDFs were needed for text no smaller official form held: the 1975 Federal Register issue (29.4 MB) and the 1965 act (24.8 MB). Verification: the four prescribed test files pass (83 tests), and black, ruff and git diff --check pass. I checked that the duplicate PDF and the archived table match their recorded hashes. The build lane reports that all 336 manifest records verify and that the registry was byte-identical after the step 1 move. Co-Authored-By: Codex <noreply@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The capture folder held five whole-act or whole-issue PDFs, 125.6 MB in all, for a few cited pages each. Each is now a page-range extract made with qpdf --deterministic-id --empty --pages from the hashed original: - Pub. L. 92-603 (86 Stat. 1329): 31.3 MB, 165 pages -> 1.90 MB, 10 pages - Pub. L. 90-248 (81 Stat. 821): 21.0 MB, 115 pages -> 0.98 MB, 5 pages - Pub. L. 98-21 (97 Stat. 65): 19.0 MB, 108 pages -> 3.45 MB, 20 pages - Pub. L. 89-97 (79 Stat. 286): 24.8 MB, 138 pages -> 0.76 MB, 4 pages - Federal Register, 10 July 1975: 29.4 MB, 172 pages -> 0.63 MB, 3 pages Each act keeps its first page, every page of each cited section from its heading to the next section's heading, and the page with its approval date. The Federal Register keeps its cover and the two pages holding FR Doc. 75-17887 from its heading to its filing line. Every kept page's pdftotext output equals the same page of the original, and the two pinned text derivatives regenerate byte for byte from the extracts. The inventory and manifests record each original's file, size, SHA-256, page count and the commit that holds it; citations that named an original PDF page now name the extract page too. Also removed, because nothing cites them and no manifest lists them: IRS Publication 17 for 1999-2007 (20.4 MB; their inventory rows keep URL, size and SHA-256 with status not_retained), the three whole-act text renderings of the originals, and 31 other unlisted text renderings. The capture folder goes from 219.0 MB and 261 files to 78.1 MB and 218. Two new conformance tests: every capture file has a manifest entry whose size and SHA-256 match, and every entry names a file; each extract records its original, and each derivative of an extract names the extract's current hash. Corrupting an extract, adding an unlisted file, restoring an original or changing a derivative's source hash makes them fail. The originals stay in this branch's history, so this PR should land by squash. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both branches extend the birth-evidence check's post-review exclusions and its reachability test. The resolution keeps master's SM1 and D1a lines, then CE1's coverage-rule lines and reachability block. The CE1 modules' tests and the birth-evidence tests give 80 passed. One fails in this sparse clone only: test_post_review_exclusions_are_unreachable_from_birth_evidence's Track U assertion needs two files the clone leaves out. CI runs it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The round-1 review (an Opus 5.5 reviewer, at 39b5220) asked for revision. A GPT-6.1 Sol build lane made these changes; the lane could not write the git index, so this commit records its working tree. High: - H1: tribal-council service now defaults to noncovered, with coverage under a section 418a agreement as a case (42 U.S.C. 410(a)(22)). The Act's pinpoint runs through 132 Stat. 2896. - H2: conservation reserve payments before 2008 are an open row that refuses, and defers to the base definition and rental rules. Schema (M7, M12): coverage_rules.ce1.v2. A case has trigger facts and a consequence from the enum, and each row states its residual default, which equals its top-level consequence. Lookup returns a row's cases for CE3 to evaluate. An open legal row names its alternatives, has a null consequence and no chosen reading, and refuses lookup; overlapping named alternatives need an explicit selection. The 17 case-bearing rows and the nine open rows were migrated across the four rule fragments. Rows against sources: - M1: the community-income procedure is open through 2004-03-01; the verified successor starts 2004-03-02. - M2: agricultural pay separates commodities from cash equivalents from 1995-08-07 (POMS RS 01402.020, pinned; SSR 95-3P refused the request). - M3: both federal regimes carry the legislative-branch case (P.L. 98-21 section 101(a)(1), 97 Stat. 68). - M4: the early fishing row holds no later-law parameters or chosen reading. P.L. 104-188 section 1116(a)(3) applies the amendments to 1985-1994 unless the payor treated the pay as FICA-taxable when paid; the row follows the Act. - M5: the irrevocable 1968 fee-office election is a noncovered case (P.L. 90-248 section 122(c)(2)). - M6: unsupported attributable-deduction parameters are gone; those passive-income periods are open, with named alternatives. Thresholds (M8): the four quarterly scopes and the monthly tips scope aggregate within one employer-employee relationship, the module documents each scope, and the test's wrong scope assertion is replaced. Tests (M9-M11): assemble_registry.build() is exposed and the tests compare its whole output byte for byte, open_questions included. The published-example tests compute each example's outcome from its inputs, the path test uses real escapes, and the strict-reading and quarter nondecrease guards are each tested. Low findings 1-27 and the notes: taxable-year starts on the options and passive boundaries, with lookup_date for fiscal years; corrected pinpoints, page ranges and labels for later-edition evidence; repaired fused prose; full citations required wherever a capture is named, table definitions included; unsupported monotone flags removed from 13 constant series; the government fact-extension fragment removed and government RET history required; pdftotext flags corrected, with both derivatives regenerated byte for byte; one retention rule for every capture, which removes the 29 uncited captures; signature notices on the five extracts; year bases on the five reconstructed examples; caller errors as TypeError or ValueError; scripts and styles stripped from source text. New captures: 26 U.S.C. 761, the 1996 CFR 404.1082 and 5 U.S.C. 8331's effective-date notes, each in the round-1 manifests. Low 28, corrections to earlier messages, without rewriting history: 1be4b75 added 13 worked examples (5 to 18); the nine Pub 17 PDFs were in the manifest, and were removed as redundant and uncited. The registry now has 115 rows in 58 families, 21 threshold series, 22 rows with cases, 14 open legal rows, four rows whose residual is open with three cases each (clergy and material participation), 17 worked examples and 14 open questions. Checks: - The three CE1 test modules through the wrapper: 110 passed. The one failure is the birth-evidence reachability test's track-U assertion, which needs modules this sparse clone leaves out; CI runs it. - Tiers over the two CE1 modules: unit 56 (+27), artifact 42 (+3). - The build lane reports that removing each guarded clause fails a test (the employer FICA exclusion, the path-escape guard, open_questions in generation, the strict reading and quarter nondecrease); the round-2 review reruns these. - black -l 79, ruff and git diff --check are clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cases now carry a row-unique case_id and an integer precedence that runs exactly 1..n; the matching case with the smallest value decides and the residual applies only when none matches. CoverageRule.resolve applies the rule, and an optional overrides list names the cases a case displaces by statute (the loader checks each ranks below it and changes the consequence). Ranking was chosen over mutual exclusion because the statutes are exclusions with exceptions and exceptions to those exceptions; exclusive free-text cases would repeat every negation in text no loader can check. Schema moves to coverage_rules.ce1.v3. The federal 1984-1986 and 1987-2026 rows follow 42 U.S.C. 410(a)(5)-(6): the 409(h) retired-judge payment exclusion and the (a)(6) exclusions first, then the (C)-(F) official-position exceptions, the 1988 carry- forward (Pub. L. 100-647 section 8015(c)(3)) and the (H) FERS/FSPS election, an open FEPCA waiver case, the Pub. L. 98-369 section 2601(d) requalification, the (G)(i)-(iii) legislative-branch exceptions, and only then the (B)(i) grandfather and (B)(ii) annuitant exclusions. The prose overrides fers_election, legislative_branch, persistent_exclusions and retired_federal_judges are now cases. A Member of Congress serving since 1983 resolves to covered, as does a grandfathered FERS elector. Hypothesis properties cover first-match resolution under any input order, the 1..n ranks, override ordering, caller errors from resolve and the federal statutory order on the real registry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A closed row's residual is now what the law gives when none of its cases holds. For a family's exclusion that is "covered" at family level: this paragraph does not exclude, so the other families apply. Each statutory condition on an exclusion becomes a noncovered case, with the statute's exceptions ranked above it through overrides. Where a family's own law gives no consequence for the matched facts, the case or residual is "deferred" and names the deciding families in defers_to. The loader refuses a deferral without targets, a defers_to on any other outcome, duplicate or blank targets, self-deferral, an unknown target family and any family-level deferral cycle. parameters.case_free_basis records why a condition named in a case-free row changes no consequence; the loader allows it only on closed, case-free rows that neither exclude nor defer. Consequence strings stored in parameters move into the cases that already carried them. The federal_home_loan_bank transition now reads service after December 31, 1966 (Pub. L. 92-603 section 125(a)(2)), not 1965. Tests: a conformance check that every closed row whose description or parameters name a condition carries cases (fails on the 94219ed rows: 51 flagged, 13 stored consequences), 14 repros of failed conditions, an exhaustive deferral-target check, and Hypothesis properties for the deferral schema, the acyclic graph (against graphlib) and case_free_basis. 14 of 14 step-2 mutants fail a named test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…H-2)
POMS RS 01402.020 A says SSA excluded noncash transfers from wages
before SSA Ruling 95-3P, published August 7, 1995, and that certain
noncash transfers are wages from that date. agricultural_service_1988
now carries a noncovered case for a cash-equivalent transfer without
dominion and control before 1995-08-07, ranked between the genuine
noncash case and the from-1995-08-07 case, so the date condition
decides instead of falling through to the residual.
POMS A names no date axis for the ruling's effective date; the row
records the service-date reading it uses and names the payment-date and
determination-date alternatives (parameters.ruling_effective_date_axis).
The agricultural_commodity oracle now evaluates each case's date text
("before" or "on or after") on the service date and resolves through
first-match precedence. A Hypothesis property over 1988-2026 service
dates, pinned at the review's invented 1990 transfer and at 1995-08-06
and 1995-08-07, fails on the 8476dcf rows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…iew r2 MED-2) Review r2 MED-2 found rows that refused every year although a capture verifies the rule. Family-years refusing in the review's probe fall from 343 of 3,422 to 216. - Passive income: 411(a)(2)'s exclusion of the dividends and interest is returned in every year 1968-2026 (59 refusing years to 0). Only the deductions attributable to the excluded receipts, and from 2008 the title 42 "benefits" wording for obligations not in registered form, stay open, as case-level sub-questions with named readings. - Possessions: Pub. L. 100-203 section 9023(b) states no effective date, so the successor 411(a)(8) applies from enactment on 1987-12-22. Only 1968 to 1987-12-21 stays open. Adds a page extract of the act (101 Stat. 1330) and its text derivative, with the original's URL, size, SHA-256 and page count. - Rental: 411(a)(1)'s real-estate exclusion is returned for 1968 through 1996-03-31 (29 refusing years to 0). Only the regulatory detail on occupant services, parking and storage space, and dealer holdings stays open. - The 1996-04-01 split is a CFR edition date, recorded on both rows as parameters.evidence_only_boundaries, which the loader validates and pairs across adjacent rows. - federal_1987_2026's FEPCA waiver case now names its legal question (FEPCA_WAIVER_LAW_UNCAPTURED) and two readings, so resolve refuses instead of returning a bare "open" that reads like missing facts. Loader: a case with open_reason and two or more named open_alternatives is a legal sub-question; its consequence must be open, and resolve raises OpenRuleError when it decides. An open case without one still means missing facts and is returned. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rs (review r2 lows 1-4, 14) Low 1. Each v2 guard now has a failing test: two or more alternatives on an open row, none on a closed row, an open reason for a null consequence, cases outside parameters, the case-condition type, unique alternative names, no expected_parameters on an example, and recorded searches for a null prevalence bound. The table-quote test is a Hypothesis property over quoted flags whose fixture passes every earlier check, so the quote rule alone decides it. Low 2. Example income years, RET verified_income_years and threshold years are registry data: a bad value raises RegistryValidationError. Low 3. An unknown family, case, threshold, table or alternative raises UnknownIdentifierError (a LookupError). CoverageRegistryError derives from Exception, so `except ValueError` no longer catches a legal refusal. Low 4. parameters.effective_basis is an enum: service_date (default), taxable_year_start or payment_date. A non-default axis needs an effective_basis_description that quotes its effective-date clause, and a conformance test finds each quoted span in a capture the row cites. A family keeps one axis. Directors use taxable-year starts (Pub. L. 100-203 section 9022(c); Pub. L. 101-508 section 5123(b)); CRP and public-office fees use payment dates (Pub. L. 110-246 section 15301(c); Pub. L. 90-248 section 122(c)(1)); options dealers keep taxable-year starts (Pub. L. 98-369 section 102(c)(2)). Passive income moves to payment dates, against review r1 low 1. The captured 42 U.S.C. 411 notes make both boundary amendments "effective" on calendar dates (Oct. 4, 1976, section 703(r) of Pub. L. 95-600; Oct. 1, 2008, section 4407 of Pub. L. 110-246) and state no taxable-year rule, so a 1976 or 2008 year lookup now returns both wordings. Family-year refusals stay at 216 of 3,422. Low 14. threshold() checks every index input even when a published value decides; an alternative must name a closed row's alternative, and a reading of an open question raises UnknownIdentifierError instead of being ignored; no line exceeds 79 characters; both casual-labor thresholds carry a description and the loader rejects an empty one. The fishing record follows in the next commit. Mutants: 29 of 29 killed (24 code, 5 data), logged under the round's ce1-r2-fix/logs/step5a-mutants/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ows 8-11, 14)
Low 8. se_conservation_reserve_1968_2007 drops parameters.named_alternatives,
which repeated its two open readings under other names. open_alternatives
is now the only list. test_open_readings_are_named_once_and_described_in_prose
checks that every open reading is named once per row and described in prose
(36 descriptions, none a JSON dump).
Low 9. nonresident_alien_vocational_service now has three rows.
- Pub. L. 100-647 section 1001(d) is headed "AMENDMENTS RELATED TO SECTION
123 OF THE REFORM ACT". Its (2)(E) adds the M class to 42 U.S.C.
410(a)(19).
- Section 1019(a) makes the title's amendments take effect as if included
in the Reform Act provision they relate to.
- Tax Reform Act of 1986 section 151(d) applies section 123 to taxable
years beginning after 1986-12-31.
The two legal readings, as_if_included_in_tra1986_section_123 and
from_enactment_1988_11_10, therefore agree before 1987. A closed
1968-1986 row (M-1 service covered; F and J excluded) replaces that part of
the refusal. The open row now spans 1987-01-01..1988-12-31 and records
section 151(d)'s grant-date limit as its unverified dependency. The 1989
row's before_this_window names both earlier rows. The "retained locator"
alternative is gone.
Review r1 accepted a refusal for all of 1968-1988. The sources settle
1968-1986, so the rows follow the sources. The Act was captured by plain
request to govinfo (2026-10-26T13:18:26Z) and kept as a page extract:
- the original: 75,705,438 B, sha256 e8a5ee6e..., 471 pages;
- the extract: original PDF pages 1, 8-11, 252 and 471, 1,115,690 B;
- a pdftotext -f 2 -l 6 -layout derivative of the extract.
The cited quotes are checked against the derivative.
test_vocational_readings_agree_before_1987_and_refuse_between pins the
three windows and the cited heading.
Low 10. 18 fused tokens are separated, each replacement with an exact
expected count, among them section_1882a, 86 Stat. 1329 (1972), 81 Stat. 821,
pp. 841-842, "within, and not with," and section 933 of the Internal Revenue
Code. "IRS 2004-10" is only spaced; its document type was not identified.
The GAO numbers follow GAO's report-number form; they were not re-fetched.
test_published_prose_has_no_fused_tokens scans prose, identifiers and keys
outside verbatim fields.
Low 11. Each worked example's source_passage now quotes the whole
published example. Where a capture's columns interleave (the 2022
Gavrielle/Dan wages), supporting_passages adds the other lines. The loader
requires supporting_passages to be nonempty text
(test_supporting_passages_are_nonempty_text, a Hypothesis property).
test_published_amounts_sit_in_their_cited_passages checks that every
dollar amount and week count an example states appears in its cited
passages.
Low 14. fishing_crew_share_service_1989 records its operative reading,
conditional_1996_clarification, with its basis in Pub. L. 104-188 section
1116(a)(3)(A). The two communist-organization rows and
newspaper_service_1996 now record {basis, operative_current_text}
resolutions instead of prose. test_closed_rows_name_their_operative_reading
checks that each of the 8 closed rows with named options selects exactly
one of them, with exactly one operational status per group in the list
form.
Registry: 117 rules (was 116). Refusals over 1968-2026 family-years: 216
before this commit, 197 after. Tests: the three CE1 files run 188 tests;
187 pass, and the known failure
test_post_review_exclusions_are_unreachable_from_birth_evidence remains. The
14 step-5b mutants (2 code, 12 data) are all killed. Fragments rebuild byte
for byte from the step-5 scripts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… r2 lows 5-7, 13) Low 5. capture_manifest_ce1c_government.txt and capture_manifest_ce1c_modifiers.txt now record `pdftotext -f 2 -l 3 -raw` and `pdftotext -f 2 -l 2 -layout`. pdftotext 26.09.0 exits 99 on the fused `-f2` forms and 0 on these, and each command regenerates its derivative byte for byte. test_recorded_pdftotext_commands_parse parses every pdftotext call recorded in the capture metadata and the registry against pdftotext 26.09.0's options, and checks each derivative's -f/-l range against its pdf_pages. A Hypothesis property tests the parser. Low 6. sources_government.json now marks poms_rm_04907001.html removed_uncited_no_derivative_dependency, as source_inventory.json does. test_recorded_captures_are_present_or_say_why checks every metadata row that records a file and a SHA-256. The file must be present with those bytes, or the row must say why it is not: - status not_retained with a reason; - removed_uncited_no_derivative_dependency; - removed_duplicate_of_cited_capture, with duplicate_of naming a present capture. All rows for one file must agree. A Hypothesis property tests the checker. Low 7. pdftotext finds no text on the scanned pages se_units_1984_1985 cites (one form feed each), so their OCR text is kept and cited: - irs_schedule_se_1984.pdf.txt and irs_schedule_se_1985.pdf.txt are restored from 08b898e, the parent of 28becb8; - the 1985 Form 1040 instructions' text is now irs_form1040_instructions_1985_extract.pdf.txt, from extract page 2 (original PDF page 31). `pdftoppm -r 140 -f N -l N -png <pdf> | tesseract stdin stdout` (tesseract 5.5.3, leptonica 1.87.0, poppler 26.09.0) reproduces each one byte for byte; the Form 1040 text comes out the same from the extract page and from the original page. The row now cites each OCR text with a quote beside its scanned source. test_scanned_pages_keep_cited_ocr_text checks this, and a Hypothesis property tests its checker. Low 13. Page extracts replace the whole PDFs, made as the statute extracts were (qpdf --deterministic-id --empty --pages; the cover page, then the cited table or section from its heading to the cited entry): - 18 Publication 926 editions (2008-2025) and 18 Publication 15 editions (1999-2007, 2017-2025), 45,846,568 B of originals; - the 1985 Form 1040 instructions, 4,293,993 B, kept as pages 1 and 31. Each row records its original (file, bytes, SHA-256, page count, and commit c0ea2b2 of PR 583) and says to re-fetch it from the recorded URL. pdftotext gives the same text for every kept page as for that page of the original. No IRS original carries a signature (no /ByteRange, no /Sig field), so these rows say original_unsigned. Each Publication 926 and 15 extract has a pdftotext derivative of its cited page: -layout for Table 1 and the 1999-2007 Special Rules table, -raw for the 2017-2025 What's New paragraph. Each threshold citation is now followed by a citation of that text quoting the edition's value. - test_irs_extracts_quote_each_published_threshold checks the 36 quotes against published_values and the lookup, and their page locations against the inventory. A Hypothesis property tests its checker. - test_page_extracts_record_their_originals now covers the 37 new extracts, ties signature_status to /ByteRange in the extract, and checks the recorded qpdf page list. Publication 517. irs_p517_2025.pdf duplicates irs_p517_2025.html, so it is not retained, and its three registry citations now cite the HTML. Check: 4,706 of the 4,835 six-word sequences in pdftotext -raw of printed pages 4-7 occur in the HTML's text after normalizing quotes, dashes, bullets, spacing and list markers; the rest straddle footers, headings, list markers or the HTML's doubled periods. Low 10, rest. "IRS Publication 517(2025)" and "IRS Publication 15(2026)" (twice) are spaced. test_published_prose_has_no_fused_tokens now also flags a word or number run into a parenthesized year, and a Hypothesis property tests the detector. Capture folder: 204 files and 78,471,290 B before, 242 files and 59,935,115 B after. 38 files are removed (37 originals and the Publication 517 PDF) and 76 added (37 extracts, 37 extract texts and 2 restored OCR texts). The Publication 926 extracts take 21,372,986 B of that. Each of their cover pages, like each 2017-2025 Publication 15 cover, carries the same 873,242-byte image. Registry: 117 rules; refusals over 1968-2026 family-years stay at 197. Tests: the three CE1 files run 197 tests; 196 pass, and the known failure test_post_review_exclusions_are_unreachable_from_birth_evidence remains. The 16 step-5c mutants (10 metadata, 6 data) are all killed. Captures and fragments rebuild byte for byte from the step-5 scripts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The conformance module's docstring now lists the capture-folder invariants its tests check: manifests and retention reasons, page-extract provenance and signature status, recorded pdftotext calls, OCR text for scanned pages, IRS threshold quotes and fused tokens. It also names the checkers that Hypothesis properties test. No test changes; the three CE1 files still run 197 tests, 196 pass, and the known failure remains. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lows 8, 9, 14) The step-5b checks for lows 8, 9 and 14 are now checker functions over the registry's rows, open_reading_problems and operative_reading_problems, and each has a Hypothesis property on invented rows: - a reading described by a serialized record or a locator, or a second name for an open row's readings, is flagged, at row and case level; - a closed row's listed options need exactly one operational entry per group and a known status; keyed options need a resolution naming an option or parameter, with a basis. The real-registry assertions are unchanged (36 described readings, 8 closed rows with named options). The four step-5b mutants that target these tests are still killed. The three CE1 files run 199 tests; 198 pass, and the known failure remains. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Master brings #566, #589, #590 and #580. Git auto-merged scripts/first_estimates_birth_evidence.py and tests/estimates/test_birth_evidence_artifact.py, which both branches changed: against each parent the merged files only add lines, so the merge keeps master's OP1 exclusions and CE1's exclusions and removes no line from either side. No CE1 path changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
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.
Work in progress. CE1 of the covered-earnings v2 design (
docs/design/covered_earnings_v2.md§2.1): a versioned, cited registry of OASDI coverage rules for income years 1968–2026, so that CE3 can classify a component-year from its facts.What it adds
src/populace_dynamics/income_resources/coverage_rules.pyholds the row, case and citation types, schema validation (coverage_rules.ce1.v3), the capture-hash check and the lookup by family and income year.case_id, aprecedence, trigger-fact conditions and a consequence. Precedence runs 1..n and the first matching case decides; the row's residual default applies only when no case matches (CoverageRule.resolve).deferredconsequence names, indefers_to, the families that decide instead. The loader refuses a deferral with no target, to an unknown family, to the row's own family, or around a cycle.resolverefuses it withOpenRuleError.RegistryValidationErrorfor bad registry data,UnknownIdentifierErrorfor a name the caller got wrong, and the legal refusals for gaps and open questions.data/external/income_resources_ce1/holds the registrycoverage_rules.json, the fragment files it is assembled from, and the generatorassemble_registry.py. It lives outside the snapshot tree, which.gitattributesmarks binary, so review diffs show it.data/external/snapshots/income_resources_ce1_v1/holds the pinned public captures: statutes, page-range extracts of Statutes at Large, the Federal Register and IRS publications and forms, past U.S. Code section editions, the CFR, POMS, and an Internet Archive copy of SSA's coverage-threshold table. Each has its URL, retrieval time, size and SHA-256 in a manifest, and every file in the folder has a manifest entry.identification_class: awaiting_ce2. Each rare exclusion carries both readings of design question 1:strict, andnegligible_candidate, which is null wherever no published bound was found. No search found one, so every rare exclusion is stillstrict: unresolvedwith a null candidate, and the search records are kept with each row. CE1 chooses neither reading.open_questionslists the 10. Where only a sub-question is unsettled, the row returns the verified rule and the sub-question is an open case.Two rows follow their captured sources against an earlier review:
Invariants
service_date,taxable_year_startorpayment_date), and any axis but the default quotes its effective-date clause.case_free_basissays why not. Every deferral reaches a family that decides.FIELD_PURPOSESor a listed CE1 extension.awaiting_ce2never reads as identified.negligible_candidateexists only with a cited source, bound and population.assemble_registry.build()'s output byte for byte.pdftotextpage range equals its pages. A cited scanned page keeps its OCR text.The general checks have Hypothesis properties on invented rows, and the real registry and capture folder get conformance checks over every row; each published example is its own collected test.
Captures
The capture folder is new to master. It holds 59.9 MB in 242 files. The largest file is 3.4 MB, the 97 Stat. 65 extract.
Seven whole-act or whole-issue PDFs are now page-range extracts. Each was made with
qpdf --deterministic-id --empty --pagesfrom the hashed original:The last two were captured from govinfo in the round-2 fix and are kept only as extracts.
The 37 IRS publications and forms cited for one value or page are now extracts too: 36 editions of Publications 15 and 926 (45.8 MB) and the 1985 Form 1040 instructions (4.3 MB) became 37 extracts of 32.5 MB in all. Each keeps the edition's cover, which identifies it.
What each extract keeps. Each act keeps:
The Federal Register keeps its cover and the two pages that hold FR Doc. 75-17887, from its heading to its filing line. Each IRS extract keeps its cover and the pages that state the cited value.
How the extracts were checked. Every kept page's
pdftotextoutput equals the same page of the original, and the text derivatives regenerate byte for byte from the extracts. The scanned 1984 and 1985 Schedule SE pages keep their OCR texts, sincepdftotextreturns nothing for them.Where the originals are. The inventory and manifests record each original's file, size, SHA-256 and page count. Citations that named an original PDF page now give the extract page as well.
Also removed, because nothing cites them:
not_retained.The originals are in this branch's history, so this PR must land by squash; master then never holds them.
Review
39b52208): REVISE, with two high, twelve medium and 28 low findings. The high ones: tribal-council service defaulted to covered, and pre-2008 conservation reserve payments were covered with no source.28becb82): the schema's cases and residual defaults and the open rows' named alternatives (M7, M12); the tribal and conservation reserve rows; each row the review checked against its source (M1–M6); employer-employee threshold scopes (M8); outcome, path-escape and byte-equality tests (M9–M11); and the low findings and notes. The commit message lists each.1be4b753added 13 worked examples (5 to 18), not nine; the nine Publication 17 PDFs were in the manifest at1be4b753, and were removed as redundant and uncited; and the two PDFs1be4b753called needed whole kept 3 and 4 pages in the next commit, one of them an act rather than an issue.28becb82): REVISE, with two high, two medium and 14 low findings and two notes. The high ones: conditional exclusions with no cases applied the exclusion whatever the facts, and pre-1995-08-07 cash-equivalent farm transfers were covered, against the cited POMS. The mediums: case precedence was undefined, and three families refused rules their captures verify.94219edetodf1dc160):94219ederanks cases, first match wins (MED-1);8476dcf7makes every exclusion condition a case, with deferrals andcase_free_basis(HIGH-1);a6fa1f07makes pre-ruling cash-equivalent farm transfers noncovered (HIGH-2);c0ea2b24returns verified rules and keeps only unsettled sub-questions open, with evidence-only boundaries recorded as such (MED-2);5bac444ftests every loader guard and separates data, caller and legal errors (lows 1–4, 14);01e1e857names open readings once and settles the vocational years (lows 8–11, 14);2dad26e6keeps IRS page extracts and the OCR text of scanned pages (lows 5–7, 13);38cd1968states the capture-folder invariants;df1dc160turns the low 8, 9 and 14 checks into checker functions with Hypothesis properties.28becb82's message says it removed unsupported monotone flags from 13 constant series; it removed them from 14.ea599b92): master172f690f. Git auto-merged the two birth-evidence files, which both sides changed; against each parent the merged files only add lines.ea599b92): next.Plan
Tests
ea599b92. The one failure is the reachability test's track-U assertion, which needs modules this sparse clone leaves out; CI runs it.tests/track_u2/: CI runs it; this sparse clone leaves out files its protected-bytes test hashes.black -l 79,ruffandgit diff --checkare clean.tests/test_tier_policy.pyis expected to fail until the tier-count slot.axiom: n/a: a cited coverage-rule registry for the microsim's covered-earnings classifier; no PolicyEngine country-model or RuleSpec encoding changed
🤖 Generated with Claude Code