Repository navigation
Track B insured status: quarters of coverage; fully, currently and disability insured - #562
Conversation
… disability insured status Max ruled d1802: the rules lane builds insured status for B6a's monthly claiming hazard, and the open-population lane's OP8(d) will call it for entrants. Nothing in the repository decided insured status before. The new reference implements Act 213, 214, 216(i) and 223(c) as a sealed, person-month API: - Quarters of coverage: quarterly wages before 1978, the self-employment and agricultural rules, gift QCs for maximum earnings, annual increments 1978-2027, favourable assignment, and exclusions. - Fully insured (6 to 40 elapsed years, counted from birth, with the pre-1913 male cohorts), currently insured (6 of 13 quarters), and disability insured (20/40, special status before 31, subsequent periods, blindness), with the date last insured. - Every earnings year declares its provenance: observed, convention-filled (with an id) or unknown. Unknown years are bounded at their lowest and highest QC counts. A status is returned only if both bounds agree; otherwise it is refused by name and stays in the shared denominator. - Direct QC input (a 0-4 count after 1977, quarter flags before), evaluation at a stated month, an optional totalization input (refused until built), and a coverage-end month for emigrants. Specialist paths (deemed status, the SSPA alien-worker rule, railroad and military credits, Medicare government employment, fiscal and short taxable years, simplified pre-1951 methods) are named refusals. The tests reproduce the RS 00301 and CFR worked examples, compare the 213(d) formula on the pinned NAWI with the published chart, compare POMS with OACT, and compare the CFR 404.115 cohort chart. Hypothesis properties cover monotonicity in QCs and the date last insured, the soundness of the unknown-year bounds, and the shared input and seal contract. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The design note gives B6a and OP8(d) a citable interface: inputs, the earnings-provenance enum, the decided-despite-unknowns flag, refusal reasons and signatures. The rulespec issue draft covers 42 U.S.C. 413, 414 and 423(c)(1), which Axiom does not encode yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…lict lines The exhibit linked from RS 00301.800 (a PDF and two GIF renderings of the quarters-of-coverage table) was not captured, so its differential was recorded as unavailable. Its text is now captured as pdf_text (pdftotext, -layout), with the PDF and both GIFs pinned by hash. A test checks all 38 rows against fully_insured_requirement: by birth cohort (men before January 2, 1913 at age 65, women at 62), by footnote 1's January 1 rule, and by year of death. Moving the 1975 cap or the 1913 cutoff fails it. The PDF's footnote misprints the male cohort as "born before 1/2/31"; the GIF, the table itself and 20 CFR 404.132(b) say 1913. A test pins that. The decision lines for the two readings taken from 20 CFR 404.130(f) over inconsistent POMS examples are marked with their source-conflict ids: us:oasdi-insured-prior-disability-favorable-disregard and us:oasdi-insured-disability-period-endpoint-quarters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Master added the holdout registry and an ARF change. Only the tier files conflicted; they take master's version and are recounted (unit 19,575; total 26,124). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Round 1 of the independent review found that a declared disability onset froze the fully insured elapsed-year count and anchored the disability test to the onset quarter. A period of disability exists only after an application and five months (42 U.S.C. 416(i)(2)(A)-(B); 20 CFR 404.320(b)), and it begins on the onset day only if the worker is insured then, otherwise on the first day of the first later qualifying quarter (416(i)(2)(C); 404.321(a)). So: - Onset alone no longer removes elapsed years (404.110). The current period's establishment is declared, with provenance. - The disability test scans the quarters from onset to the query and uses each candidate year's fully insured endpoint (404.131(a), 404.132). A later qualifying quarter now counts. - Currently insured excludes every established period intersecting the 13-quarter window, including the event's own (404.120(b), RS 00301.110). The old contract assertion pinned the misreading. - Count bounds with a switching witness use a sound envelope. It also takes the open-population lane's rev 10 needs. Prior periods, the current period and section 214(c) applicability carry OBSERVED / CONVENTION_FILLED / UNKNOWN provenance, with UNKNOWN as the default. Unknown facts are bounded, or refused by name: unknown_prior_disability_periods_decide_status, unknown_current_disability_period_decides_status and sspa211_applicability_unknown. The no-periods lower bound rests on 404.320(a) and 404.130(f). Adds 20 CFR 404.315, 404.320 and 404.321 captures. Moves the mutation report to docs/design/track_b_insured_status_mutations.json, next to its design note. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Master added the P2 forward-earnings work. Only the tier files conflicted; they take master's version and are recounted (unit 19,723; total 26,293). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ound 3) The round-2 review of #562 found five medium issues. This commit fixes them under 42 U.S.C. 413(c), 416(i)(2) and 416(l) and 20 CFR 404.320-.321: - An ongoing period stays ongoing. The query no longer ends it, and an unknown end that decides a status refuses by name. - Full retirement age bounds every established period's start and end. - Supplied 1937-1950 wages now trigger the Act 213(c) alternative automatically, and the refused table says which specialist refusals the rule can observe from its inputs. - A declaration that every concrete filling makes invalid raises InvalidFamilyInput and creates no denominator row. - The design note gives Sam's fully insured prerequisite as seven. Subfleet job 20261025-084543-trackb-fix-insured-3 (gpt-6.1-sol) wrote this work and left it uncommitted; salvage ref 274d2d09 preserved its tree. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The round-3 review found three medium defects with one cause: each proof or bound used an ordinary-path premise where the law has an "or". This commit fixes the class: - A single predicate now decides whether a declared current period could be valid. It checks the ordinary, automatically detected and flagged routes before any fact-pattern InvalidFamilyInput. - An UNKNOWN administrative end now covers every quarter from the period's start through the query and FRA cap (416(i)(2)(D); 20 CFR 404.321(c)(3)). The FRA cap bounds the end and no longer removes the unknown fact. - A prior period may last one month, because Act 216(i)(2)(A) allows DIB entitlement in place of five months and 404.315(a)(4)(ii) waives the waiting period for ALS. - An ordinary failure no longer hides RS 00301.480's pre-1956 route. The design note gains a premise table for every fact-pattern input error, UNKNOWN collapse and bound. It also qualifies the Act 213(c) seven-year note, and the code now carries the us:oasdi-insured-pre1951-seven-elapsed-years marker. Tier counts add the 53 new unit tests to the three-way sum; the slot's recount replaces them. Subfleet job 20261031-082259-trackb-fix-insured-4 (gpt-6.1-sol) wrote this work. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sol's round-4 review found two mediums and a low: - A later upper-credit witness made every declaration look possible, even when each filling starts after a fixed declared end. The ordinary possibility check now bounds the insured start by the declared end, continuity date and death, and one filling must clear both that bound and any prior-period overlap (20 CFR 404.320(b)(2), 404.321(a), 404.110(b)(1)). An enumeration property compares the predicate with every concrete filling in both directions. - RS 00301.102 B.3.b's wrong-number SS-5 exemption raised a false conflict. An adjudicated exemption now overrides the date-derived presumption. A pre-2004 assignment that declares section 211 applicable stays an input error, and so does an exemption declared by an alien worker born in 2004 or later. - A caller could not say a period was still running. A dated, provenance-bearing continues-through fact now removes earlier endings without supplying one. The new fields follow every existing Person field, so positional arguments keep their meaning. The audit behind this round also applied the same horizon to the RS 00301.480 pre-1956 route. Above 4,096 overlap fillings the predicate refuses by name. Tier counts add this round's 92 unit tests to the three-way sum; the coordinator's slot recount replaces them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… round 6) Sol's fifth review found that a refusal over an unrelated year ran before the impossibility proof, so an input error became a counted row. The four early conversion refusals now wait for the proof, which uses bounded credits for those rows. A possible declaration keeps its original refusal. RS 00301.480 A's 20/40 precondition now limits the automatic pre-1956 route: a lower-filling witness before October 1960 removes it for every completion, and an upper-only witness leaves it possible. Fixed quarter overlap now raises an input error before any filling search. Round 5's cost finding stays out of this round; a separate task takes it after the merge. The tier files start from the 20,594 unit tests CI collected at 2ae76db, which my round-5 sum understated by nine, and add this round's 46. The coordinator's slot recount replaces them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Ready for hub review Earlier findings (Appendices A, C, D)
Findings at this head
Python: uv-managed CPython 3.14.6. Both data roots pointed to nonexistent paths on every run. Scripts are under scratch/review/ in the review worktree and were not committed. Findings 8 and later are lows and nits; the JSON below carries their counterexamples and fixes. To fit the 65,536-character limit, {
"verdict": "REQUEST_CHANGES",
"head": "7b5b126a8e946e3c91e3024de18d17cd1c5c279d",
"reviewer": "cloud Opus 5.5, independent review",
"summary": "I reviewed the whole diff against master (104 files) at 7b5b126 against the captured Act, CFR and POMS text. All 44 required gate modules pass (7,312 tests, none failed or skipped), with an audit hook that saw no barred path opened. black and ruff are clean on the 48 changed Python files, all 48 source captures match their manifest hashes, and no protected or stray file is in the diff. Twelve mutations of my own were all killed and reverted with git checkout, leaving both worktrees clean. Eight reviewers checked QC crediting, fully and currently insured status, disability insured status and the DLI, listed and UNKNOWN priors against a brute-force oracle, the Track B contract with Hypothesis properties, the worked examples, and the design notes and readings. I re-ran every medium myself, and a separate verifier then tried to refute each one on the captured law. QC crediting, the 213(d) index and all 50 increments, the elapsed-year count, currently insured status, and the 20/40, under-31, subsequent and blindness routes all match the law in tens of thousands of oracle records. Every published worked example the code adjudicates reproduces, apart from the three disclosed divergences. The counterexamples in Appendices A, C and D now refuse by name and keep their rows. Appendix C's one-basis computation survives, though, in DISABILITY's qualifying quarter and count. Seven mediums remain, each with an executed counterexample confirmed independently: (1) a current period the rule itself begins on 404.130(c) alone is appended unflagged, so later quarters lose 404.130(d) and the DLI comes back years early (2006-06-30 against 2012-12-31), including OP12 frozen exits; (2) a period that begins in the quarter a prior ended, POMS RS 00301.140 example 7, raises InvalidFamilyInput and drops its row; (3) the exit-year cap on annual QCs, which the note admits is not statutory, gives a wrong FULLY status for mid-year exits, narrows UNKNOWN envelopes and drops lawful established rows; (4) on the listed-prior search path the DISABILITY qualifying quarter comes from whichever filling first ties the witness rank, so it can be years late (2010-07-01 against 2007-01-01) and ignores the past-blindness basis; (5) under UNKNOWN priors that quarter is reported as exact bounds from the no-prior case; (6) for living men born before 1913, old-age FULLY at ages 62-64 stops the elapsed years at the query year, not at age 65 or 1975; (7) a flagged prior that 404.130(c) can't begin on any placement computes as a supported row under UNKNOWN establishment. Lows (findings 8-24) cover a disclosed pre-1951 flag convention, a misdescribed age-65 erratum, FULLY's witness treatment, loose refusals, validation gaps, test and registry overclaims, the long-period register's missing third parse, uncommitted references in the note and a stale PR body. No population claim was made, no network was used beyond package installs, and no tracked file changed.",
"sol_findings": [
{
"severity": "medium",
"location": "src/populace_dynamics/track_b/insured_status.py:2246 (_settle_every_history; was :1845)",
"issue": "Under UNKNOWN priors or establishment an earlier period's start can force an annual QC into one quarter, so a CURRENTLY status or DLI lower bound on the no-period witness was unsafe.",
"resolved": true,
"evidence": "own/appendix_spot.py: the DLI record (born 1961, January 2008), its frozen exit and the CURRENTLY record (born 1965, April 2003) refuse disability_boundary_assignments_unsupported, rows (1, 5/2, 0, 1). Two reviewer runs refuse the same for UNKNOWN ending, UNKNOWN 2004, both, UNKNOWN establishment, all four UNKNOWN, onset day 15, frozen exits and later queries. A past-blind 1998-1999 prior pins the 1998 QC in Q1 (DLI 2007-12-31), so refusing is right. The qualifying quarter under UNKNOWN priors is still unwidened (finding 5).",
"id": "A-medium (Sol round 14, 129d44bd)"
},
{
"severity": "medium",
"location": "src/populace_dynamics/track_b/insured_status.py:1799 (_prior_basis), :1945, :2156, :3334",
"issue": "An unflagged listed prior was held only to fully insured status, so a TRUE status and DLI held only on the past-blindness completion.",
"resolved": false,
"evidence": "The reported records now refuse by name (own/appendix_spot.py; reviewers' c_medium.py with UNKNOWN 2005, frozen exit, 2004 current period; rows kept). But the one-basis computation remains in DISABILITY's qualifying quarter and count: the strict 404.130(b) witness replaces the favorable one when ranks tie, so the born-1968 record reports 2008-04-01 exact where past blindness gives 2008-01-01 (own/n1_n2.py, oracle_f5.py; finding 4). Round 21's invariant ('a computed status or date on a listed prior holds on each basis') fails for that date, so the finding moved rather than closed.",
"id": "C-medium (cloud review of 38a573a8)"
},
{
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:1834",
"issue": "A listed prior no placement can insure was treated as unconstrained and computed.",
"resolved": true,
"evidence": "own/lows.py (born 1960, 1990 prior, QCs only 1995-2000): ALL, FULLY, CURRENTLY, DISABILITY and UNKNOWN establishment refuse disability_boundary_assignments_unsupported, rows (1, 5/2, 0, 1); documented in 'A prior no placement supports'. Residual: a flagged prior only 404.130(b) supports computes under UNKNOWN establishment (finding 7).",
"id": "C-low (cloud review of 38a573a8)"
},
{
"severity": "medium",
"location": "src/populace_dynamics/track_b/insured_status.py:1747, :1794 (under31_route=period.special_insured)",
"issue": "An unflagged prior before 31 was allowed to rest on 404.130(c) alone.",
"resolved": true,
"evidence": "own/appendix_spot.py (born 1968, unflagged 1998-1999 prior): DLI, 2008-onset and frozen-exit records refuse by name; the flagged twin computes DLI 2008-03-31 censored. Reviewer runs add UNKNOWN 2005, the 2004 current period and UNKNOWN establishment, all refused with rows kept. 404.130(b) pins the 1998 QC in 1998Q1 (DLI 2007-12-31) and past blindness gives 2008-03-31, so refusing is right. My mutation subsequent_route_before_31 failed test_a_young_prior_after_a_flagged_one_rests_on_paragraph_b.",
"id": "D-medium (cloud review of f37f7f79)"
},
{
"severity": "low",
"location": "docs/design/track_b_insured_status.md:3058",
"issue": "A listed prior's onset is unrecorded and the code relied unstated on the favorable earliest start.",
"resolved": true,
"evidence": "The note's 'A listed prior's onset' section and the register now state the reading; own/lows.py runs the probe (born 1970-07-15, 1995 prior): DISABILITY True 13/13 at 1998Q4, as the reading gives. Nit: for the unflagged prior the example has no completion leaving 1995Q1 uninsured.",
"id": "D-low (cloud review of f37f7f79)"
}
],
"executed": [
{
"command": "git worktree add --detach ../pr 7b5b126a8e946e3c91e3024de18d17cd1c5c279d; git rev-parse HEAD; git diff --stat origin/master...HEAD | tail -1",
"result": "7b5b126a8e946e3c91e3024de18d17cd1c5c279d; scratch/review ignored; 104 files changed, 57718 insertions(+), 13 deletions(-)."
},
{
"command": "uv venv -p 3.14 /tmp/rvenv; uv pip install (the pinned list)",
"result": "CPython 3.14.6; all pins installed; repository package not installed."
},
{
"command": "pytest -p review_audit_plugin -p no:cacheprovider -n 3 -q <the 44 required modules> (both data roots nonexistent)",
"result": "7312 passed, 0 failed, 0 skipped (EXIT=0, 1643 s): insured status modules 1848 (stress 51, qc 310, sources 159, classification oracle 200, rounds 2-22), input_schema 742, refusal_notes 21, round_13_audit 1168, round_15_arguments 346, round_15_receivers 3187. Audit hook in all 4 processes: 0 barred opens or listings; spawns only xdist workers and 'uname -p'."
},
{
"command": "black -l 79 --check <48 changed .py>; ruff check --no-cache <48 changed .py>",
"result": "black: 48 unchanged; ruff: all checks passed."
},
{
"command": "sha256 and size of tests/data/track_b/insured_status_sources/* vs manifest.json",
"result": "48/48 match; nothing unlisted."
},
{
"command": "git diff --name-only origin/master...HEAD | grep protected/stray patterns",
"result": "No gates.yaml, engine/loop.py, engine/steps.py, runs/*.json, scratch, report or bundle in the diff."
},
{
"command": "mutate.py in a second detached worktree: apply, pytest -x on the insured status modules (stress excluded), git checkout -- <file>, git status",
"result": "12/12 killed; every revert exit 0, status empty. elapsed_year_off_by_one -> :test_version_and_explicit_zero_history; odd_quarters_not_reduced -> :test_fred_brown_35_quarters_require_17_poms_140_example_1; credited_endpoint_dropped_from_window -> _classification_oracle:test_classification_oracle_hypothesis; flagged_prior_may_pass_paragraph_b -> _fix_round_22:test_a_flagged_prior_there_computes; unflagged_basis_prefers_blindness -> _fix_round_22:test_a_date_only_blindness_reaches_refuses[InsuredTest.DISABILITY]; unknown_history_skips_lower_date -> _fix_round_19:test_a_prior_can_undercut_the_date[known_end]; dli_scan_reaches_fra_quarter -> :test_dli_fra_cap_poms_148_november_2019; start_always_first_of_quarter -> _fix_round_10:test_recovery_month_onset_requires_smallest_two_month_gap[True]; recovery_cutoff_december_1980 -> _fix_round_10:test_january_1981_recovery_bound_stops_at_first_paragraph_c_end[False]; agricultural_100_rule_off -> _qc:test_agricultural_qcs_fill_quarters_not_already_credited[1]; qc_rounding_ties_down -> _qc:test_qc_amount_ties_round_up[delta1-260]; subsequent_route_before_31 -> _fix_round_22:test_a_young_prior_after_a_flagged_one_rests_on_paragraph_b"
},
{
"command": "python scratch/review/own/test_own_properties.py (pytest)",
"result": "4 passed x120 examples: determinism and year-order independence; rows/weights conserved; undeclared year never yields a row; one more QC never lowers a plain record's status or DLI."
},
{
"command": "python scratch/review/own/appendix_spot.py; own/lows.py",
"result": "Appendix A, C, D records refuse disability_boundary_assignments_unsupported with rows kept; D flagged twin DLI 2008-03-31; C-low refuses for every test; D-low probe 13/13."
},
{
"command": "python scratch/review/lead1_current_flag.py, lead1_variants.py, own/f1_second.py; python -I own/oracle_lead1.py, oracle_lead1_endings.py, oracle_monotone.py",
"result": "Finding 1: production 2006-06-30 (observed end, frozen exit), [2004-12-31, 2010-12-31] (UNKNOWN end); oracle 2012Q4 by (d); second record 2010-12-31 vs 2016Q1."
},
{
"command": "python scratch/review/own/jane_d7.py",
"result": "Finding 2: InvalidFamilyInput when established; DISABILITY true when not established; onset 1991-01-02 computes."
},
{
"command": "python scratch/review/own/qc_checks.py, qc_unknown_exit.py",
"result": "Finding 3: February exit False 3/6 vs December True 6/6; UNKNOWN exit year computed False; established 2021 period InvalidFamilyInput."
},
{
"command": "python scratch/review/own/n1_n2.py, count_basis.py; python -I own/oracle_f5.py",
"result": "Findings 4 and 5: qualifying 2008-04-01 vs 2008-01-01 (past blindness), count 20 vs 21; UNKNOWN priors 2007-04-01 vs 2007-01-01 with a lawful prior."
},
{
"command": "python scratch/review/own/male_cohort.py, male_cohort2.py",
"result": "Finding 6: born 1908, 20 QCs: True 20 at 1971-12, False 22 at 1973-12; born 1912, 23 QCs: True 23 at 1974-12."
},
{
"command": "python scratch/review/own/pre1951_flags.py, probe_fra.py, end_after_fra.py, lows2.py, flag_unsupported.py, probe_exit_year.py",
"result": "Lows 7, 9, 10, 13, 14 and 20 reproduced as stated."
},
{
"command": "python scratch/review/own/contract_probe.py; own/weight_probe.py",
"result": "Exact types enforced (bool count, float wages, datetime month, date subclass, dict subclass all rejected, the subclass read 0 times); results sealed (public construction, replace, copy, pickle rejected); bad key or negative weight rejected before compute runs; a military-credits refusal kept as one row (1, 5/2, 0, 1). Float weights are normalized exactly by the shared, unchanged gross_benefits check."
},
{
"command": "Workflows: 8 reviewers (statute-disability, statute-qc, statute-fully-currently, oracle-priors, prior-findings x2, contract-properties, worked-examples, notes-readings) and 10 verifiers; scripts under scratch/review/wf*-*/",
"result": "QC amounts 50/50 against RS .250, OACT and CFR; 220 random QC records match an independent oracle; 1,256 404.115 and 495 exhibit comparisons; 42,000 random fully/currently records match a plain oracle outside finding 6's window; 33 worked examples pass by hand; 85 of 87 quoted phrases verbatim; oracle-priors compared 4,725 records (2,509 computed), no disagreement in the round 14/21/22 areas. Verifiers upheld findings 1, 2, 3, 6 (one each) and 4, 5 (three each); 1-3 were also found by two to four reviewers; 7 was found by oracle-priors and reproduced by me; pre-1951 flags, the age-65 note and the third parse were set low. Contract reviewer: 154 schema checks, seals, receivers first, one snapshot per object, conserved batches, monotonicity and UNKNOWN bounds all hold."
},
{
"command": "git -C ../pr status --porcelain; git -C ../pr-mut status --porcelain",
"result": "Both empty."
}
],
"findings": [
{
"severity": "medium",
"location": "src/populace_dynamics/track_b/insured_status.py:1684",
"issue": "_complete_current_period (and _current_period_completions, :2332) appends the current period as DisabilityPeriod(start, end) with special_insured False even when the rule itself began it on 404.130(c) alone, so after it ends, quarters at 31 or later lose Act 223(c)(1)(B)(iii) / 404.130(d) and the DLI comes back years early (exact DLI, OP12 frozen exit, UNKNOWN-ending range; B10 then fails).",
"counterexample": "Person(1980-02-02, FEMALE, onset 2003-01-15, established True OBSERVED, end 2004-12-31 OBSERVED, priors () OBSERVED, sspa211 False OBSERVED); years 1980-2013 OBSERVED, qc_count 2001:2, 2002:4, 2009-2011:4, 2012:1, else 0; month 2013-01-01; ALL or DISABILITY. Production: supported row (1, 5/2), DISABILITY true by under31_special 6/6, DLI [2006-06-30, 2006-06-30], not censored. Right: 2012-12-31. At 2003Q1 every placement has 6 QCs, so (b) fails and (c) holds: the period was 'only insured under paragraph (c)'. At 2012Q4 (age 32): 2001Q2-2012Q4 is 47 quarters less the period's 8 = 39, so 38 and 19 needed; 19 held; fully insured needs 8. At 2013Q1, 40 quarters need 20. The same record as a flagged listed prior gives production 2012-12-31. Frozen exit (years to 2012, coverage_end_month 2012-12-01, query 2027-01-01): production 2006-06-30, law 2012-12-31. UNKNOWN end (continues_through 2003-06-30): production [2004-12-31, 2010-12-31] not censored; the 2004-12-31 ending gives 2012-12-31 and the 2008-12-31 ending reaches the 2013Q1 query. Second record (born 1980-02-15, onset 2005-06-01, end 2013-12-31, QCs 2003-2004:4, 2014-2015:4, January 2016): production 2010-12-31, law 2016-03-31 censored. Oracle with no package import: scratch/review/own/oracle_lead1*.py. Found independently by three reviewers; verifier patched only the flag and production moved to the lawful values. The stress oracle shares the premise (special = any(flags(case))).",
"fix": "Flag the appended period special_insured when it begins before the age-31 quarter and 404.130(b) fails at its start on the filling that gives the reported start (holder not blind); let it open 404.130(d) only for quarters after its end; refuse by name where placement decides the basis. Fix the stress oracle, B10 and the 'Subsequent disability' row, and restate the QC-monotonicity invariant: under the law one more QC can let 404.130(b) begin the period and remove 404.130(d) (19 pre-onset QCs give 2012-12-31; one more 1997 QC gives 2012-09-30).",
"source_text": "Act 223(c)(1)(B)(iii): 'who, by reason of section 416(i)(3)(B)(ii) ..., had a prior period of disability that began during a period before the quarter in which he or she attained age 31'; 404.130(d)(1): 'for which you were only insured under paragraph (c)'; RS 00301.148 B.2.b: 'If 20/40 is not met and either the NH is under age 31 or special insured status previously applied, determine date NH last meets special insured status.'"
},
{
"severity": "medium",
"location": "src/populace_dynamics/track_b/insured_status.py:536",
"issue": "Person rejects periods that share a calendar quarter and re-runs that check when _complete_current_period appends the current period, so an established current period beginning in the quarter a prior ended raises InvalidFamilyInput and loses its row, though 404.321(a) starts it on the onset day and RS 00301.140 example 7 (Jane) is that published case; design note I13 calls it impossible.",
"counterexample": "Person(1967-03-16, FEMALE, prior (DisabilityPeriod(1988-03-29, 1990-10-31, special_insured=True),) OBSERVED, onset 1990-12-03, established True OBSERVED, sspa211 False); years 1967-1991, qc_count 3 in 1986 and 1987, else 0; month 1991-01-01; any test. Production: InvalidFamilyInput('Established current period has no possible insured disabled quarter'), no row. Right: one supported row, start 1990-12-03, DISABILITY true. The prior's quarters 1988Q1-1990Q4 hold no QC, so the 12 counted quarters ending 1990Q4 are 1985Q1-1987Q4 with 6 QCs. With establishment False production itself gives DISABILITY true, qualifying 1990-10-01; onset 1991-01-02 computes; listing both periods raises at Person(). scratch/review/own/jane_d7.py.",
"fix": "Check period order by day and treat a shared quarter as an endpoint quarter of both periods (or refuse by name); correct I4/I13 and the round-6 fixture; add example 7 with establishment True.",
"source_text": "RS 00301.140 ex. 7: 'They became disabled again 12/3/90 ... is insured for DIB as of the new onset date.' 404.321(a): 'Your period of disability begins on the day your disability begins if you are insured for disability on that day.'"
},
{
"severity": "medium",
"location": "src/populace_dynamics/track_b/_insured_status_qc.py:196",
"issue": "_allowed_quarters drops quarters after coverage_end_month, so a mid-year exit caps the exit year's annual (and pre-1978 statutory) QCs at the quarters through the exit quarter even at a later query; no source has this limit (the note calls it 'an explicit interface convention, not a statutory emigration exclusion', with no register entry or result flag), and it gives wrong FULLY status, narrows UNKNOWN envelopes and drops lawful established rows.",
"counterexample": "(a) Born 2000-06-15, qc_count 2019:2, 2020 wages $6,000, coverage_end_month 2020-02-01, month 2024-01-01, FULLY: production False 3/6 (2020 credited 1); December exit: True 6/6. Right: True; $6,000 // $1,410 = 4 QCs, all 2020 quarters begun by 2024. (b) Born 1955-06-15, qc_count 4 in each of 1996-2005, exit 2005-04-01, June 2016, FULLY: production False 38 of 39 (2005's declared 4 QCs credited 2); December exit True 40; Act 214(a)(2) makes 40 QCs fully insured by itself (oracle-priors reviewer; own/exit_40.py). (c) Born 2000-02-02, 2024:3, 2026 UNKNOWN, exit 2026-04-01, January 2027: computes False (3..5) where a December exit refuses; a $7,560 2026 filling gives 5/False against 7/True. (d) Born 1970-06-15, 4 QCs in 2001-2010 and 2016-2019, 2020 wages $6,000, onset 2021-01-15 established, exit 2020-02-01, June 2021: InvalidFamilyInput, though 2020's 4 QCs give 20/40. scratch/review/own/qc_checks.py, qc_unknown_exit.py. Found by two reviewers; verifier upheld.",
"fix": "Credit the exit year's annual and statutory QCs to any begun quarter (the exit still bars later years); or get Max's ruling, register the convention and flag affected results, refusing by name where it decides a status.",
"source_text": "RS 00301.230 B: 'We can assign a QC to any quarter in the calendar year, subject to the limitations in RS 00301.240.' RS 00301.240 bars only a counted quarter, quarters after death, a disability period and 'a quarter that has not yet commenced'."
},
{
"severity": "medium",
"location": "src/populace_dynamics/track_b/insured_status.py:2156",
"issue": "When a listed prior binds, _settle_fillings returns the first kept filling whose witness rank ties, and _witness_rank (:1945) ignores the qualifying quarter, so :3334 reports DISABILITY's qualifying_quarter (and count) from that filling as exact: the first insured quarter (the 404.321(a) start) can be years later than on a lawful filling with the same basis, and where the record leaves the prior's basis open (404.130(b) or past blindness) it takes the strict basis only. This is the unresolved part of Appendix C's medium and breaks round 21's invariant that a computed date on a listed prior holds on each basis.",
"counterexample": "(a) Same basis: Person(1959-02-28, FEMALE, prior (DisabilityPeriod(2000-04-01, 2005-03-31),) OBSERVED, onset 2007-01-01 established False); qc_count 1990:1, 1991:3, 1992:3, 1994:4, 1997:4, 1998:4, 2000:1, 2006:4, 2009:4, 2010:4; month 2011-09-01; ALL. Production: DISABILITY True 20/20, qualifying = upper_qualifying = 2010-07-01. The same facts declared established start 2007-01-01. Right: 2007-01-01: the filling 1990:Q3, 1991:Q1-Q3, 1992:Q2-Q4, 2000:Q1 begins the prior on 404.130(b) at 2000Q2 (20 of 40, fully 20 of 19) and holds 20 in the 40 counted quarters ending 2007Q1 (fully 24 of 20), and also attains FULLY, CURRENTLY and the DLI (oracle-priors reviewer; own/qual_same_basis.py). (b) Basis split: Person(1968-02-02, unflagged prior 1998-01-01..1999-12-31, onset 2008-01-01 established False); qc_count 1989-1992:4, 1993:3, 1998:1, 1999-2002:4, 2003:2, 2008:2; April 2008: production 2008-04-01 exact; on past blindness the 1998 QC may sit in Q2-Q4 and 2008Q1 holds 20, so 2008-01-01 (own/n1_n2.py, oracle_f5.py). Count: born 1955-02-02, same prior, 4 QCs in 1980-1984, 1989-1992, 1999-2003, 1993:3, 1998:1, January 2008: production 20/20, past blindness 21 (own/count_basis.py). Verifiers upheld; ranking by quarter alone isn't enough because the fallback compares only insured flags.",
"fix": "Make the listed-prior search attain the favorable qualifying quarter (and count) on every basis before stopping, or report the range / refuse by name; add both records as tests.",
"source_text": "404.321(a): the period begins 'on the first day of the first calendar quarter after your disability began in which you become insured'; 404.131(a); 404.130(e): '(1) You are disabled by blindness ... and (2) You are fully insured.'"
},
{
"severity": "medium",
"location": "src/populace_dynamics/track_b/insured_status.py:2246",
"issue": "Under UNKNOWN priors (and UNKNOWN establishment) DISABILITY's qualifying_quarter and upper_qualifying_quarter are the no-prior world's first insured quarter: _settle_every_history proves the status at that quarter but not that no history is insured earlier, and :3223 widens only the counts, so UNKNOWN silently means 'no prior' for this date.",
"counterexample": "Person(1961-02-02, FEMALE, onset 2007-01-01, established False OBSERVED, priors () UNKNOWN); qc_count 1985-1989:4, 2000-2005:3, 2007:4, 2008:4; month 2008-10-01; DISABILITY. Production: True, counts [0, 46], qualifying = upper_qualifying = 2007-04-01. A lawful prior 1990-01-01..1999-12-31 (insured at 1990Q1 under 404.130(b): 20 QCs in 1980Q2-1990Q1) makes 2007Q1 insured (30 of 40 with the period counted, fully insured 39 of 14); production with that prior listed returns 2007-01-01. With establishment True the same record reports start None yet the qualifying quarter 2007-04-01. scratch/review/own/n1_n2.py; oracle over 4,096 placements by the verifier.",
"fix": "Under UNKNOWN priors or establishment, widen upper_qualifying_quarter to the onset quarter (or the optimistic-clock bound), or report None and name the field.",
"source_text": "404.130(f): 'we do not count any quarter all or part of which is in a prior period of disability established for you, unless the quarter is the first or last quarter of this period and the quarter is a QC'."
},
{
"severity": "medium",
"location": "src/populace_dynamics/track_b/insured_status.py:616",
"issue": "For men born before January 2, 1913, _requirement ends the retirement elapsed years at min(query year, age-65 year or 1975), so a living man queried at 62-64 (1968-1976) gets the 404.110(b)(3) death count instead of the 404.110(b)(2)(iii)/(iv) old-age count (404.115 Col. II 'living worker'), even with rib_entitlement_month declared; FULLY and fully_insured_requirement are too low by up to three QCs, and B6a uses FULLY for its RIB claiming risk set. Note line 573's 'subject to earlier query/death' has no source.",
"counterexample": "Person(1908-07-01, MALE, priors () OBSERVED, sspa211 False OBSERVED); years 1937-1971 with qc_quarters (T,F,F,F) in 1951-1970, else False (20 QCs); month 1971-12-01; FULLY. Production: True 20/20 (also with rib_entitlement_month 1971-12-01); fully_insured_requirement 20; at 1973-12-01 False 22. Right: False, 22: he became 62 before 1973, so (b)(2)(iv) counts the years before 1973; 404.115 prints 22 for 'Jan. 2, 1908 to Jan. 1, 1909'. Born 1912-07-01 with 23 QCs: True 23 at 1974-12 against 24 (years before 1975). A woman born 1908 is right. scratch/review/own/male_cohort*.py; verifier upheld.",
"fix": "For these men at or after the year they attain 62 (or with an RIB entitlement) and no death by the query year, end the elapsed years at (b)(2)(iii)/(iv); keep the query/death cap for death, DIB and under-62 queries; correct note line 573 and add Col. II rows queried at 62-64.",
"source_text": "404.110(b)(2): fully insured 'for old-age insurance benefits ... before— (iii) The year 1975, if you are a man who became age 62 in 1973 or 1974; or (iv) The year you became age 65, if you are a man who became age 62 before 1973.' 404.115 note 1: 'living worker or worker who dies after reaching retirement age'."
},
{
"severity": "medium",
"location": "src/populace_dynamics/track_b/insured_status.py:1817",
"issue": "_prior_basis's flagged branch tests '404.130(b) or (c) on some placement' and '404.130(b) fails on some placement' separately, but a flagged prior needs one placement where (c) holds and (b) fails; a flagged prior no placement supports is accepted, and under UNKNOWN establishment (binding forced empty at :3268) the row computes as supported, where the same record refuses by name with establishment True or False and round 21's note says such a prior 'refuses ... by name for every test, with or without an established current period'. Wrong classification; the values equal the flag-dropped record's.",
"counterexample": "Person(1962-06-28, FEMALE, prior (DisabilityPeriod(1990-04-01, 1990-06-30, special_insured=True),) OBSERVED, onset 2010-02-10, establishment UNKNOWN); qc_count 1980:3, 1981:4, 1982:2, 1983:3, 1986:4, 1987:4, 1990:1, 2005-2007:4, 2010-2011:4; month 2011-10-01; ALL. Production: supported row (1, 5/2, 1, 0), DISABILITY True by subsequent_special, DLI 2011-12-31. Right: refused by name (or InvalidFamilyInput). Age 21 falls in 1983Q2, so 404.130(c) at 1990Q2 counts 28 quarters needing 14 and can reach only 2+4+4+1 = 11 on every one of the 384 placements, while 404.130(b) holds on 96: no placement has (c) without (b). Established True or False refuses (own/flag_unsupported.py; oracle-priors reviewer, probe_flag_unsupported2.py).",
"fix": "Test (c)-and-not-(b) on one placement in _prior_basis (refusing when none exists), independent of current_unknown.",
"source_text": "404.130(d)(1): 'for which you were only insured under paragraph (c) of this section'."
},
{
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:838",
"issue": "Pre-1951 years declared as qc_quarters add $0 to the Act 213(c) aggregate, so a FULLY status the aggregate could reverse computes, while raw wages or an UNKNOWN year refuse simplified_pre1951_unsupported. A disclosed interface reading (note line 731), so low; but round 15's 'refuses by name where the aggregate could decide' is broader than the code, and callers aren't told flags waive the route.",
"counterexample": "RS 00301.315 C.1 John Doe (born 1926-09-08, MALE) with 1949 flags TTTT, 1951-1955 TTTT, 1956 TTTF, September 1991, FULLY: computed False 27/37; 1949 as $5,700 or UNKNOWN: refused (own/pre1951_flags.py).",
"fix": "Say that flags waive the 213(c) route unless SIMPLIFIED_PRE1951, UNKNOWN or raw wages are declared, or bound flagged wages and refuse."
},
{
"severity": "low",
"location": "docs/design/track_b_insured_status.md:1487",
"issue": "The note (1487, 1491-1492), sources README (66-68), registry (747) and test docstrings (sources:697-702, base:274) say the male age-65 cohort ends January 2, 1913 and that 404.132(b) and the GIF say so; the law puts age 65 only on men born before 1/2/1911 (404.110(b)(2)(iv); RS 00301.315 A, .101 C) and 1975 on 1911-1912 births, and 404.132(b) is the disability 1975 cap. The operative rule at line 573 and the code are right; the GIF text isn't captured.",
"counterexample": "Man born 1912-07-01: production 24 (right); the stated rule would give 26.",
"fix": "Restate the five places; don't assert an uncaptured GIF reading."
},
{
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:1374",
"issue": "_witness scores the considered and disregarded treatments by (insured, margin, count) and keeps the larger margin, so on a record with QCs inside a listed prior FULLY reports the disregard treatment's requirement and count even when the person is fully insured with the period considered; 404.320(a) disregards a period only when considering it would deny or reduce benefits, and the same result's qcs_by_year and the public fully_insured_requirement report the considered treatment. The note discloses that witnesses 'optimize ... for that particular test' and may differ in 'prior-period treatment' from qcs_by_year, so this is low: status is unaffected, but 'favorable' here means larger margin, not the 404.320(a) condition.",
"counterexample": "Person(1960-02-02, FEMALE, prior (DisabilityPeriod(1995-01-01, 1995-12-31),) OBSERVED); 4 QCs in each of 1985-2000; month 2005-01-01; FULLY. Production: True, 64 of 23, assigned 1995Q1-Q4; in the same result qcs_by_year[1995] = (2, 2) and the years sum to 62; fully_insured_requirement 22. Right: 62 of 22 (elapsed 1982-2004 less 1995; interior 1995Q2-Q3 can't be QCs under 404.146(d) while the period is considered, and considering it denies nothing). Status unaffected (contract reviewer, probe_fir2.py; own/fully_treatment.py).",
"fix": "Prefer the considered treatment unless disregarding changes the status (or report both), so FULLY's diagnostics agree with qcs_by_year and fully_insured_requirement.",
"source_text": "404.320(a): 'If benefits payable on your earnings record would be denied or reduced because of a period of disability, the period of disability will not be taken into consideration.' 404.110(c): 'we do not count as an elapsed year any year which is wholly or partly in a period of disability we established for you'."
},
{
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:1548",
"issue": "With no established period the DISABILITY scan runs past FRA, so a result can be insured at a post-FRA quarter while its DLI is capped before the FRA quarter (Act 223(c)(1)'s test has no FRA limit, so this is documentation).",
"counterexample": "Born 1950-02-02, 40 QCs 1975-1984, 3/yr 2010-2014, 4 in 2016-2017, onset 2015-01-15 not established, January 2018: DISABILITY True at 2017-01-01, DLI 1989-12-31 (own/probe_fra.py).",
"fix": "Cap the scan before FRA or document it."
},
{
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:451",
"issue": "A declared period end after the statutory end (month before FRA) is silently capped, while the same continuity date is rejected; no lawful filling has such an end.",
"counterexample": "Born 1950-06-15, onset 2010-01-15 established, end 2017-12-31: computes as if 2016-05-31; continues_through 2017-12-31 raises (own/end_after_fra.py).",
"fix": "Reject it or document the cap."
},
{
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:1186",
"issue": "Annual QCs in the birth year are capped at quarters from the birth quarter on; 404.146 has no such limit (the note calls it an interface premise). Infant earners only.",
"counterexample": "Born 2000-12-15, died 2003-03-10, 2000 wages $3,120, 2001:2: FULLY False 3/6 (2000 credited 1); 404.143(a) gives 4 and True (QC reviewer).",
"fix": "Drop the cap for annual credits or log it."
},
{
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:1108",
"issue": "Deferred conversion refusals are loose: post-2027 earnings below $1,970, non-decisive 1937 / pre-1951 SE / pre-1955 agricultural rows, and 1937 wages of $3,000 refuse, while the same year declared UNKNOWN computes. Rows are kept.",
"counterexample": "Born 1990-06-15, 4 QCs 2010-2027, July 2028, 2028 wages $1,969: qc_amount_year_unsupported; UNKNOWN 2028 computes (QC reviewer).",
"fix": "Refuse a deferred row only when its bounds disagree."
},
{
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:1557",
"issue": "Any declared past DIB or RIB month replaces the query-month event for CURRENTLY, so a worker who has re-earned status reads not currently insured (documented, but at odds with 'query month is a hypothetical entitlement month').",
"counterexample": "Born 1960-02-02, QCs 1983-1987:4 and 2008-2009:4, prior 1992-01-15..1994-12-31, January 2010: True 8/6; with dib_entitlement_month 1992-07-01: False 0 (own/lows2.py).",
"fix": "Keep the query quarter while no death is declared, or flag it."
},
{
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:553",
"issue": "Impossible entitlement events are accepted and decide CURRENTLY: DIB entitlement after FRA, RIB entitlement at 24.",
"counterexample": "Born 1940-02-02 (FRA August 2005), dib_entitlement_month 2010-01-01, QCs 2008:4, 2009:2, January 2012: CURRENTLY True 6 (own/lows2.py).",
"fix": "Reject them or document that they're unchecked."
},
{
"severity": "low",
"location": "tests/test_track_b_insured_status_sources.py:416",
"issue": "The README says the registry 'checks every published figure against its source', but only quote substrings are checked; expected/implemented values are read by no test, some quotes are too short ('6' x15), the Henry test feeds the published quarter to _assign_qcs, and the first-onset figures of RS 00301.140 ex. 6-9 and .147, the 12/93 used-freeze result and 404.115 columns III-V are asserted nowhere (all reproduce).",
"counterexample": "Changing poms_140_ralph required_qcs 12 to 13 passes every test (worked-examples reviewer).",
"fix": "Assert the registry values or narrow the claim; add the missing assertions."
},
{
"severity": "low",
"location": "tests/data/track_b/insured_status_examples.yaml:177",
"issue": "The Joseph (RS 00301.140 ex. 6) and Frank (RS 00301.147 ex. 3) 'erratum' labels overstate: the printed figures are exact for the printed placement, and moving a post-1977 QC into the period endpoint is 'only if necessary' and changes no status.",
"counterexample": "Joseph without the 1982 move gives 19 -> 18 / 9, the printed requirement (worked-examples reviewer).",
"fix": "Call them placement-dependent intermediate counts."
},
{
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:800",
"issue": "The pre-May-1983 subsequent-period refusal fires for any flagged prior, including an under-31 Rule II onset pre-1983 law decided, and no test exercises it (rows kept).",
"counterexample": "Born 1956-09-16, flagged prior 1978-10-02..1979-12-31, onset 1982-03-01, March 1982: refused though Rule II insures (worked-examples reviewer).",
"fix": "Limit it to onsets at 31 or later and test it."
},
{
"severity": "low",
"location": "docs/design/track_b_insured_status.md:863",
"issue": "The note cites uncommitted scratch/review files (lines 863, 1932, 2634, 2926, 3101). The PR body cites tests/data/track_b/insured_status_mutation_checks.json (moved to docs/design/track_b_insured_status_mutations.json; a test asserts the old path is gone), says 47 cases/26 computed (48/27), 'Four places ... none needs a ruling from Max' (ten register ids; the long-period refusal 'stands until Max rules'), and 'Each is a Hypothesis property'.",
"counterexample": "git ls-files scratch prints nothing.",
"fix": "Commit or drop the references; refresh the PR body."
},
{
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:1830",
"issue": "_prior_basis lets an unflagged prior of any date rest on the fully-insured-only blindness test, which RS 00301.150 A dates from benefits payable January 1973 (the module refuses current blindness before 1973).",
"counterexample": "Born 1930-02-02, unflagged prior 1965-01-01..1966-12-31, QCs 1952-1955 all quarters, January 1980: computes (FULLY False 16/26) where round 21's standard refuses (notes reviewer).",
"fix": "Offer that basis only from 1973 or refuse by name."
},
{
"severity": "low",
"location": "docs/design/track_b_insured_status.md:1709",
"issue": "The long-period register entry lists two readings; the round 17 text names and rejects a third (requirement min(half, 20) over the whole period) on arguable grounds, and glosses '20 of the last 40 ... as 404.130(d)(2) says' though the text has no 'last'. Production follows the statute where only the third parse insures.",
"counterexample": "Born 1960-02-02, flagged prior 1983-01-15..1983-06-30, QCs 1981:3, 1982:3, 1984-1986:4, 1987:1, 1993:1, onset 1993-10-15: Act 20/24, last-40 14/20, third parse 20/20; production false, and InvalidFamilyInput when established.",
"fix": "Add the third parse to the register for Max (d1920)."
},
{
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:635",
"issue": "fully_insured_requirement skips _validate_history's person checks (SSPA211 consistency, entitlement after the query, priors after onset), so it returns a number, or with UNKNOWN priors the named refusal, for inputs insured_status rejects as InvalidFamilyInput.",
"counterexample": "Born 1960-02-02, dib_entitlement_month 2006-01-01, query 2005-01-01: helper 23 (refusal with UNKNOWN priors); insured_status raises 'Entitlement follows query month' (contract reviewer, probe_fir_validation.py).",
"fix": "Run the same person and month validation in the helper."
},
{
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:772",
"issue": "A positive quarterly wage after the death quarter is an input error, though Act 213 only bars such a quarter from being a QC and RS 00301.240 contemplates wages paid around death; the captures don't settle post-death payment (Act 209 isn't captured), so the rule should refuse or exclude rather than reject.",
"counterexample": "Born 1930-02-02, died 1968-02-15, QC flags 1950-1967, 1968 quarterly_wages (7700, 100, 0, 0), January 1970, FULLY: InvalidFamilyInput; (7800, 0, 0, 0) computes with 1968 at (1, 1) (contract reviewer).",
"fix": "Exclude post-death quarters from QCs but keep the wages in the annual total, or refuse by name."
},
{
"severity": "nit",
"location": "src/populace_dynamics/track_b/insured_status.py:764",
"issue": "'declared after coverage ends' is also raised for flags before the birth quarter.",
"counterexample": "Any pre-birth flag in the birth year.",
"fix": "Name both bounds."
},
{
"severity": "nit",
"location": "src/populace_dynamics/track_b/_insured_status_qc.py:292",
"issue": "Unreachable _pre1978_taxable_qcs fills the 1971/72 bracket gap of 213(a)(2)(B)(iii) silently.",
"counterexample": "FY 1971-06..1972-05, SEI $7,800.",
"fix": "Note it."
},
{
"severity": "nit",
"location": "tests/data/track_b/insured_status_examples.yaml:582",
"issue": "The RS .340 short-year ceiling is cited to 213(a)(2)(B)(iii) (the gift rule) rather than the SEI cap RS .345 C.1 shows; RS .147 ex. 1's 'Mary had 8 QC's' (the record has 9) isn't logged.",
"counterexample": "Mary Brown first onset: 16/8 with 9 available.",
"fix": "Cite RS .345 C.1; log the slip."
},
{
"severity": "nit",
"location": "docs/design/track_b_insured_status.md:3013",
"issue": "'The 36 quarters from 1989Q2 through 1997Q4' is 35 (through 1998Q1); 'by at least 10 QCs' is stronger than its test; register entry 1's 'tries counting every prior period' is ambiguous.",
"counterexample": "1989Q2-Q4 plus 1990-1997 is 35.",
"fix": "Correct the wording."
},
{
"severity": "nit",
"location": "src/populace_dynamics/track_b/insured_status.py:1834",
"issue": "A prior no placement supports refuses as disability_boundary_assignments_unsupported, and a binding prior's basis split is reported as 'First insured start depends on annual placement'.",
"counterexample": "Born 1968 unflagged 1998 prior with a 2004 current period: start detail though the start is fixed.",
"fix": "Name the cause in the detail."
},
{
"severity": "nit",
"location": "PR #562 body (Invariants list)",
"issue": "'Disability insured implies fully insured' holds for each decision's own prerequisite, not across fields: DISABILITY at onset can be True while FULLY at the query is False (the note qualifies this; the PR body doesn't).",
"counterexample": "Born 1970-02-02, 4 QCs 1992-1996, onset 1997-01-15 not established, January 2015: DISABILITY True, FULLY False 20 of 23.",
"fix": "Qualify the PR body."
}
],
"needs_max": [
{
"id": "us:oasdi-insured-subsequent-special-long-period (Appendix B row 1)",
"assessment": "keep",
"more_than_one_defensible_reading": true,
"chosen_default_safer": true,
"reason": "Act clause (iii) has no cap and 404.130(d)(2) / RS 00301.147 B.2.a cap the test; refusing where the whole-period half and the last-40 reading differ is safer than computing, and Mary Brown prints no DLI. A third parse, min(half, 20) over the whole period, is linguistically plausible (under last-40 the cap adds nothing for RS 00301.147 B.1.b's workers); the note rejects it on arguable grounds and the register omits it. Where only it insures, the statute also denies, so production follows the controlling text. Add it to the register for Max's d1920 ruling.",
"source_text": [
"Act 223(c)(1)(B)(iii): 'not less than one-half of the quarters beginning after such individual attained age 21 and ending with the quarter in which such...'",
"404.130(d)(2): 'have QCs in at least one-half the calendar quarters in the period ... up to a maximum of 20 QCs out of 40 calendar quarters'"
],
"money_or_status": "The note's 1960 record: Act DLI 1991-12-31, last-40 1991-09-30; it now refuses. Third-parse record: Act 20/24, last-40 14/20, third parse 20/20; production false."
},
{
"id": "us:oasdi-insured-one-filling-first-start (Appendix B row 2)",
"assessment": "keep",
"more_than_one_defensible_reading": true,
"chosen_default_safer": true,
"reason": "Flexible per-determination assignment (RS 00301.230 B; 404.143(b)) and one consistent history (404.321(a), 404.320(b)(2)) are both defensible; the rule computes only results the unconstrained favorable search also gives and otherwise refuses, which is the safe default. The unflagged-prior bases follow 404.130(d)(1). Two applications are incomplete and are findings, not judgment: DISABILITY's qualifying quarter and count are held to the strict basis only (finding 4), and the completed current period loses its own 404.130(c)-only basis (finding 1). The favorable-earliest-start reading of an unrecorded prior onset gave no wrong output.",
"source_text": [
"RS 00301.230 B: 'Assignment of QCs is flexible. We can assign a QC to any quarter in the calendar year, subject to the limitations in RS 00301.240.'",
"404.321(a): 'Your period of disability begins on the day your disability begins if you are insured for disability on that day.'"
],
"money_or_status": "Round 22 record: 404.130(b) pins the 1998 QC in 1998Q1 (DLI 2007-12-31) against 2008-03-31 on past blindness; production refuses and the flagged twin computes 2008-03-31."
},
{
"id": "us:oasdi-insured-prior-disability-favorable-disregard (Appendix B row 3)",
"assessment": "resolve",
"more_than_one_defensible_reading": false,
"chosen_default_safer": true,
"reason": "404.130(f), 404.320(a) and 404.146(d)(2), with RS 00301.120 B.1.b, settle it: a period whose consideration would deny benefits is not taken into consideration, and its interior quarters can then be QCs. Example 9 tried only Rule II with the period counted. No judgment is needed.",
"source_text": [
"404.130(f): 'However, we will count all the quarters in the prior period of disability established for you if by doing so you would be entitled to benefits'"
],
"money_or_status": "Disregarding the period, 1983's two QCs move to Q3-Q4 and 1983Q3-1993Q2 holds 20 against 7 required: insured at 5/93. The $1,000-versus-$0 illustration is arithmetic only."
},
{
"id": "us:oasdi-insured-pre1951-seven-elapsed-years",
"assessment": "resolve",
"more_than_one_defensible_reading": false,
"chosen_default_safer": true,
"reason": "The captures agree once dated: 404.110(d)(1)(i) keeps the seven-year test, (d)(1)(ii) and RS 00301.315 B.1.b drop it for June-1992-or-later applications without section 227 entitlement. What is missing is the filing fact, and the named refusal already treats it as a missing fact. Separately, pre-1951 qc_quarters rows bypass this refusal (finding 8).",
"source_text": [
"Act 213(c): 'one quarter of coverage for each $400 of his total wages prior to 1951'"
],
"money_or_status": "1895 woman: six deemed QCs against one ordinary and a six-QC requirement; the seven-year route gives false and the 1990 route true, so the row refuses. Correct."
},
{
"id": "us:oasdi-insured-simplified-pre1951-disability-scope",
"assessment": "keep",
"more_than_one_defensible_reading": true,
"chosen_default_safer": true,
"reason": "Act 223(c)(1)(A) and 404.132 reach the fully insured prerequisite through section 214; RS 00301.315 B.1 excludes disability claims. Refusing wherever the aggregate could decide keeps the row.",
"source_text": [
"Act 223(c)(1)(A): 'he would have been a fully insured individual (as defined in section 414 of this title)'",
"404.132: 'we use the fully insured status requirements in § 404.110'"
],
"money_or_status": "Round 15's 1926 record: $6,000 refuses (15 + 22 = 37 of 37); $5,997 computes false (36)."
},
{
"id": "us:oasdi-insured-pre1956-alternate-any-quarter-scan",
"assessment": "keep",
"more_than_one_defensible_reading": true,
"chosen_default_safer": true,
"reason": "'Any quarter before 10/60' supports the literal scan; 'though under a disability ... for freeze or DIB' supports a period-limited scan. Refusing where they differ keeps the row.",
"source_text": [
"RS 00301.480 A: 'though under a disability, does not have 20/40 for freeze or DIB in any quarter before 10/60'"
],
"money_or_status": "None."
},
{
"id": "us:oasdi-insured-disability-period-endpoint-quarters",
"assessment": "resolve",
"more_than_one_defensible_reading": false,
"chosen_default_safer": true,
"reason": "Act 223(c)(1)'s last sentence, 404.130(f), 404.146(d)(1) and RS 00301.240 item 3 keep a credited first or last quarter; the POMS examples simply didn't place an annual QC there and their insured conclusions don't change. The registry's 'erratum' labels overstate this (low finding).",
"source_text": [
"404.130(f): 'unless the quarter is the first or last quarter of this period and the quarter is a QC'"
],
"money_or_status": "Joseph 20/10/16 versus printed 18/9; Frank 34/17/9 versus 33/16/8; insured answers unchanged."
},
{
"id": "us:oasdi-insured-historical-end-recovery-month",
"assessment": "resolve",
"more_than_one_defensible_reading": false,
"chosen_default_safer": true,
"reason": "404.321(b) fixes the two-month offset; paragraph (c) governs disabilities ending after November 1980, so the first (c) ending is February 1981. Arithmetic, not a conflict.",
"source_text": [
"404.321(b): 'the last day of the second month following the month in which your disability ended'"
],
"money_or_status": "End 1981-01-31 implies November 1980 recovery; the code's thresholds match (mutation recovery_cutoff_december_1980 killed)."
},
{
"id": "us:oasdi-insured-flag-first-insured-quarter",
"assessment": "resolve",
"more_than_one_defensible_reading": false,
"chosen_default_safer": true,
"reason": "A missing fact (when a flag's fully insured status began) inside a possibility proof; it can only keep rows.",
"source_text": [
"404.321(a): 'the first day of the first calendar quarter after your disability began in which you become insured for disability'"
],
"money_or_status": "None."
},
{
"id": "us:oasdi-insured-unknown-prior-historical-blindness",
"assessment": "resolve",
"more_than_one_defensible_reading": false,
"chosen_default_safer": true,
"reason": "A missing fact (past blindness) in an impossibility proof; letting the earliest UNKNOWN prior rest on fully insured status only weakens the proof. RS 00301.150 A dates the blindness-only test from 1973, which matters for listed priors (low finding), not for this proof.",
"source_text": [
"404.130(e): '(1) You are disabled by blindness ... and (2) You are fully insured.'"
],
"money_or_status": "None."
},
{
"id": "PR body: RS 00301.340 short taxable year ($10,900 versus $10,800)",
"assessment": "resolve",
"more_than_one_defensible_reading": false,
"chosen_default_safer": true,
"reason": "The printed $3,600 x 3 = $10,800 matches the 1973 SEI ceiling RS 00301.345 already shows, so '$10,900' is a label slip; both readings give 3 QCs and the public path refuses by name, which is loose but harmless.",
"source_text": [
"RS 00301.340 C.2: 'received $10,900 in SEI. Allocate $3,600 to each of the calendar quarters 03/1974, 12/1973 and 09/1973.'"
],
"money_or_status": "$100 of allocated SEI, 3 QCs either way; no status changes."
},
{
"id": "PR body / note: exit-year annual-count cap (coverage_end_month)",
"assessment": "resolve",
"more_than_one_defensible_reading": false,
"chosen_default_safer": false,
"reason": "The captures settle it against the cap: annual QCs are assignable to any begun quarter of the year and RS 00301.240 has no exit limit. The note calls it a non-statutory interface convention, but it changes counts, statuses and DLIs and drops lawful rows (finding 3). Max should either drop it or ratify it as an OP12 convention with a result flag.",
"source_text": [
"RS 00301.230 B: 'We can assign a QC to any quarter in the calendar year, subject to the limitations in RS 00301.240.'"
],
"money_or_status": "Executed: FULLY false 3 of 6 versus true 6 of 6 (2020 wages $6,000, February exit, 2024 query); an established 2021 period raises InvalidFamilyInput versus lawful."
},
{
"id": "ADD: a completed current period's 404.130(c)-only basis",
"assessment": "add",
"more_than_one_defensible_reading": false,
"chosen_default_safer": false,
"reason": "Missed application, settled by the sources: a period the rule itself begins on 404.130(c) alone opens Act 223(c)(1)(B)(iii) / 404.130(d) for later quarters at 31 or later (RS 00301.148 B.2.b). Where placement decides whether 404.130(b) also held at the start, the one-filling reading applies and the row should refuse by name (finding 1).",
"source_text": [
"RS 00301.148 B.2.b: 'If 20/40 is not met and either the NH is under age 31 or special insured status previously applied, determine date NH last meets...'"
],
"money_or_status": "Executed: exact DLI 2006-06-30 versus 2012-12-31."
},
{
"id": "ADD: pre-1951 qc_quarters rows and the Act 213(c) aggregate",
"assessment": "add",
"more_than_one_defensible_reading": true,
"chosen_default_safer": false,
"reason": "Flags declare credited quarters, not wages, so the aggregate is open on the record; the module reads a flag declaration as waiving the 213(c) route (note line 731) unless SIMPLIFIED_PRE1951, UNKNOWN or raw wages are declared. That is a defensible, disclosed interface reading, but RS 00301.315 B.1 applies the simplified method first and round 15's wording is broader than the code. Max should confirm it (and the note should tell callers) or require a refusal (finding 8).",
"source_text": [
"RS 00301.315 B.1.b: 'If we find the NH is not insured or deemed to have one QC before 1951 under the simplified method, examine their record for the...'"
],
"money_or_status": "Executed: John Doe as flags computes false 27 of 37; as $5,700 it refuses."
},
{
"id": "ADD: old-age requirement for men born before January 2, 1913 queried at 62-64",
"assessment": "add",
"more_than_one_defensible_reading": false,
"chosen_default_safer": false,
"reason": "404.110(b)(2)(iii)-(iv) and 404.115 Col. II (living worker) end the elapsed years at age 65 or 1975, not at the query year; the code's 'subject to earlier query' applies the (b)(3) death count to a living worker (finding 6).",
"source_text": [
"404.110(b)(2)(iv): 'The year you became age 65, if you are a man who became age 62 before 1973.'",
"404.115 note 1: 'living worker or worker who dies after reaching retirement age'"
],
"money_or_status": "Executed: born 1908, 20 QCs, December 1971: FULLY true 20 of 20 versus false, 22 required."
},
{
"id": "ADD: pre-1973 listed priors on the blindness-only basis",
"assessment": "add",
"more_than_one_defensible_reading": true,
"chosen_default_safer": false,
"reason": "RS 00301.150 A dates the fully-insured-only blindness test from benefits payable January 1973; _prior_basis offers it to priors of any date while the module refuses current blindness before 1973. Low (classification only).",
"source_text": [
"RS 00301.150 A: 'For benefits payable January 1973 or later, a statutorily blind worker no longer needs to meet a 20/40 or special insured status test.'"
],
"money_or_status": "Reviewer's 1965 prior record computes (FULLY false 16 of 26, DLI 1959-06-30) where the round 21 standard would refuse."
},
{
"id": "Appendix A add: prior-start assignments under UNKNOWN history",
"assessment": "resolve",
"more_than_one_defensible_reading": false,
"chosen_default_safer": true,
"reason": "Round 19 implemented it: under UNKNOWN priors or establishment a true status or lower date must hold on every annual placement with no period in force, and the Appendix A records now refuse by name. The qualifying quarter is not covered (finding 5).",
"source_text": [
"404.321(a)"
],
"money_or_status": "Executed: both Appendix A records refuse disability_boundary_assignments_unsupported, rows (1, 5/2) kept."
}
]
}Generated by Claude Code |
An independent review of 7b5b126 asked for changes on seven mediums, 17 lows and six nits (PR comment 6596920658). A current period the rule began before 31 on 404.130(c) alone now carries the 404.130(d)(1) flag for the quarters after it, so the review's record (born 1980-02-02) gets a date last insured of 2012-12-31 where 7b5b126 gave 2006-06-30. Where placement or an UNKNOWN year decides that basis and the dates differ, the date refuses by name. Periods may share a quarter but not a day (404.321(a); RS 00301.140 example 7), so the overlap search, I13, B15 and the flag-first-insured-quarter register entry go. An exit or a birth bars no quarter of its own year (RS 00301.230 B). DISABILITY reports the earliest first insured quarter a kept filling attains; its range spans a binding prior's bases, naming prior_disability_period_basis, and reaches the onset quarter under UNKNOWN priors. A living man born before 1913 counts elapsed years to 65 or 1975 (404.110(b)(2)(iii)-(iv)). A flagged prior needs one placement that passes a special route and fails 404.130(b). A listed prior no completion supports refuses before any input error, past blindness begins a listed prior only from 1973, and a listed pre-1956 prior can rest on RS 00301.480 B.1. Lows 12, 16, 19, 23 and 24 and nit 25 change code, each with a test. The design note answers the rest and records round 23, its renames and retirements, and the 99 mutations with their local kills. The tier counts add 80 unit tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
At 8522452, test_the_note_cites_only_tests_that_exist searched every folder under tests/ and read each module it found, though blind roles run these modules. It now lists only the tests folder and opens only the design note and the insured status modules, and test_the_note_check_reads_only_the_note_and_insured_modules checks each Path listing and open before it runs. Six local mutations of the check fail that guard, with no restricted open. Two of round 23's property tests drew 25 random records, and 7b5b126 fails only 568 of the M1 differential's 11,700 and 90 of the exit-month test's 300, so a run could miss the bite. Each now runs an explicit example that 7b5b126 fails, and against 7b5b126 42 of round 23's 67 cases fail on every run. All three property tests pass on every input of their strategies at this head. The tier files add the guard (25,526 unit), and the README total, which missed round 23's 80 tests, reads 32,125. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The rulespec-us issue draft said malformed input must fail before any coverage refusal, which round 23's precedence contradicts: a listed prior that no completion supports now refuses by name before the rule calls a later period impossible. The draft now states the contract the rule keeps: a declaration that contradicts itself fails before the rule runs, and otherwise an input error means every filling is invalid. Its long-period bullet named two readings, and round 23 lists a third parse for Max under d1920. It now names all three and says what the Python rule does with each. The design note's scope line also gets back the spaces in "pinned 413, 414 and 423(c)(1) rules". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d 23) A pre-screen of 8522452 found three lows and two nits, and tried twelve mutations of its own. Person.__post_init__ still capped a listed prior's end at the month before FRA, while round 23 made the same end on the current period an input error. 404.321(c)(1), and 404.321(b) for a disability that ended before December 1980, end every period by then, so a later declared end has no lawful filling. Both now raise InvalidFamilyInput. Round 3's tests and the historical boundary lattice declared such ends, so they now check that the latest lawful end constructs and a later one raises, and the lattice ends the 1890 cohort's prior by January 1955. Three round 23 branches had no test that failed when they broke. A death later in the query month now keeps the living count under 404.110(b)(2)(iv) (test_a_death_after_the_query_keeps_the_living_count). A period that begins in the quarter its holder attains 31 rests on 404.130(d), not 404.130(c) (test_a_period_begun_in_the_age_31_quarter_rests_on_paragraph_d). An open flag never flags the current period, so where every placement meets 404.130(b) in its first quarter, 404.130(d) doesn't reach the quarters after it (test_an_open_flag_keeps_paragraph_b_where_every_placement_meets_it). Each fails when a mutation breaks its branch. The current-period comment and the low 12 test cited 404.321(b) for the FRA end; they now cite 404.321(c)(1). The RS 00301.340 note in the examples gets back its dollar amounts, and the Joseph note no longer breaks mid-sentence. The unit tier rises by the three new tests (26,323 unit, 33,178 in all). The design note records the changes, eight new mutations (107 in all) and the counts against 7b5b126 (44 of round 23's 70 cases fail). It also accounts for the pre-screen's twelve mutations. Ten fail named tests. Two survive every insured status module. One changes no answer across 1,500 generated blind records. Every change the other makes across 11,000 generated records turns a refusal into a result, and the stress oracle accepts each result it can judge on both cap readings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
) The stress oracle's `last_insured` tested every quarter from the first credit through the query and kept the latest one that insures an onset. It now scans down from the query and stops at the first insured quarter. The stress module ran about an hour on CI, enough to push shard 4 past its time limit. Locally its first 40 tests drop from 1,008 to 164 CPU seconds, and all 52 pass in under six minutes. `full_scan_last_insured` keeps the old scan, and `test_status_stress_last_insured_matches_a_full_scan` checks that both scans return the same quarter. The test draws records from the base, entitlement-month, under-31 and subsequent-special generators. On two credit placements of each, it compares the scans with and without the declared periods, with and without the subsequent-special route, and under both readings. An upward scan that keeps the first insured quarter fails it, and so does a downward scan that skips the query quarter. The design note names the test, and the unit tier rises to 26,324. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The head moves from fc689ec to f32d881. CI's shard 4 timed out at fc689ec because the status stress module ran about an hour, most of it in the oracle's Brief 6871 reviews f32d881, and brief 6870 runs the mutation list there along with two mutations of the new scan. They replace 6641 and 6640, which posted nothing on fc689ec. |
|
Ready for hub review One new medium blocks approval; every earlier medium is resolved at this head. Earlier findings (Appendices A, C, D, E, F)
This review's findings
Verdict JSON{
"verdict": "REQUEST_CHANGES",
"head": "fc689ecbd4474e505e9b62070039b6de4820b6e7",
"reviewer": "cloud Opus 5.5, independent review",
"summary": "I reviewed the whole diff (105 files) at fc689ecb, every finding in Appendices A, C, D, E and F, the captured statute, CFR and POMS text, and the published examples. All 45 required modules pass (7,396 tests) under an audit hook that blocked and logged zero barred-path reads; black and ruff are clean on the 49 changed Python files; the 48 captures match their manifest; no protected or stray file is in the diff, and git status stayed empty. Sol's round-14 medium and the medium findings of the three cloud reviews are fixed: every counterexample and nearby variant I rebuilt now gives the lawful value or a named refusal that keeps its row. Of the 46 earlier items, 42 are resolved; 4 lows remain (L10, L14, an open RIB-month question, and one surviving refusal-only mutation). An independent oracle written from the CFR agrees with 355 computed random records (known and UNKNOWN years, listed and flagged priors, established periods with known and unknown ends, blindness, both long-period readings), with no mismatch. Eleven of my twelve mutations fail a named test. One new medium: an established current period that no completion can insure raises InvalidFamilyInput, dropping the row, when an UNKNOWN year decides whether a listed prior has any supporting placement, though the completions that leave the prior unsupported refuse by name. No population claim, real data, network fetch of sources or tracked-file change.",
"sol_findings": [
{
"source": "A (Sol r14)",
"severity": "medium",
"location": "src/populace_dynamics/track_b/insured_status.py:1845 at 129d44bd",
"issue": "Prior establishment can force an annual QC's quarter, so the no-period witness under UNKNOWN priors or establishment gave a wrong CURRENTLY status and DLI lower bounds.",
"resolved": true,
"evidence": "PYTHONPATH=$PWD/scratch/review/audit_site:$PWD/src:$PWD POPULACE_DYNAMICS_EPUF_DIR=/nonexistent/review-data POPULACE_DYNAMICS_PSID_DIR=/nonexistent/review-data $PY scratch/review/prior/appA.py: all 13 variants (the DLI record with known and UNKNOWN ending, UNKNOWN 2004, both, UNKNOWN establishment, every UNKNOWN fact, onset day 15, the frozen 2027 exit, ALL; the CURRENTLY record, ALL, UNKNOWN end, frozen exit) now refuse by name (disability_boundary_assignments_unsupported 'Annual placement decides ... across the unknown periods', or unknown_prior_disability_periods_decide_status, or sspa211_applicability_unknown), each 1 row of weight 5/2. _settle_every_history (src/populace_dynamics/track_b/insured_status.py:2585) now asks every placement, with no period in force, to attain each true status and the lower date. Mutation r1 (skip its date check) fails test_a_prior_can_undercut_the_date[known_end]."
},
{
"source": "C",
"severity": "medium",
"location": "src/populace_dynamics/track_b/insured_status.py:1721-1801 at 38a573a8",
"issue": "An unflagged listed prior was held only to the past-blindness basis, so a true status or DLI stood on the blind completion alone.",
"resolved": true,
"evidence": "PYTHONPATH=$PWD/scratch/review/audit_site:$PWD/src:$PWD POPULACE_DYNAMICS_EPUF_DIR=/nonexistent/review-data POPULACE_DYNAMICS_PSID_DIR=/nonexistent/review-data $PY scratch/review/prior/appCDE.py: the 1955 record (DISABILITY, ALL), its 2008 onset, UNKNOWN 2005 and a 2004 current period each refuse disability_boundary_assignments_unsupported 'Annual placement decides a listed prior's first insured quarter', 1 row, weight 5/2."
},
{
"source": "C",
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:1761 at 38a573a8",
"issue": "A listed prior no placement supports was treated as unconstrained and computed.",
"resolved": true,
"evidence": "appE2.py (E7) and appE_lows.py (L21) print 'No annual placement supports a listed prior's first insured quarter' refusals that keep the row (_prior_basis, insured_status.py:1965)."
},
{
"source": "D",
"severity": "medium",
"location": "src/populace_dynamics/track_b/insured_status.py:1788-1841 at f37f7f79",
"issue": "An unflagged prior's nonblind basis admitted 404.130(c) alone, hiding the 404.130(b) placement constraint.",
"resolved": true,
"evidence": "appCDE.py: the 1968 record for DISABILITY, ALL, a 2008 onset, UNKNOWN 2005, the frozen 2027 exit, a 2004 current period and UNKNOWN establishment all refuse by name, 1 row each; flagged, it computes subsequent_special 20/20 with DLI 2008-03-31, which the review called right. _witness keeps 404.130(c) to flagged priors (insured_status.py:1373-1377)."
},
{
"source": "D",
"severity": "low",
"location": "docs/design/track_b_insured_status.md 'Listed priors' at f37f7f79",
"issue": "The note didn't say a listed prior's start reads as the favorable earliest insured quarter from an unrecorded onset.",
"resolved": true,
"evidence": "The one-filling register entry says so (docs/design/track_b_insured_status.md:1757-1760)."
},
{
"source": "E M1",
"severity": "medium",
"location": "src/populace_dynamics/track_b/insured_status.py:1684 at 7b5b126a",
"issue": "A current period begun on 404.130(c) alone was appended unflagged, so later quarters lost 404.130(d) and the DLI came years early.",
"resolved": true,
"evidence": "appCDE.py: born 1980-02-02, onset 2003-01-15, end 2004-12-31, January 2013: DLI [2012-12-31, 2012-12-31]; frozen 2027 exit 2012-12-31; UNKNOWN end [2004-12-31, 2013-03-31] censored; the second record 2016-03-31 censored. Mutation r3 (return None for a (c)-only start) fails test_a_period_begun_on_paragraph_c_alone_opens_paragraph_d_after_it."
},
{
"source": "E M2",
"severity": "medium",
"location": "src/populace_dynamics/track_b/insured_status.py:536 at 7b5b126a",
"issue": "A current period beginning in the quarter a prior ended raised InvalidFamilyInput (RS 00301.140 example 7, Jane).",
"resolved": true,
"evidence": "appCDE.py: Jane established computes, start 1990-12-03, DISABILITY true 6/6; not established computes too; a shared day still raises (test_periods_still_may_not_share_a_day)."
},
{
"source": "E M3",
"severity": "medium",
"location": "src/populace_dynamics/track_b/_insured_status_qc.py:196 at 7b5b126a",
"issue": "A mid-year exit capped the exit year's annual QCs at the exit quarter.",
"resolved": true,
"evidence": "appE2.py: (a) February exit FULLY true 6/6, the December result; (b) April 2005 exit true 40/39; (c) April and December exits both refuse unknown_earnings_years_decide_status; (d) the established 2021 record no longer raises: with ALL it refuses ongoing_disability_period_dli_horizon_unsupported, row kept."
},
{
"source": "E M4",
"severity": "medium",
"location": "src/populace_dynamics/track_b/insured_status.py:2156 at 7b5b126a",
"issue": "With a binding listed prior, DISABILITY's qualifying quarter came from the first tied filling and only the strict basis.",
"resolved": true,
"evidence": "appE2.py: (a) qualifying 2007-01-01, and the established start 2007-01-01; (b) qualifying 2008-04-01 with upper 2008-01-01 and unknown_facts prior_disability_period_basis; the 1955 count 20..21."
},
{
"source": "E M5",
"severity": "medium",
"location": "src/populace_dynamics/track_b/insured_status.py:2246 at 7b5b126a",
"issue": "Under UNKNOWN priors DISABILITY's qualifying quarters were the no-prior world's.",
"resolved": true,
"evidence": "appE2.py E5: qualifying 2007-04-01, upper 2007-01-01 (the onset quarter); established, start None with current_disability_period_start listed unknown. Mutation r11 fails test_unknown_priors_reach_the_onset_quarter."
},
{
"source": "E M6",
"severity": "medium",
"location": "src/populace_dynamics/track_b/insured_status.py:616 at 7b5b126a",
"issue": "A living man born before 1913 queried at 62-64 got the death count of elapsed years.",
"resolved": true,
"evidence": "appE2.py: born 1908-07-01, Dec 1971 FULLY false 20/22 (also with an RIB month), Dec 1973 22; born 1912-07-01 Dec 1974 false 23/24; a woman true 20/19; fully_insured_requirement 22, 22, 24."
},
{
"source": "E M7",
"severity": "medium",
"location": "src/populace_dynamics/track_b/insured_status.py:1817 at 7b5b126a",
"issue": "A flagged prior's two halves were tested on different placements, so UNKNOWN establishment computed a flag no placement supports.",
"resolved": true,
"evidence": "appE2.py E7: UNKNOWN, true and false establishment each refuse 'No annual placement supports a listed prior's first insured quarter', 1 row, weight 5/2."
},
{
"source": "E L8",
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:838 at 7b5b126a",
"issue": "Pre-1951 years declared as QC flags add nothing to the 213(c) aggregate, undisclosed.",
"resolved": true,
"evidence": "appE_lows.py: John Doe with 1949 flags computes FULLY false 27/37; $5,700 of 1949 wages or an UNKNOWN 1949 refuse simplified_pre1951_unsupported; the SIMPLIFIED_PRE1951 row (docs/design/track_b_insured_status.md:768) says flags waive the route."
},
{
"source": "E L9",
"severity": "low",
"location": "docs/design/track_b_insured_status.md:1487 at 7b5b126a",
"issue": "Five places misdated the male age-65 cohort and asserted an uncaptured GIF reading.",
"resolved": true,
"evidence": "docs/design/track_b_insured_status.md:1528-1540, the YAML (761-767), the sources README (69-76) and test_rs00301_800_pdf_footnote_misdates_the_male_age_65_cohort now follow 404.110(b)(2)(iii)-(iv) and claim no GIF reading. The PR body's Differentials bullet still says the GIF and 404.132(b) say 1913 (my nit 4)."
},
{
"source": "E L10",
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:1374 at 7b5b126a",
"issue": "FULLY reports the disregard treatment's count and requirement by larger margin, beside a mapping and helper that consider the period.",
"resolved": false,
"evidence": "appE_lows.py L10: FULLY true 64 of 23 while qcs_by_year[1995] is (2, 2), the years sum to 62 and fully_insured_requirement is 22. Behaviour unchanged; docs/design/track_b_insured_status.md:487-496 now discloses it. Status unaffected."
},
{
"source": "E L11",
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:1548 at 7b5b126a",
"issue": "With no established period the DISABILITY scan runs past FRA.",
"resolved": true,
"evidence": "appE_lows.py L11: DISABILITY true at 2017-01-01 beside DLI 1989-12-31; the DLI row (docs/design/track_b_insured_status.md:604) documents it, which the fix allowed."
},
{
"source": "E L12",
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:451 at 7b5b126a",
"issue": "A declared period end after the statutory end was capped silently.",
"resolved": true,
"evidence": "appE_lows.py: a current end and a listed prior's end of 2017-12-31 (born 1950-06-15) raise InvalidFamilyInput; 2016-05-31 constructs."
},
{
"source": "E L13",
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:1186 at 7b5b126a",
"issue": "Annual QCs in the birth year were capped at quarters from the birth quarter.",
"resolved": true,
"evidence": "appE_lows.py L13: born 2000-12-15, $3,120 of 2000 wages, March 2003: FULLY true 6/6."
},
{
"source": "E L14",
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:1108 at 7b5b126a",
"issue": "Deferred conversion refusals are looser than the same year declared UNKNOWN.",
"resolved": false,
"evidence": "appE_lows.py L14: 2028 wages of $1,969 refuse qc_amount_year_unsupported while an UNKNOWN 2028 computes FULLY true 72..75/16. Behaviour unchanged; docs/design/track_b_insured_status.md:658-661 calls it conservative. Rows kept."
},
{
"source": "E L15",
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:1557 at 7b5b126a",
"issue": "A declared past DIB or RIB month replaces the query event for CURRENTLY, at odds with the docstring.",
"resolved": true,
"evidence": "appE_lows.py L15: true 8/6 without the month, false 0/6 with DIB 1992-07; the module docstring (lines 58-62) now states the replacement, so text and behaviour agree."
},
{
"source": "E L16",
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:553 at 7b5b126a",
"issue": "Impossible entitlement events were accepted.",
"resolved": true,
"evidence": "appE_lows.py L16: DIB after FRA and RIB at 24 raise InvalidFamilyInput."
},
{
"source": "E L17",
"severity": "low",
"location": "tests/test_track_b_insured_status_sources.py:416 at 7b5b126a",
"issue": "The README claimed every published figure is checked though only quotes are.",
"resolved": true,
"evidence": "README lines 14-18 now say the expected and implemented fields are for review and no test reads them, which the fix allowed."
},
{
"source": "E L18",
"severity": "low",
"location": "tests/data/track_b/insured_status_examples.yaml:177 at 7b5b126a",
"issue": "The Joseph and Frank entries were labelled errata.",
"resolved": true,
"evidence": "YAML 203-205 and 342-346 call them placement-dependent intermediate counts."
},
{
"source": "E L19",
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:800 at 7b5b126a",
"issue": "The pre-May-1983 subsequent-period refusal fired for any flagged prior.",
"resolved": true,
"evidence": "prior/l19.py: an under-31 onset after a flagged 1978 prior computes Rule II, 9 QCs of 6, in March 1982; a holder 31 in 1982Q3 refuses subsequent_special_before_1983_unsupported."
},
{
"source": "E L20",
"severity": "low",
"location": "docs/design/track_b_insured_status.md:863 at 7b5b126a",
"issue": "The note cited scratch files and the PR body was stale.",
"resolved": true,
"evidence": "test_the_note_cites_only_tests_that_exist asserts no 'scratch/' and that every cited test exists (passed); the PR body cites docs/design/track_b_insured_status_mutations.json and 48 entries, 27 computed, which the YAML holds."
},
{
"source": "E L21",
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:1830 at 7b5b126a",
"issue": "Past blindness could begin an unflagged prior of any date.",
"resolved": true,
"evidence": "appE_lows.py L21: a 1965 unflagged prior refuses 'No annual placement supports a listed prior's first insured quarter'."
},
{
"source": "E L22",
"severity": "low",
"location": "docs/design/track_b_insured_status.md:1709 at 7b5b126a",
"issue": "The long-period register omitted a third parse that alone insures the review's record.",
"resolved": true,
"evidence": "The entry now lists it for Max (docs/design/track_b_insured_status.md:1766-1775); appE_lows.py L22 reproduces DISABILITY false 14/20 and InvalidFamilyInput when established, as the entry says. I question the default in needs_max."
},
{
"source": "E L23",
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:635 at 7b5b126a",
"issue": "fully_insured_requirement skipped insured_status's person checks.",
"resolved": true,
"evidence": "appE_lows.py L23: raises 'Entitlement follows query month'."
},
{
"source": "E L24",
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:772 at 7b5b126a",
"issue": "A wage paid after the death quarter was an input error.",
"resolved": true,
"evidence": "appE_lows.py L24: (7700, 100, 0, 0) after a February 1968 death computes FULLY true 73/16, the same as (7800, 0, 0, 0)."
},
{
"source": "E N25",
"severity": "nit",
"location": "src/populace_dynamics/track_b/insured_status.py:764 at 7b5b126a",
"issue": "The after-coverage message was raised for pre-birth flags.",
"resolved": true,
"evidence": "appE_lows.py L25: 'Quarterly QCs declared before birth'."
},
{
"source": "E N26",
"severity": "nit",
"location": "src/populace_dynamics/track_b/_insured_status_qc.py:292 at 7b5b126a",
"issue": "The fiscal helper filled the 1971-72 gap silently.",
"resolved": true,
"evidence": "_insured_status_qc.py:291-294 names the gap."
},
{
"source": "E N27",
"severity": "nit",
"location": "tests/data/track_b/insured_status_examples.yaml:582 at 7b5b126a",
"issue": "The short-year ceiling cited the wrong clause and Mary's count slip wasn't logged.",
"resolved": true,
"evidence": "YAML 593-597 cites RS 00301.345 B.2.g; 295-297 logs 8 printed against 9 in the pattern."
},
{
"source": "E N28",
"severity": "nit",
"location": "docs/design/track_b_insured_status.md:3013 at 7b5b126a",
"issue": "A quarter count and two phrases were wrong.",
"resolved": true,
"evidence": "docs/design/track_b_insured_status.md:3081-3082 now says 36 quarters from 1989Q2 through 1998Q1, which is 36."
},
{
"source": "E N29",
"severity": "nit",
"location": "src/populace_dynamics/track_b/insured_status.py:1834 at 7b5b126a",
"issue": "Refusal details didn't name the listed prior.",
"resolved": true,
"evidence": "Details now read 'No annual placement supports a listed prior's first insured quarter' and 'Annual placement decides a listed prior's first insured quarter'."
},
{
"source": "E N30",
"severity": "nit",
"location": "PR #562 body at 7b5b126a",
"issue": "'Disability insured implies fully insured' was unqualified.",
"resolved": true,
"evidence": "The body now ties it to the qualifying quarter and gives the FULLY-at-later-query counterexample."
},
{
"source": "F M",
"severity": "medium",
"location": "tests/test_track_b_insured_status_fix_round_23.py:1287 at 8522452c",
"issue": "The note check read every tests/**/*.py, including barred folders.",
"resolved": true,
"evidence": "It globs only test_track_b_insured_status*.py (round_23.py:1393) behind a read guard (1402). My sitecustomize audit hook, which blocks and logs any open, listdir or scandir of a barred path in every process, logged 0 across all 45 gate modules, round 23's included."
},
{
"source": "F L1",
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:530 at 8522452c",
"issue": "A listed prior's end past the FRA end was capped silently while the current period's raised.",
"resolved": true,
"evidence": "appE_lows.py L12: both raise InvalidFamilyInput."
},
{
"source": "F L2",
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:641 and :1666 at 8522452c",
"issue": "The living test and the age-31 bound had no failing test under mutation.",
"resolved": true,
"evidence": "mut f_m4_living_ignores_death fails test_a_death_after_the_query_keeps_the_living_count; f_m8_age31_quarter_flags fails test_a_period_begun_in_the_age_31_quarter_rests_on_paragraph_d; tree clean after each revert."
},
{
"source": "F N1",
"severity": "nit",
"location": "tests/data/track_b/insured_status_examples.yaml:593 at 8522452c",
"issue": "The RS 00301.340 note had lost its dollar amounts and the Joseph note broke mid-sentence.",
"resolved": true,
"evidence": "Line 593 reads 'The capture labels $10,900 as SEI but prints $3,600 for each of three'; 203-205 wrap."
},
{
"source": "F N2",
"severity": "nit",
"location": "src/populace_dynamics/track_b/insured_status.py:496 at 8522452c",
"issue": "Two comments cited 404.321(b) for the FRA end.",
"resolved": true,
"evidence": "insured_status.py:496 and round_23.py:1235 cite 404.321(c)(1)."
},
{
"source": "F uncertain a",
"severity": "uncertain",
"location": "src/populace_dynamics/track_b/insured_status.py:642",
"issue": "Which count applies to a man who dies within the query month.",
"resolved": true,
"evidence": "Documented reading (docs/design/track_b_insured_status.md:3417-3423) pinned by test_a_death_after_the_query_keeps_the_living_count; no captured source decides it."
},
{
"source": "F uncertain b",
"severity": "uncertain",
"location": "src/populace_dynamics/track_b/insured_status.py:581-586",
"issue": "Whether an RIB month can be the month a first-of-month birth attains 62.",
"resolved": false,
"evidence": "Born 1940-03-01 with RIB 2002-02 still constructs; docs/design/track_b_insured_status.md:3501-3505 waits on a capture of Act 202(a). Open, low."
},
{
"source": "F uncertain c",
"severity": "uncertain",
"location": "src/populace_dynamics/track_b/insured_status.py:2541",
"issue": "_settle_current_basis reads the flag only at the lower completions' start.",
"resolved": true,
"evidence": "insured_status.py:3285 refuses unknown_earnings whenever the lower and upper starts differ, so they coincide; mutation r5 (drop the upper credits from the basis check) fails test_a_placement_or_year_that_decides_the_basis_refuses."
},
{
"source": "F survivor M1",
"severity": "survivor",
"location": "src/populace_dynamics/track_b/insured_status.py:1719",
"issue": "Reading an open flag as special survived.",
"resolved": true,
"evidence": "mut f_m1_open_flag_as_special fails test_an_open_flag_keeps_paragraph_b_where_every_placement_meets_it."
},
{
"source": "F survivor M9",
"severity": "survivor",
"location": "src/populace_dynamics/track_b/insured_status.py:1667",
"issue": "Dropping blindness from _current_period_special survived.",
"resolved": true,
"evidence": "Equivalent: a blind holder's DISABILITY witness takes blindness_fully_only alone (_witness, insured_status.py:1333-1352), so the period's flag is inert; the note (3668-3672) reports no changed answer over 1,500 blind records."
},
{
"source": "F survivor M12",
"severity": "survivor",
"location": "src/populace_dynamics/track_b/insured_status.py:2329-2332",
"issue": "Reading an open flag as closed in the first-start search survived.",
"resolved": false,
"evidence": "Still survives by the note's account (3673-3686); it only turns refusals into results the stress oracle accepts. No wrong output found; that refusal branch stays unpinned."
}
],
"executed": [
{
"command": "git worktree add --detach ../pr fc689ecb; git rev-parse HEAD; git check-ignore -q scratch/review/x; git diff --stat origin/master...HEAD | tail -1",
"result": "fc689ecbd4474e505e9b62070039b6de4820b6e7; ignored; 105 files changed, 62067 insertions(+), 13 deletions(-)"
},
{
"command": "uv venv -p 3.14 /tmp/rvenv; uv pip install pytest==9.1.1 hypothesis==6.168.3 pytest-xdist numpy==2.5.1 pandas==3.0.3 scipy==1.18.0 scikit-learn==1.9.0 pyyaml==6.0.3 openpyxl==3.1.5 black==26.5.1 ruff==0.15.20",
"result": "CPython 3.14.6; package not installed"
},
{
"command": "scratch/review/run_gates.sh (per module: PYTHONPATH=audit_site:src:. OMP_NUM_THREADS=1 POLARS_MAX_THREADS=1 OMP_WAIT_POLICY=PASSIVE, both data roots /nonexistent/review-data, python -m pytest -q -p no:cacheprovider -n 4 <module>)",
"result": "45 modules, all exit 0, 7,396 passed: the 40 tests/test_track_b_insured_status*.py modules (round 23: 70, status_stress: 51, classification_oracle: 202, qc: 310, sources: 159, ...), input_schema 742, refusal_notes 21, gross_benefits round_13_audit 1168, round_15_arguments 346, round_15_receivers 3187. Audit hook (sitecustomize in every process, blocking open/listdir/scandir of barred paths): 0 blocked; only xdist spawns logged."
},
{
"command": "black -l 79 --check and ruff check --no-cache on git diff --name-only origin/master...HEAD -- '*.py'",
"result": "49 files unchanged; All checks passed"
},
{
"command": "git diff --name-only origin/master...HEAD",
"result": "No gates.yaml, engine/loop.py, engine/steps.py or runs/*.json; no scratch, report or bundle file"
},
{
"command": "python -I (manifest check) in tests/data/track_b/insured_status_sources",
"result": "48 captures: bytes and SHA-256 match, URL and retrieval time present, none unlisted"
},
{
"command": "PYTHONPATH=$PWD/scratch/review/audit_site:$PWD/src:$PWD POPULACE_DYNAMICS_EPUF_DIR=/nonexistent/review-data POPULACE_DYNAMICS_PSID_DIR=/nonexistent/review-data $PY scratch/review/contract_probe.py",
"result": "datetime month, OrderedDict and dict-subclass years, bool counts, float wages and str test raise InvalidFamilyInput; pickle, copy, deepcopy and direct construction of results raise; an input error raised in compute propagates; a foreign refusal class is rejected"
},
{
"command": "PYTHONPATH=$PWD/scratch/review/audit_site:$PWD/src:$PWD POPULACE_DYNAMICS_EPUF_DIR=/nonexistent/review-data POPULACE_DYNAMICS_PSID_DIR=/nonexistent/review-data $PY scratch/review/prior/appA.py, appCDE.py, appE2.py, appE_lows.py, l19.py; scratch/review/appB_examples.py",
"result": "As in sol_findings and needs_max"
},
{
"command": "PYTHONPATH=$PWD/scratch/review/audit_site:$PWD/src:$PWD POPULACE_DYNAMICS_EPUF_DIR=/nonexistent/review-data POPULACE_DYNAMICS_PSID_DIR=/nonexistent/review-data $PY scratch/review/fuzz_oracle.py 2 400; fuzz2.py 13 60; fuzz2.py 14 60",
"result": "Independent oracle (scratch/review/oracle.py, no production import): 304 + 25 + 26 computed records agree, 112 refused by name, 53 input errors the oracle also finds invalid, 0 mismatches, 0 input errors with a valid world. A partial seed-11 run flagged one record whose UNKNOWN-2001 completions refuse by the long-period name; case46b.py shows both readings' dates for every completion lie inside the computed [2000-12-31, 2010-12-31]."
},
{
"command": "PYTHONPATH=$PWD/scratch/review/audit_site:$PWD/src:$PWD POPULACE_DYNAMICS_EPUF_DIR=/nonexistent/review-data POPULACE_DYNAMICS_PSID_DIR=/nonexistent/review-data $PY -m pytest -q -p no:cacheprovider -n 3 scratch/review/test_review_properties.py",
"result": "3 passed: determinism and order independence (priors and years reversed), refused and computed rows keep their weight in count_family_outcomes, one more QC never removes a status without periods"
},
{
"command": "scratch/review/mut/run_mutation.sh <name> (apply, fast modules -x -n 4, then round 23, classification oracle, status oracle, round 2; git checkout -- <file>; git status --porcelain)",
"result": "r1 no_unknown_history_dli_check: test_a_prior_can_undercut_the_date[known_end] fails; r2 worst_filling_earliest_everywhere: round 18 and round 15 tests fail; r3 c_only_period_left_open: test_a_period_begun_on_paragraph_c_alone_opens_paragraph_d_after_it fails; r4 window_drops_endpoint_qcs: two round 14 tests fail; r5 basis_check_ignores_upper_credits: test_a_placement_or_year_that_decides_the_basis_refuses fails; r6 flag_fits_skips_start_year: SURVIVED (stress module not run); r7 start_is_quarter_even_in_onset_quarter: 4 fail; r8 fra_cohort_ignores_jan1_rule: 2 round-3 tests fail; r9 flag_binds_only_on_placement: test_a_special_prior_stays_short_of_the_ordinary_rule fails; r10 events_stop_before_fra_quarter: test_fra_ending_month_does_not_imply_recovery[True] fails; r11 unknown_qualifying_not_widened: test_unknown_priors_reach_the_onset_quarter fails; r12 settle_fillings_accepts_any_joint: 2 fail. Pre-screen branches f_m4, f_m8, f_m1 fail their named round-23 tests. git status empty after every revert."
},
{
"command": "PYTHONPATH=$PWD/scratch/review/audit_site:$PWD/src:$PWD POPULACE_DYNAMICS_EPUF_DIR=/nonexistent/review-data POPULACE_DYNAMICS_PSID_DIR=/nonexistent/review-data $PY scratch/review/unsupported_completion.py; scratch/review/mut/r6_case.py (head, then under r6)",
"result": "Medium finding: the UNKNOWN record raises InvalidFamilyInput while its unsupported-prior completions refuse by name; r6 flips the flagged record to a refusal"
},
{
"command": "Hand re-derivations",
"result": "RS 00301.147 Mary Brown 32/16/16 at 11/2/82 (and 33/16, 34/17 later: derived DLI 1983-03-31), John Jones 33/16 with 18, Frank Smith 34/17/9; RS 00301.140 example 9 Sam 20 of 1983Q3-1993Q2 on disregard; 2027 QC $250 x 72,800.33 / 9,226.48 = $1,972.59, rounding to $1,970. The tests assert these figures and the sources test checks each quote against its capture."
}
],
"findings": [
{
"severity": "medium",
"location": "src/populace_dynamics/track_b/insured_status.py:1971 (_refuse_unsupported_priors), :1923-1929 and :2032-2080 (_prior_basis and _flag_fits test support on some completion), :3172-3185",
"issue": "An established current period that no completion can insure raises InvalidFamilyInput, with no evaluator row, when a listed prior holds on some completion of an UNKNOWN year. A completion where no placement supports that prior is refused by name with its row kept (round 23: the record 'omits credits or facts that could insure the current period'), so not every concrete filling is invalid. _prior_basis looks for support on the upper credits, and _flag_fits on any completion, where an input error needs support on every completion.",
"counterexample": {
"command": "PYTHONPATH=$PWD/scratch/review/audit_site:$PWD/src:$PWD POPULACE_DYNAMICS_EPUF_DIR=/nonexistent/review-data POPULACE_DYNAMICS_PSID_DIR=/nonexistent/review-data $PY scratch/review/unsupported_completion.py",
"inputs": "Person(1950-02-02, sex=FEMALE, prior_disability_periods=(DisabilityPeriod(1990-01-01, 1991-12-31),) OBSERVED, disability_onset=2005-01-15, current_disability_period_established=True OBSERVED, sspa211_applies=False OBSERVED); years 1950-2006 OBSERVED, pre-1978 flags all False, qc_count 4 in each of 1981-1984, 1989 UNKNOWN, every other year 0; month 2006-01-01; test ALL.",
"actual": "InvalidFamilyInput('Established current period has no possible insured disabled quarter'); no row.",
"completions": "1989 = 0 or 1: disability_boundary_assignments_unsupported 'No annual placement supports a listed prior's first insured quarter', rows=1, weight 5/2. 1989 = 2, 3 or 4: InvalidFamilyInput.",
"arithmetic": "She attains 21 in 1971, so fully insured at 1990Q1 needs 18 (1972-1989). 16 QCs plus 1989's: 0 or 1 gives 17 or fewer, so no basis holds (past blindness needs fully insured too); 2 or 3 holds only past blindness (404.130(b) has at most 19 of 1980Q2-1990Q1); 4 holds 404.130(b). No QC after 1989 reaches the 40 quarters ending 2005Q1 through 2006Q1, so the 2005 period fails on every completion.",
"expected": "A named refusal that keeps the row (the prior's refusal or unknown_earnings_years_decide_status), as the 1989 = 0 and 1 completions get.",
"flagged_variant": "scratch/review/mut/r6_case.py: born 1965-06-15, flagged prior 1990-04-01..1990-12-31, qc_count 1983:4, 1984:4, 1985:2, 1987:4, 1988:4, 1990 UNKNOWN, onset 2005-01-15 established, January 2006: InvalidFamilyInput; the 1990 = 4 completion refuses 'No annual placement supports a listed prior's first insured quarter' (404.130(b) holds at 1990Q2 on every placement), and 0-3 raise.",
"reach": "Classification and row weight only; no computed status, date or payment changes. Needs an UNKNOWN (or deferred) year that decides a listed prior's support and an impossible established current period."
},
"fix": "Before raising the input error, require each listed prior to be supported on every completion of the open years: for an unflagged prior on the lower credits (support is monotone there), for a flagged prior on each completion. Otherwise refuse by name and keep the row. Pin both records as tests."
},
{
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:2058-2060 (_flag_fits)",
"issue": "My mutation r6 (open_years uses year < start, so the flagged prior's own start year is never completed) passed every insured-status module except the stress module, which I did not run with it. It flips the flagged record above from InvalidFamilyInput to a refusal, so no test pins the start-year completion search or the classification of that record.",
"counterexample": "scratch/review/mut/run_mutation.sh r6_flag_fits_skips_start_year: fast modules passed, then round 23, classification oracle, status oracle and round 2: 329 passed; mut/r6_case.py under the mutant: 'established, 1990 UNKNOWN : REFUSED ASSIGNMENT_COMPLEXITY ...', at the head InvalidFamilyInput.",
"fix": "Add the medium's two records as tests; they kill r6 whichever classification the fix settles on."
},
{
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:1395-1407 and :1440-1449 (_witness long period); docs/design/track_b_insured_status.md:1761-1775",
"issue": "Where only the register's third parse of 404.130(d)(2) insures, DISABILITY computes false and an established period raises InvalidFamilyInput, though the register leaves that parse open for Max (d1920). The rule refuses where the Act's uncapped half insures, where the third parse insures too, and answers where the open parse alone insures. Disclosed in the note, so low.",
"counterexample": "scratch/review/prior/appE_lows.py L22: born 1960-02-02, flagged prior 1983-01-15..1983-06-30, QCs 1981:3, 1982:3, four in 1984-1986, 1987:1, 1993:1, onset 1993-10-15: not established, DISABILITY false (14 of 20, subsequent_special); established, InvalidFamilyInput. Act needs 24 of 48 and finds 20, the last 40 counted quarters 14 of 20, the third parse 20 of 20.",
"fix": "Until Max rules, refuse by subsequent_special_long_period_unsupported wherever the third parse alone insures, keeping the row."
},
{
"severity": "nit",
"location": "PR #562 body, 'Differentials' bullet",
"issue": "It still says the RS 00301.800 footnote misprints the male age-65 cohort and that 'the GIF, the table and 20 CFR 404.132(b) say 1913'. Low 9's correction elsewhere says the GIF text isn't captured, 404.132(b)'s January 2, 1913 date is the disability 1975 cap, and 404.110(b)(2)(iv) puts age 65 at births before January 2, 1911.",
"counterexample": "Compare the body with tests/data/track_b/insured_status_sources/README.md:69-76.",
"fix": "Restate the bullet as the README does."
}
],
"needs_max": [
{
"id": "us:oasdi-insured-subsequent-special-long-period",
"assessment": "keep",
"more_than_one_defensible_reading": true,
"chosen_default_safer": false,
"reason": "Past 40 counted quarters the Act's uncapped half and 404.130(d)(2)'s cap differ. Since Rule III reaches only someone not insured under 404.130(b) (RS 00301.147 B.1.b), a cap read as 20 of the last 40 adds nothing, which supports the third parse (a ceiling of 20 QCs in the period) as the regulation's reading. Refusing where the Act insures is safe but unneeded, since the third parse insures there too; answering false and raising InvalidFamilyInput where only the third parse insures isn't the safer default. Status example verified (low finding 3). No payment is computed.",
"source_text": [
"Act 223(c)(1)(B)(iii): 'not less than one-half of the quarters beginning after such individual attained age 21'",
"404.130(d)(2): 'up to a maximum of 20 QCs out of 40 calendar quarters'",
"RS 00301.147 B.1.b: 'Do not currently meet 20/40 and fully insured status at onset.'"
]
},
{
"id": "us:oasdi-insured-one-filling-first-start",
"assessment": "keep",
"more_than_one_defensible_reading": true,
"chosen_default_safer": true,
"reason": "Flexible assignment per determination and one start per period both have support; refusing where one filling can't carry the start and the result is safe. Its UNKNOWN-history extension (every placement with no period in force) is sound: disregarding every period is always open (404.130(f), 404.320(a), RS 00301.120), and Sol's records now refuse.",
"source_text": [
"RS 00301.230: 'Assignment of QCs is flexible.'",
"404.321(a): 'Your period of disability begins on the day your disability begins if you are insured for disability on that day.'"
]
},
{
"id": "us:oasdi-insured-prior-disability-favorable-disregard",
"assessment": "resolve",
"more_than_one_defensible_reading": false,
"chosen_default_safer": true,
"reason": "404.130(f) and RS 00301.120/.132 settle it. Example 9's printed denial also keeps 1983's two QCs in Q1-Q2, where RS 00301.140 example 5 moves a post-1977 QC; disregard with 1983's QCs in Q3-Q4 gives 20 of 1983Q3-1993Q2. Verified: Sam computes DISABILITY true 20/20 at 1993Q2.",
"source_text": [
"404.130(f): 'we will count all the quarters in the prior period of disability established for you if by doing so you would be entitled to benefits'",
"RS 00301.140 D.5: 'a QC earned after 1977 can be assigned to any QTR in the year if insured status would be met'"
]
},
{
"id": "us:oasdi-insured-disability-period-endpoint-quarters",
"assessment": "resolve",
"more_than_one_defensible_reading": false,
"chosen_default_safer": true,
"reason": "404.130(f), 404.146(d)(1) and Act 216(i)(3)'s last sentence keep a QC endpoint; the printed figures are placement-dependent and change no status (Joseph 20/10, Frank 34/17/9 not insured, both re-derived).",
"source_text": [
"404.130(f): 'unless the quarter is the first or last quarter of this period and the quarter is a QC'"
]
},
{
"id": "us:oasdi-insured-pre1951-seven-elapsed-years",
"assessment": "keep",
"more_than_one_defensible_reading": false,
"chosen_default_safer": true,
"reason": "Missing filing and section 227 facts, not competing readings; the named refusal is safe. Verified: the 1895-born woman refuses by name; the same record for a man needs 9, which the aggregate can't reach, and computes false 1/9.",
"source_text": [
"404.110(d)(1)(i): 'if you have at least 7 elapsed years'",
"RS 00301.315: 'The 1990 Amendments eliminated the seven EY test.'"
]
},
{
"id": "us:oasdi-insured-simplified-pre1951-disability-scope",
"assessment": "keep",
"more_than_one_defensible_reading": true,
"chosen_default_safer": true,
"reason": "The Act and 404.132 reach the prerequisite and the POMS note excludes it; crediting no deemed quarter and refusing where decisive keeps the row.",
"source_text": [
"Act 213(c): 'For purposes of sections 414(a) and 415(d)'",
"RS 00301.315: 'The simplified method does not apply to disability claims.'"
]
},
{
"id": "us:oasdi-insured-pre1956-alternate-any-quarter-scan",
"assessment": "keep",
"more_than_one_defensible_reading": true,
"chosen_default_safer": true,
"reason": "'Any quarter' against the disability-covered context; refusing where the readings differ is safe.",
"source_text": [
"RS 00301.480 A: 'does not have 20/40 for freeze or DIB in any quarter before 10/60'"
]
},
{
"id": "us:oasdi-insured-historical-end-recovery-month",
"assessment": "resolve",
"more_than_one_defensible_reading": false,
"chosen_default_safer": true,
"reason": "404.321(b)'s arithmetic fixes the recovery month for an end that isn't the age-65 or death end; February 1981 is the first paragraph (c) end.",
"source_text": [
"404.321(b): 'the last day of the second month following the month in which your disability ended'"
]
},
{
"id": "us:oasdi-insured-unknown-prior-historical-blindness",
"assessment": "resolve",
"more_than_one_defensible_reading": false,
"chosen_default_safer": true,
"reason": "Current non-blindness says nothing about past blindness; a blind prior needs fully insured status only.",
"source_text": [
"404.130(e): '(1) You are disabled by blindness ... and (2) You are fully insured.'"
]
},
{
"id": "add: an observed listed prior and an UNKNOWN year's completions",
"assessment": "add",
"more_than_one_defensible_reading": true,
"chosen_default_safer": false,
"reason": "The impossibility path reads a listed prior as ruling out the completions on which it has no support (InvalidFamilyInput), while the same credits declared concretely refuse by name as omitted credits or facts. The safer default is the named refusal (medium finding).",
"source_text": [
"Shared Track B contract as briefed: 'InvalidFamilyInput means every concrete filling of the input is invalid; where the rule can't show that, it refuses by name and keeps the row.'",
"docs/design/track_b_insured_status.md:663-668: a listed prior no completion supports 'shows the record omits credits or facts that could insure the current period as well'"
]
},
{
"id": "add: an RIB month in the month a first-of-month birth attains 62",
"assessment": "add",
"more_than_one_defensible_reading": true,
"chosen_default_safer": true,
"reason": "Open in the note pending a capture of Act 202(a); accepting the month only loosens input validation and moves CURRENTLY's event at most one month.",
"source_text": [
"404.102: 'You reach a particular age on the day before your birthday.'"
]
}
]
}Generated by Claude Code |
|
Ready for hub review No finding is medium or higher. All 45 required gate modules pass (7397 tests), black and ruff are clean, all 48 capture hashes match, and 8 of 8 own mutations were killed. Four independent oracles found no wrong status or date in about 2,700 computed records. Earlier findings (Appendices A, C, D, E, F)
My findings
Verdict JSON{
"verdict": "APPROVE",
"head": "f32d881207db59acb3ec13818f70ea63d258174b",
"reviewer": "cloud Opus 5.5, independent review",
"summary": "I reviewed the whole diff (105 files) at f32d8812. All 46 earlier findings (Appendices A, C, D, E, F) were replayed from their counterexamples plus nearby variants. Every medium is resolved: Sol's round-14 prior-start constraint and all its variants now refuse by name and keep the row; the listed-prior basis defects (C, D) refuse by name; and the seven Appendix E mediums compute the right statuses, dates and qualifying quarters or refuse by name. I wrote four independent oracles with no production import: no periods, deaths and frozen exits; one listed prior over both bases with exhaustive placement enumeration; UNKNOWN priors against each concrete lawful prior; and an established current period whose start and 404.130(c)-only flag vary by filling. Together they found no wrong status, count or date in about 2,700 computed records. Neither did they find an input error where a lawful filling exists, or a refusal where the readings agree. All 45 required gate modules pass (7397 tests), black and ruff are clean on the 49 changed Python files, and all 48 source captures match their manifest hashes; no protected or stray file changed. Eight mutations of round-23 code were all killed. The judgment readings check out against the captured text. Remaining items are one low (an RIB month at attainment of 62 waits on an uncaptured Act 202(a)) and two nits (a second garbled RS 00301.340 note; two stale sentences in the PR body). No finding is medium or higher. Python 3.14.6 via uv. No population claim was reviewed or made.",
"sol_findings": [
{
"severity": "medium",
"location": "insured_status.py:1845 (Appendix A, Sol round 14)",
"issue": "No-period witness ignored that establishing a prior can pin an annual QC; wrong CURRENTLY and DLI lower bounds under UNKNOWN priors/establishment.",
"resolved": true,
"evidence": "python scratch/review/appA.py: Sol's DLI record (born 1961-02-02, UNKNOWN priors, onset 2000-01-01 established, end 2000-12-31, 2008-01 DISABILITY) -> REFUSED disability_boundary_assignments_unsupported ('Annual placement decides the lower date last insured across the unknown periods'); ALL -> REFUSED unknown_prior_disability_periods_decide_status. All 7 variants (UNKNOWN end, UNKNOWN 2004, UNKNOWN establishment, all-UNKNOWN, onset day 15, frozen exit 2003-12/2027-01) refuse. With the lawful 1998-1999 prior listed -> named refusal. Sol's CURRENTLY record (born 1965, 2003-04) -> REFUSED; evaluate keeps the row. Nearby: test_review_unknown.py 800 random cases, 638 computed under UNKNOWN priors all agree with both concrete-prior worlds and the no-prior world from an independent enumeration oracle."
},
{
"severity": "medium",
"location": "insured_status.py:1721-1801 (Appendix C)",
"issue": "Unflagged listed prior held only to fully insured (past-blindness basis), so TRUE status and DLI kept only on the blind completion.",
"resolved": true,
"evidence": "python scratch/review/appCD.py: born 1955 record, 2008-01 DISABILITY -> REFUSED ('Annual placement decides a listed prior's first insured quarter'); onset 2008-01-01 variant, UNKNOWN 2005 and current 2004 period variants also refuse by name. test_review_prior.py (1500 random single-prior records, independent enumeration oracle over both bases): 1398 computed all match, 102 refused, 0 over-broad refusals."
},
{
"severity": "low",
"location": "insured_status.py:1761 (Appendix C)",
"issue": "A listed prior no placement supports was treated as unconstrained and computed.",
"resolved": true,
"evidence": "appEl2.py L21 (1965 prior, 16 QCs 1952-55) and appE.py E7 -> REFUSED disability_boundary_assignments_unsupported 'No annual placement supports a listed prior's first insured quarter'; row kept by evaluate."
},
{
"severity": "medium",
"location": "insured_status.py:1788-1841 (Appendix D)",
"issue": "Unflagged prior's nonblind basis allowed 404.130(c) alone, masking the Appendix C defect before age 31.",
"resolved": true,
"evidence": "appCD.py: born 1968 record -> REFUSED by the listed-prior name for DISABILITY, onset 2008-01-01 (evaluate REFUSED row), UNKNOWN 2005 and frozen exit 2003-12/2027-01; flagged variant computes DLI 2008-03-31, matching Appendix D's stated right answer for the flagged case."
},
{
"severity": "low",
"location": "insured_status.py:1788 docstring / note (Appendix D)",
"issue": "Undocumented premise that a listed prior's start is the favorable earliest insured quarter from an unrecorded onset.",
"resolved": true,
"evidence": "docs/design/track_b_insured_status.md:1758-1760 and :3139-3142 now state it; appCD.py D2 probe computes DISABILITY true at 1998Q4 as before (consistent with the stated reading)."
},
{
"severity": "medium",
"location": "insured_status.py:1684 (Appendix E M1)",
"issue": "Current period begun on 404.130(c) alone appended unflagged, losing 404.130(d) and returning DLI years early.",
"resolved": true,
"evidence": "appE.py: born 1980-02-02 record -> DISABILITY under31_special, DLI [2012-12-31,2012-12-31] (was 2006-06-30); frozen exit -> 2012-12-31; UNKNOWN end -> [2004-12-31, 2013-03-31] censored with current_disability_period_end unknown (covers 2012-12-31 and the 2013Q1 reach); second record -> 2016-03-31 censored. flag1.py: when placement decides 404.130(b) at the first quarter -> REFUSED 'decides whether the current period rested on 404.130(c) alone'. test_review_cur.py 500 cases vs independent per-filling oracle: 325 computed all match, 168 input errors all with no establishing filling."
},
{
"severity": "medium",
"location": "insured_status.py:536 (Appendix E M2)",
"issue": "Period beginning in the quarter a prior ended (RS 00301.140 ex. 7, Jane) raised InvalidFamilyInput.",
"resolved": true,
"evidence": "appE.py E2: established record -> start 1990-12-03, DISABILITY true under31_special 6/6, row supported."
},
{
"severity": "medium",
"location": "_insured_status_qc.py:196 (Appendix E M3)",
"issue": "Mid-year exit capped the exit year's annual QCs.",
"resolved": true,
"evidence": "appE.py: E3a FULLY True 6/6; E3b True 40/39; E3c REFUSED unknown_earnings_years_decide_status (same as a December exit); E3d with declared end 2021-06-30 computes DISABILITY true 20/20 start 2021-01-15 (ongoing end refuses ongoing_disability_period_dli_horizon_unsupported, no input error). Oracle property test_exit_dli_matches_oracle (300 cases) passes."
},
{
"severity": "medium",
"location": "insured_status.py:2156 (Appendix E M4)",
"issue": "Binding prior reported a non-earliest qualifying quarter, and only the strict basis.",
"resolved": true,
"evidence": "appE.py: E4a qualifying 2007-01-01; established -> start 2007-01-01; E4b qualifying 2008-04-01 with upper 2008-01-01 and unknown fact prior_disability_period_basis; count variant 20..21 with the same fact."
},
{
"severity": "medium",
"location": "insured_status.py:2246 (Appendix E M5)",
"issue": "Under UNKNOWN priors the qualifying quarter was the no-prior world's.",
"resolved": true,
"evidence": "appE.py E5: qualifying 2007-04-01, upper 2007-01-01, unknown_facts prior_disability_periods; established variant also lists current start and end."
},
{
"severity": "medium",
"location": "insured_status.py:616 (Appendix E M6)",
"issue": "Living man born before 1913 queried at 62-64 got the death count.",
"resolved": true,
"evidence": "appE.py E6: born 1908-07-01, 20 QCs, 1971-12 FULLY -> False 20/22; requirement helper 22 at 1971-12 and 1973-12; born 1912-07-01 23 QCs 1974-12 -> False 23/24. Matches captured 404.110(b)(2)(iii)-(iv)."
},
{
"severity": "medium",
"location": "insured_status.py:1817 (Appendix E M7)",
"issue": "Flagged prior tested (c) and not-(b) on different placements.",
"resolved": true,
"evidence": "appE.py E7: UNKNOWN establishment record -> REFUSED by the listed-prior name; evaluate keeps the row."
},
{
"severity": "low",
"location": "insured_status.py:838 (E low 8)",
"issue": "Pre-1951 QC flags waive the 213(c) aggregate silently.",
"resolved": true,
"evidence": "appEl.py: John Doe with 1949 flags computes False 27/37; 1949 as $1,425 per quarter -> REFUSED simplified_pre1951_unsupported. Disclosed at note :2016 and :3531 (behaviour unchanged, now documented)."
},
{
"severity": "low",
"location": "track_b_insured_status.md:1487 (E low 9)",
"issue": "Note/README/registry said the male age-65 cohort ends Jan 2, 1913.",
"resolved": true,
"evidence": "grep: note :597 'Before January 2, 1911 use age 65; January 2, 1911-January 1, 1913 use 1975'; README :69-73 and examples.yaml :761-764 corrected. The PR body's differentials bullet still repeats the old wording (my nit)."
},
{
"severity": "low",
"location": "insured_status.py:1374 (E low 10)",
"issue": "FULLY witness reports the disregard treatment's larger margin.",
"resolved": true,
"evidence": "appEl2.py L10: still FULLY True 64 of 23 with qcs_by_year[1995]=(2,2) and helper 22; behaviour unchanged but now disclosed as a convention at note :487-496."
},
{
"severity": "low",
"location": "insured_status.py:1548 (E low 11)",
"issue": "DISABILITY scan runs past FRA while DLI takes the cap.",
"resolved": true,
"evidence": "appEl2.py L11: DISABILITY True at 2017-01-01, DLI 1989-12-31 (same); documented at note :604 with this exact record."
},
{
"severity": "low",
"location": "insured_status.py:451 (E low 12)",
"issue": "Declared current end after the statutory FRA end silently capped.",
"resolved": true,
"evidence": "appEl.py: current end 2017-12-31 for a 1950-06-15 birth raises 'Current period ends after its statutory FRA end'."
},
{
"severity": "low",
"location": "insured_status.py:1186 (E low 13)",
"issue": "Birth-year annual QCs capped from the birth quarter.",
"resolved": true,
"evidence": "appEl.py L13: born 2000-12-15, $3,120 in 2000 -> FULLY True 6/6."
},
{
"severity": "low",
"location": "insured_status.py:1108 (E low 14)",
"issue": "Deferred conversion refusals loose (refuse where UNKNOWN computes).",
"resolved": true,
"evidence": "appEl.py L14: 2028 wages $1,969 -> REFUSED qc_amount_year_unsupported; UNKNOWN 2028 -> computes. Behaviour unchanged; note :658 now calls these refusals conservative. Rows kept."
},
{
"severity": "low",
"location": "insured_status.py:1557 (E low 15)",
"issue": "Declared past DIB/RIB month replaces the query event for CURRENTLY.",
"resolved": true,
"evidence": "appEl2.py L15: still CURRENTLY False 0; documented in module docstring and note :52."
},
{
"severity": "low",
"location": "insured_status.py:553 (E low 16)",
"issue": "Impossible entitlement events accepted.",
"resolved": true,
"evidence": "appEl.py: DIB month after FRA -> 'DIB entitlement at or after FRA month'; RIB at 24 -> 'RIB entitlement before age 62'."
},
{
"severity": "low",
"location": "tests/test_track_b_insured_status_sources.py:416 (E low 17)",
"issue": "Registry claimed to check every figure; only quotes checked.",
"resolved": true,
"evidence": "README narrowed per note :3538; not re-mutated by me."
},
{
"severity": "low",
"location": "insured_status_examples.yaml:177 (E low 18)",
"issue": "Joseph/Frank labelled errata.",
"resolved": true,
"evidence": "examples.yaml :195-205 and the Frank entry now read 'placement-dependent intermediate counts, not an erratum'; test renamed ..._endpoint_placement."
},
{
"severity": "low",
"location": "insured_status.py:800 (E low 19)",
"issue": "Pre-May-1983 subsequent refusal fired for an under-31 Rule II onset.",
"resolved": true,
"evidence": "appEl.py L19: born 1956-09-16, flagged 1978 prior, onset 1982-03-01 -> DISABILITY True under31_special 7/6."
},
{
"severity": "low",
"location": "track_b_insured_status.md:863 (E low 20)",
"issue": "Note cited uncommitted scratch files; PR body stale counts.",
"resolved": true,
"evidence": "test_the_note_cites_only_tests_that_exist asserts 'scratch/' not in note (passes in round 23 module, 70 passed); PR body now gives 48 cases/27 computed and the mutations JSON path."
},
{
"severity": "low",
"location": "insured_status.py:1830 (E low 21)",
"issue": "Past-blindness basis offered before 1973.",
"resolved": true,
"evidence": "appEl2.py L21: 1965 prior -> REFUSED by the listed-prior name (row kept)."
},
{
"severity": "low",
"location": "track_b_insured_status.md:1709 (E low 22)",
"issue": "Long-period register omitted the third parse.",
"resolved": true,
"evidence": "appEl.py L22: production DISABILITY False 14/20 (Act's reading, unchanged); register and Appendix B row now list the third parse for Max."
},
{
"severity": "low",
"location": "insured_status.py:635 (E low 23)",
"issue": "fully_insured_requirement skipped insured_status validation.",
"resolved": true,
"evidence": "appEl.py L23: dib_entitlement_month 2006-01 with query 2005-01 -> InvalidFamilyInput 'Entitlement follows query month'."
},
{
"severity": "low",
"location": "insured_status.py:772 (E low 24)",
"issue": "Post-death quarterly wages were an input error.",
"resolved": true,
"evidence": "appEl3.py: died 1968-02-15, 1968 quarterly (7700,100,0,0) -> FULLY True 73/16, qcs_by_year[1968]=(1,1); same as (7800,0,0,0)."
},
{
"severity": "nit",
"location": "insured_status.py:764 (E nit 25)",
"issue": "Pre-birth flag error named the wrong bound.",
"resolved": true,
"evidence": "appEl2.py N25: 'Quarterly QCs declared before birth'."
},
{
"severity": "nit",
"location": "_insured_status_qc.py:292 (E nit 26)",
"issue": "1971/72 fiscal bracket gap unstated.",
"resolved": true,
"evidence": "git diff 7b5b126a..HEAD -- _insured_status_qc.py adds the comment at :291-294."
},
{
"severity": "nit",
"location": "insured_status_examples.yaml:582 (E nit 27)",
"issue": "Short-year ceiling cited to the gift rule; Mary Brown count slip not logged.",
"resolved": true,
"evidence": "examples.yaml poms_147_mary note logs 9 vs 8; short-year entry cites RS 00301.345."
},
{
"severity": "nit",
"location": "track_b_insured_status.md:3013 (E nit 28)",
"issue": "35 vs 36 quarters wording.",
"resolved": true,
"evidence": "Note reports the slips corrected (:3542-3543); spot read, not exhaustively re-verified."
},
{
"severity": "nit",
"location": "insured_status.py:1834 (E nit 29)",
"issue": "Refusal detail misnamed the cause.",
"resolved": true,
"evidence": "appCD.py/appE.py details now read 'Annual placement decides a listed prior's first insured quarter' and 'No annual placement supports a listed prior's first insured quarter'."
},
{
"severity": "nit",
"location": "PR #562 body (E nit 30)",
"issue": "Invariant 'disability insured implies fully insured' unqualified.",
"resolved": true,
"evidence": "PR body Invariants now qualifies it with the 1970 record; appEl2.py N30 reproduces DISABILITY True / FULLY False 20/23."
},
{
"severity": "medium",
"location": "tests/test_track_b_insured_status_fix_round_23.py:1287 (Appendix F)",
"issue": "Note check read every tests/**/*.py including barred folders.",
"resolved": true,
"evidence": "Read :1386-1440: tests.glob('test_track_b_insured_status*.py') only, plus a guard test that monkeypatches Path.open/glob/iterdir/rglob/walk; both pass in the gate run (70 passed)."
},
{
"severity": "low",
"location": "insured_status.py:530 (Appendix F)",
"issue": "Listed prior end past FRA silently capped.",
"resolved": true,
"evidence": "appEl.py: DisabilityPeriod(2010-01-01, 2017-12-31) for 1950-06-15 birth raises 'Prior period ends after its statutory FRA end'."
},
{
"severity": "low",
"location": "insured_status.py:641 and :1666 (Appendix F)",
"issue": "No test killed the living-test and age-31-quarter mutations.",
"resolved": true,
"evidence": "My mutations M2 (living = death_date is None) -> round 23 module 1 failed; M3 (age-31 >= -> >) -> 1 failed across rounds 21-23. Both reverted, git status clean."
},
{
"severity": "nit",
"location": "insured_status_examples.yaml:593 (Appendix F)",
"issue": "Garbled dollar amounts in the RS 00301.340 note.",
"resolved": false,
"evidence": "Line 593-596 restored, but a second copy at examples.yaml:914-915 still reads 'RS00301.340:10800/3=3600, if printed10900 meant ...'."
},
{
"severity": "nit",
"location": "insured_status.py:496 (Appendix F)",
"issue": "Comment cited 404.321(b) for the FRA end.",
"resolved": true,
"evidence": "insured_status.py:496-499 now cites 404.321(c)(1) and explains (b)."
},
{
"severity": "uncertain",
"location": "_requirement death month (Appendix F uncertain a)",
"issue": "Man dying in the query month read as living on the 1st.",
"resolved": true,
"evidence": "Now pinned by test_a_death_after_the_query_keeps_the_living_count and disclosed at note :3427-3433; my M2 mutation is killed by it. Not a finding."
},
{
"severity": "uncertain",
"location": "RIB month at attainment of 62 (Appendix F uncertain b)",
"issue": "Whether RIB can begin in the month a 1st-of-month birth attains 62.",
"resolved": false,
"evidence": "Still accepted (note :3511-3515 says it waits on an Act 202(a) capture). Act 202(a) is not captured, so I cannot settle it; affects only CURRENTLY's event quarter in a corner. Left open, low."
},
{
"severity": "uncertain",
"location": "_settle_current_basis (Appendix F uncertain c)",
"issue": "Flag tested only at the lower completion's start.",
"resolved": true,
"evidence": "Code reading in PR body; flag1.py placement-decided and UNKNOWN-prior variants refuse; test_review_cur.py found no mismatch in 325 computed records (declared ends only; UNKNOWN-year uppers not generated)."
},
{
"severity": "surviving-mutation",
"location": "insured_status.py _with_current_period (Appendix F M1 'special is not False')",
"issue": "Survived; claimed equivalent outside UNKNOWN priors.",
"resolved": true,
"evidence": "flag1.py: with UNKNOWN priors and a placement-decided flag the row refuses before the flag matters ('Annual placement decides the lower date last insured across the unknown periods'), so I found no input that distinguishes it. Equivalence not proven; treated as accounted for by the note's Mutations section."
},
{
"severity": "surviving-mutation",
"location": "insured_status.py _current_period_special (Appendix F M9)",
"issue": "Dropping the blindness guard survived.",
"resolved": true,
"evidence": "Note accounts for it (1,500 blind records, no change); 404.130(e) needs only fully insured, which the (d) route cannot beat. Agree it is equivalent in effect."
},
{
"severity": "surviving-mutation",
"location": "insured_status.py _settle_first_start (Appendix F M12)",
"issue": "'is not False' -> 'is True' survived.",
"resolved": true,
"evidence": "Refusal-policy only: turns refusals into results that the stress oracle accepts on both cap readings (PR body). Not re-run by me."
}
],
"executed": [
{
"command": "git rev-parse HEAD; git diff --stat origin/master...HEAD | tail -1",
"result": "f32d881207db59acb3ec13818f70ea63d258174b; 105 files changed, 62131 insertions(+), 13 deletions(-)"
},
{
"command": "venv: uv venv -p 3.14 /tmp/rvenv + pinned packages from the brief",
"result": "Python 3.14.6; repository package not installed"
},
{
"command": "git diff --name-only origin/master...HEAD | grep -E '^(gates.yaml|runs/|src/populace_dynamics/engine/(loop|steps).py)'; grep for scratch/log/report/bundle",
"result": "no protected or stray paths"
},
{
"command": "black -l 79 --check and ruff check --no-cache on the 49 added/modified .py files",
"result": "49 files would be left unchanged; All checks passed!"
},
{
"command": "python: sha256 and byte size of every manifest entry in tests/data/track_b/insured_status_sources/",
"result": "48 entries, 0 mismatches, no unlisted capture"
},
{
"command": "PYTHONPATH=$PWD/src:$PWD OMP_NUM_THREADS=1 POLARS_MAX_THREADS=1 OMP_WAIT_POLICY=PASSIVE POPULACE_DYNAMICS_EPUF_DIR=/nonexistent/review-data POPULACE_DYNAMICS_PSID_DIR=/nonexistent/review-data python -m pytest -q -n 4 -p no:cacheprovider <module>, one run per module (scratch/review/run_gates.sh)",
"result": "all 45 modules exit 0, 7397 passed, 0 failed",
"modules": {
"tests/test_track_b_insured_status.py": "49 passed in 3.45s",
"tests/test_track_b_insured_status_classification_oracle.py": "202 passed in 26.96s",
"tests/test_track_b_insured_status_contract.py": "26 passed in 1.81s",
"tests/test_track_b_insured_status_fix_round_10.py": "43 passed in 2.38s",
"tests/test_track_b_insured_status_fix_round_10_proof.py": "10 passed in 1.47s",
"tests/test_track_b_insured_status_fix_round_11.py": "136 passed in 1.45s",
"tests/test_track_b_insured_status_fix_round_12.py": "65 passed in 1.50s",
"tests/test_track_b_insured_status_fix_round_13.py": "46 passed in 1.17s",
"tests/test_track_b_insured_status_fix_round_14.py": "90 passed in 3.00s",
"tests/test_track_b_insured_status_fix_round_15.py": "48 passed in 2.13s",
"tests/test_track_b_insured_status_fix_round_16.py": "38 passed in 3.23s",
"tests/test_track_b_insured_status_fix_round_17.py": "36 passed in 10.32s",
"tests/test_track_b_insured_status_fix_round_18.py": "16 passed in 0.88s",
"tests/test_track_b_insured_status_fix_round_19.py": "49 passed in 2.54s",
"tests/test_track_b_insured_status_fix_round_2.py": "19 passed in 92.31s",
"tests/test_track_b_insured_status_fix_round_20.py": "9 passed in 5.43s",
"tests/test_track_b_insured_status_fix_round_21.py": "26 passed in 4.46s",
"tests/test_track_b_insured_status_fix_round_22.py": "17 passed in 4.91s",
"tests/test_track_b_insured_status_fix_round_23.py": "70 passed in 181.10s",
"tests/test_track_b_insured_status_fix_round_3_coverage.py": "19 passed in 1.93s",
"tests/test_track_b_insured_status_fix_round_3_periods.py": "69 passed in 2.00s",
"tests/test_track_b_insured_status_fix_round_3_validation.py": "6 passed in 6.44s",
"tests/test_track_b_insured_status_fix_round_4_docs.py": "1 passed in 0.83s",
"tests/test_track_b_insured_status_fix_round_4_endings.py": "11 passed in 1.39s",
"tests/test_track_b_insured_status_fix_round_4_routes.py": "41 passed in 1.76s",
"tests/test_track_b_insured_status_fix_round_5_continuity.py": "17 passed in 1.39s",
"tests/test_track_b_insured_status_fix_round_5_possibility.py": "77 passed in 3.34s",
"tests/test_track_b_insured_status_fix_round_5_sspa.py": "25 passed in 1.40s",
"tests/test_track_b_insured_status_fix_round_6_ordering.py": "30 passed in 1.67s",
"tests/test_track_b_insured_status_fix_round_6_routes.py": "17 passed in 1.34s",
"tests/test_track_b_insured_status_fix_round_7.py": "24 passed in 1.38s",
"tests/test_track_b_insured_status_fix_round_8.py": "14 passed in 1.27s",
"tests/test_track_b_insured_status_fix_round_9.py": "17 passed in 2.85s",
"tests/test_track_b_insured_status_mutations.py": "1 passed in 0.88s",
"tests/test_track_b_insured_status_period_declarations.py": "6 passed in 1.05s",
"tests/test_track_b_insured_status_qc.py": "310 passed in 1.44s",
"tests/test_track_b_insured_status_readings.py": "4 passed in 0.92s",
"tests/test_track_b_insured_status_sources.py": "159 passed in 1.05s",
"tests/test_track_b_insured_status_status_oracle.py": "38 passed in 60.36s",
"tests/test_track_b_insured_status_status_stress.py": "52 passed in 182.08s",
"tests/test_track_b_input_schema.py": "742 passed in 6.03s",
"tests/test_track_b_refusal_notes.py": "21 passed in 2.97s",
"tests/test_track_b_gross_benefits_fix_round_13_audit.py": "1168 passed in 5.66s",
"tests/test_track_b_gross_benefits_fix_round_15_arguments.py": "346 passed in 1.91s",
"tests/test_track_b_gross_benefits_fix_round_15_receivers.py": "3187 passed in 4.97s"
}
},
{
"command": "python scratch/review/appA.py, appCD.py, appE.py, appEl.py, appEl2.py, appEl3.py (counterexample replays; data roots nonexistent)",
"result": "see sol_findings evidence"
},
{
"command": "PYTHONPATH=$PWD/src:$PWD OMP_NUM_THREADS=1 POLARS_MAX_THREADS=1 OMP_WAIT_POLICY=PASSIVE POPULACE_DYNAMICS_EPUF_DIR=/nonexistent/review-data POPULACE_DYNAMICS_PSID_DIR=/nonexistent/review-data python -m pytest -q -p no:cacheprovider scratch/review/test_review_props.py",
"result": "4 passed: no-period FULLY/CURRENTLY/DISABILITY/DLI (600) and frozen-exit DLI (300) vs an independent greedy oracle; QC monotonicity (300); determinism and year-order independence (150)"
},
{
"command": "N=1500 ... pytest scratch/review/test_review_prior.py",
"result": "1 passed: 1500 single unflagged listed-prior records vs an independent enumeration oracle over both bases and consider/disregard; 1398 computed all match, 102 named refusals, 0 refusals where the bases agree"
},
{
"command": "N=800 ... pytest scratch/review/test_review_unknown.py",
"result": "1 passed: 638 computed UNKNOWN-prior results hold on each concrete lawful prior and the no-prior world; 162 refused"
},
{
"command": "N=500 ... pytest scratch/review/test_review_cur.py",
"result": "1 passed: established current period with declared end; 325 computed match the per-filling oracle (start, FULLY, CURRENTLY, exact DLI, no improvement at later starts); 168 input errors all with no establishing filling; 7 named refusals"
},
{
"command": "pytest scratch/review/test_review_death.py",
"result": "1 passed (400 examples): FULLY and CURRENTLY with declared death vs oracle"
},
{
"command": "python scratch/review/flag1.py",
"result": "placement-decided 404.130(b) at a current period's first quarter -> named refusal under OBSERVED and UNKNOWN priors; forced (c)-only -> DLI 2012-12-31; forced (b) -> 2006-06-30"
},
{
"command": "python scratch/review/contract.py",
"result": "bool/datetime/date-subclass/float weight rejected as InvalidFamilyInput; evaluate re-raises input errors; a refusal keeps rows=1 weight 5/2 in count_family_outcomes; copy/construct/pickle of a result rejected. int for Fraction fields and list for tuples are accepted, as the shared schema does for G/R2/R3"
},
{
"command": "python scratch/review/examples.py; hand derivations",
"result": "RS 00301.148: 30 QCs, 20/40 last met 1990Q2 with the 1980 QCs moved to Q3-Q4, requirement 14 -> DLI 1990-06-30 reproduced; RS 00301.140 ex. 9 Sam: disregard gives 20 in 1983Q3-1993Q2, fully 7, matching the pinned test"
},
{
"command": "scratch/review/mutate.sh <name> <file> <old> <new> <tests> (apply, pytest -n 4, git checkout -- <file>)",
"result": "8 of 8 killed; git status --porcelain empty after each",
"mutations": [
"M1_men_62_strict :: 2 failed, 68 passed in 175.02s (0:02:55) :: status=[]",
"M2_living_ignores_death :: 1 failed, 69 passed in 177.14s (0:02:57) :: status=[]",
"M3_age31_quarter :: 1 failed, 112 passed in 180.04s (0:03:00) :: status=[]",
"M4_shared_day_allowed :: 1 failed, 69 passed in 182.54s (0:03:02) :: status=[]",
"M5_blind_basis_1972 :: 1 failed, 69 passed in 176.21s (0:02:56) :: status=[]",
"M6_rank_ignores_quarter :: 2 failed, 68 passed in 174.16s (0:02:54) :: status=[]",
"M7_exit_bars_own_year :: 3 failed, 377 passed in 176.98s (0:02:56) :: status=[]",
"M8_prior_end_cap :: 1 failed, 69 passed in 172.31s (0:02:52) :: status=[]"
]
}
],
"findings": [
{
"severity": "nit",
"location": "tests/data/track_b/insured_status_examples.yaml:914-915",
"issue": "The second RS 00301.340 short-year note (poms_340_possible_unstated_ceiling) still has lost dollar signs and spaces: 'RS00301.340:10800/3=3600, if printed10900 meant ...'. Round 23 restored only the copy at :593-596.",
"counterexample": "sed -n 912,916p tests/data/track_b/insured_status_examples.yaml at f32d8812 prints 'finding: This ceiling could explain the short-taxable-year example in RS00301.340:10800/3=3600, if printed10900 meant net earnings ...'. Text only; no status changes.",
"fix": "Restore '$10,800 / 3 = $3,600' and 'the printed $10,900'."
},
{
"severity": "nit",
"location": "PR #562 body, 'Worked examples and differentials'",
"issue": "The body still says the RS 00301.800 PDF 'misprints the male age-65 cohort as 1/2/31; the GIF, the table and 20 CFR 404.132(b) say 1913', the reading Appendix E low 9 corrected in the note, README and registry (age 65 only for men born before 1/2/1911; 404.132(b)'s 1913 is the disability cap). It also says each of the 48 registry figures is 'checked against its pinned capture', where the README (:14-18) now says only quotes are checked and no test reads expected/implemented.",
"counterexample": "PR body vs docs/design/track_b_insured_status.md:597 and tests/data/track_b/insured_status_sources/README.md:14-18 and :69-73. Text only; production gives the right counts (E6/E6b reproduce 22 and 24).",
"fix": "Align the body's two sentences with the note and README."
},
{
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:581-586",
"issue": "Appendix F uncertain (b) remains open: an RIB entitlement month equal to the month a first-of-month birth attains 62 is accepted, though Act 202(a) (not captured) may require age 62 throughout the month. The note discloses this and defers it.",
"counterexample": "Person(1940-03-01, rib_entitlement_month=2002-02-01) constructs; whether it should is unsettled by the captured sources. It moves only the CURRENTLY event quarter in that corner.",
"fix": "Capture Act 202(a) and decide, or refuse by name for that month."
}
],
"needs_max": [
{
"id": "us:oasdi-insured-subsequent-special-long-period",
"assessment": "keep",
"reason": "Two defensible readings past 40 counted quarters (Act's uncapped half vs 404.130(d)(2) 'up to a maximum of 20 QCs out of 40 calendar quarters', repeated in RS 00301.147 B.2.a). Refusing where they differ is the safer default; test_review_cur.py saw 6 such refusals and no computed case where the readings differed. The third parse is now listed for Max (d1920). Production on the Appendix E low-22 record returns DISABILITY false 14/20 (Act reading), which is right on both registered readings.",
"source_text": [
"Act 223(c)(1)(B)(iii) capture: 'not less than one-half of the quarters beginning after such individual attained age 21 and ending with the quarter in which such month occurs'",
"404.130(d)(2): 'up to a maximum of 20 QCs out of 40 calendar quarters'",
"RS 00301.147 B.2.a: 'up to a maximum of 20 QCs out of 40 calendar quarters'"
]
},
{
"id": "us:oasdi-insured-one-filling-first-start",
"assessment": "keep",
"reason": "404.321(a) gives a period one start while RS 00301.230 makes assignment flexible. Requiring one filling that keeps the reported start (and each listed prior's start, on each basis the record leaves open) is safer. My independent oracles under this reading (listed prior: 1398 computed; current period: 325 computed; UNKNOWN priors: 638 computed) found no disagreement, which closes Sol's added item on prior-start assignments.",
"source_text": [
"404.321(a): 'Your period of disability begins on the day your disability begins if you are insured for disability on that day.'",
"RS 00301.230 B: 'Assignment of QCs is flexible. We can assign a QC to any quarter in the calendar year'"
]
},
{
"id": "us:oasdi-insured-prior-disability-favorable-disregard",
"assessment": "resolve",
"reason": "404.130(f)'s last sentence expressly allows counting all prior-period quarters where favorable; RS 00301.140 example 9's printed denial conflicts. Regulation governs. Hand check of Sam: 20 QCs in 1983Q3-1993Q2 with the period disregarded, fully insured 20 of 7.",
"source_text": [
"404.130(f): 'we will count all the quarters in the prior period of disability established for you if by doing so you would be entitled to benefits'",
"RS 00301.140 ex. 9: 'Sam requires 8 QC's but has only 7 QC's'"
]
},
{
"id": "us:oasdi-insured-disability-period-endpoint-quarters",
"assessment": "resolve",
"reason": "404.130(f) keeps a QC endpoint quarter; the printed POMS figures are placement-dependent and change no status. No remaining ambiguity.",
"source_text": [
"404.130(f): 'unless the quarter is the first or last quarter of this period and the quarter is a QC'"
]
},
{
"id": "us:oasdi-insured-pre1951-seven-elapsed-years",
"assessment": "keep",
"reason": "Missing filing and section 227 facts justify the named refusal; 404.110(d)(1)(i)'s seven-year condition and (ii)'s June-1992 alternative are both in the capture. The flag-declared pre-1951 years waive the route, now disclosed.",
"source_text": [
"404.110(d)(1)(i): 'if you have at least 7 elapsed years'",
"404.110(d)(1)(ii): 'If you file an application in June 1992 or later and you are not entitled to a benefit under section 227'"
]
},
{
"id": "us:oasdi-insured-simplified-pre1951-disability-scope",
"assessment": "keep",
"reason": "404.132 applies 404.110 to disability's fully insured prerequisite; RS 00301.315 says the simplified method doesn't apply to disability claims. Preserving the route by named refusal is safer.",
"source_text": [
"404.132: 'we use the fully insured status requirements in § 404.110'",
"RS 00301.315: 'The simplified method does not apply to disability claims.'"
]
},
{
"id": "us:oasdi-insured-pre1956-alternate-any-quarter-scan",
"assessment": "keep",
"reason": "'any quarter before 10/60' vs 'though under a disability ... for freeze or DIB' support two scan scopes; refusal where they differ is safer. Round 23 extends it to a listed pre-1956 prior; I did not construct a counterexample there.",
"source_text": [
"RS 00301.480 A: 'though under a disability, does not have 20/40 for freeze or DIB in any quarter before 10/60'"
]
},
{
"id": "us:oasdi-insured-historical-end-recovery-month",
"assessment": "resolve",
"reason": "404.321(b)'s 'second month following the month in which your disability ended' fixes the arithmetic for pre-1981 non-FRA, non-death endings. No competing reading.",
"source_text": [
"404.321(b): 'the last day of the second month following the month in which your disability ended'"
]
},
{
"id": "us:oasdi-insured-unknown-prior-historical-blindness",
"assessment": "resolve",
"reason": "statutory_blindness declares current blindness only; 404.130(e) lets a blind prior rest on fully insured status alone, and RS 00301.150 dates that from January 1973 (now enforced, low 21).",
"source_text": [
"404.130(e): '(1) You are disabled by blindness ... and (2) You are fully insured.'",
"RS 00301.150: 'For benefits payable January 1973 or later, a statutorily blind worker no longer needs to meet a 20/40 or special insured status test.'"
]
},
{
"id": "retired: us:oasdi-insured-flag-first-insured-quarter",
"assessment": "resolve",
"reason": "Retired in round 23 because a start can now fall in a prior's end quarter. Agree: with shared quarters allowed (RS 00301.140 ex. 7, 404.321(a)) the reading has no remaining object."
},
{
"id": "add: RIB entitlement in the month of attaining 62",
"assessment": "add",
"reason": "Appendix F uncertain (b) is still open and waits on an uncaptured Act 202(a). It affects only a CURRENTLY event quarter; low. Worth adding to the follow-up list, not blocking."
}
]
}Generated by Claude Code |
|
Ready for hub review
round23-mutations.json (gzip, base64)SHA-256 of the uncompressed file:
Generated by Claude Code |
|
Ready for hub review Cloud run of the round 23 mutation list and the Track B gate at Environment. Hashes. Every hash matched. All 42 files in the brief's table matched at Mutations (107, in the brief's list order;
The table and the JSON give
Totals
Gate. Run once at cd ../w562 && env POPULACE_DYNAMICS_PSID_DIR=/nonexistent/trackb-round23 POPULACE_DYNAMICS_EPUF_DIR=/nonexistent/trackb-round23 OMP_NUM_THREADS=1 OMP_WAIT_POLICY=PASSIVE POLARS_MAX_THREADS=1 PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=$PWD/src:$PWD HYPOTHESIS_STORAGE_DIRECTORY=scratch/review/hyp-gate $PY -m pytest -n 4 -q -p no:cacheprovider tests/test_track_b_*.py > scratch/review/gate.log 2>&1Here The failing test nodes, each with its one-line error from the FAILURES section of
None of the three is in an insured-status module. I did not rerun the gate or diagnose these failures. This run used Python 3.13.18, not 3.14 (see Environment). Earlier source (
The exact command, as I ran it from the session's checkout (the two cd /home/user/w562 && PY=/tmp/tbvenv/bin/python && OLDSRC=$(cd ../w7b && pwd)/src && date -u +%T && env POPULACE_DYNAMICS_PSID_DIR=/nonexistent/trackb-round23 POPULACE_DYNAMICS_EPUF_DIR=/nonexistent/trackb-round23 OMP_NUM_THREADS=1 OMP_WAIT_POLICY=PASSIVE POLARS_MAX_THREADS=1 PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=$OLDSRC:$PWD HYPOTHESIS_STORAGE_DIRECTORY=scratch/review/hyp-old $PY scratch/review/run_round23_named.py -p no:xdist -p no:cacheprovider -q --tb=no -rf tests/test_track_b_insured_status_fix_round_23.py tests/test_track_b_insured_status_status_stress.py > scratch/review/old-stress.log 2>&1; echo "exit $?"; grep -E "^(OPEN_AUDIT|FAILED)" scratch/review/old-stress.log | cut -c1-160; tail -2 scratch/review/old-stress.log; date -u +%TIts whole output. The All of
round23-mutations.json (gzip, base64)SHA-256 of the uncompressed file: Judgment calls
Generated by Claude Code |
…562 round 24) On an established current period, the rule raises InvalidFamilyInput only where every completion of its UNKNOWN years would. At fc689ec it raised one on records that only some completions support, and dropped their rows (the review's medium). _refuse_undecided_priors now checks each flagged listed prior, and each from July 1952 through 1955, on every completion of the years open by its start, and each other listed prior on lower credits. It refuses with unknown_earnings_years_decide_status where a completion leaves a prior unsupported. _refuse_boundary_completions refuses where some completion could exceed 4,096 boundary assignments, since a middle count can have more than either bound. The new round 24 module adds 64 unit tests: worked records for each basis, the guards' thresholds, a soundness property over every completion and a differential property for the lower-credit shortcut. Each of round 24's 28 mutations fails a named test, and the note records the round. In the issue draft, the encoding now refuses where some completion leaves a listed prior unsupported. The examples file gives the second RS 00301.340 short-year note back its dollar signs, and the tier README's total now sums its rows, where f32d881 had left it at 33,178. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cloud brief 6870 ran round 23's 107 mutations at f32d881 through every insured status module (PR #562 comment 6618201683). All 107 failed a named test, and every run's open audit counted no restricted open. The ledger takes the records, the runner, the test hashes and the replay steps. The design note gets one sentence for the run and two for the stress oracle, whose full-scan test fails on both mutations of its scan. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The head moves from I've queued two cloud briefs at |
|
Ready for hub review No finding of medium or higher. All 46 required gate modules pass (7,461 tests), lint is clean, and every medium from Appendices A, C, D, E, F and G is rebuilt and resolved at this head. Earlier findings
My findings
{
"verdict": "APPROVE",
"head": "d30e44267cd25cbf804f8b4e9a07679f2c4a9939",
"reviewer": "cloud Opus 5.5, independent review",
"summary": "Reviewed the full diff (106 files) with focus on round 24 (_refuse_undecided_priors, _completions, _refuse_boundary_completions). All 46 required gate modules pass (7,461 tests); black and ruff are clean on the 50 changed Python files; no protected path is touched; all 48 insured-status captures match their manifest; QC amounts match POMS RS 00301.250 and OACT 2027. I rebuilt the counterexamples of every medium in Appendices A, C, D, E, F and G at this head; each now refuses by name with the row kept or returns the lawful value. Two independent oracles with no production helpers (no-period favorable placement: 1,150 records; one unflagged listed prior over both bases and every placement: 550 records) found 0 mismatches. Completion-consistency properties over 1,050 records found 0 violations, including 112 envelope input errors that held on every completion. Six worktree mutations all failed a test and were reverted with git checkout; F's M9 and M12 still survive but look equivalent. No finding of medium or higher. Open lows: the third parse of 404.130(d)(2) (awaiting Max), FULLY's larger-margin diagnostics, conservative deferred refusals, the uncaptured Act 202(a) month, and a documented DLI-horizon refusal that also covers test=DISABILITY. Python 3.14.6 via uv; packages as pinned; the repository package was not installed.",
"sol_findings": [
{
"severity": "medium",
"location": "A: insured_status.py:1845 (prior-start constraint under UNKNOWN priors)",
"issue": "Establishing an earlier prior can force an annual QC, so the universal no-period witness gave wrong CURRENTLY and overstated DLI lower bounds.",
"resolved": true,
"evidence": "scratch/review/old.py: DLI record (known end, unknown end, frozen OP12 exit, UNKNOWN establishment, UNKNOWN 2004) -> REFUSED disability_boundary_assignments_unsupported 'Annual placement decides the lower date last insured across the unknown periods'; CURRENTLY record -> REFUSED 'Annual placement decides currently across the unknown periods'. Rows kept (weight 5/2)."
},
{
"severity": "medium",
"location": "C: _prior_passes/_keeps_priors/_prior_start_binds",
"issue": "An unflagged listed prior held only to past-blindness constraints, so a TRUE status or DLI held only on the blind completion.",
"resolved": true,
"evidence": "scratch/review/old.py: born 1955-02-02, prior 1998-1999, 2008-01 DISABILITY and onset variant -> REFUSED 'Annual placement decides a listed prior's first insured quarter'. Independent oracle scratch/review/oracle_prior*.py (550 records, both bases, all placements): 0 mismatches."
},
{
"severity": "low",
"location": "C: _prior_start_binds (prior no placement supports)",
"issue": "A prior no placement supports was treated as unconstrained.",
"resolved": true,
"evidence": "Round 23 refuses by name: G records 1989=0/1 -> REFUSED 'No annual placement supports a listed prior's first insured quarter'; oracle_prior REF in all 115 zero-basis records."
},
{
"severity": "medium",
"location": "D: _prior_basis nonblind basis (b)-or-(c)",
"issue": "Unflagged prior's nonblind basis allowed (c) alone, masking the C defect before age 31.",
"resolved": true,
"evidence": "scratch/review/old.py: born 1968-02-02 DLI, onset and frozen exit -> all REFUSED 'Annual placement decides a listed prior's first insured quarter'."
},
{
"severity": "low",
"location": "D: listed prior onset premise",
"issue": "Favorable earliest-quarter reading of a listed prior's start was undocumented.",
"resolved": true,
"evidence": "Appendix B one-filling row and the design note now state it (RS 00301.230)."
},
{
"severity": "medium",
"location": "E1: _complete_current_period special flag",
"issue": "A current period begun on 404.130(c) alone lost 404.130(d) for later quarters, giving early DLI.",
"resolved": true,
"evidence": "scratch/review/old.py: born 1980-02-02 -> DLI [2012-12-31,2012-12-31]; frozen exit -> 2012-12-31 (lawful values)."
},
{
"severity": "medium",
"location": "E2: Person shared-quarter check (Jane, RS 00301.140 ex 7)",
"issue": "Established current period beginning in the quarter a prior ended raised InvalidFamilyInput.",
"resolved": true,
"evidence": "scratch/review/old.py: Jane established -> supported row, start 1990-12-03, DISABILITY True."
},
{
"severity": "medium",
"location": "E3: _allowed_quarters mid-year exit",
"issue": "Exit year's annual QCs were capped at quarters through the exit quarter.",
"resolved": true,
"evidence": "scratch/review/e3.py: (a) Feb exit FULLY True 6/6 (same as Dec exit); (b) True 40/39; (c) REFUSED unknown_earnings; (d) refusal with row kept (no InvalidFamilyInput)."
},
{
"severity": "medium",
"location": "E4: _settle_fillings qualifying quarter",
"issue": "Listed-prior search reported a non-favorable qualifying quarter/count as exact.",
"resolved": true,
"evidence": "scratch/review/old.py: (a) qualifying 2007-01-01; (b) range 2008-04-01..2008-01-01; count 20..21."
},
{
"severity": "medium",
"location": "E5: UNKNOWN priors qualifying quarter",
"issue": "UNKNOWN priors silently meant 'no prior' for qualifying quarter.",
"resolved": true,
"evidence": "scratch/review/old.py: qualifying 2007-04-01..2007-01-01, counts 0..46."
},
{
"severity": "medium",
"location": "E6: _requirement pre-1913 men",
"issue": "Living man queried at 62-64 got the death count.",
"resolved": true,
"evidence": "scratch/review/old.py: born 1908-07-01 MALE, 1971-12 FULLY False 20/22; fully_insured_requirement 22."
},
{
"severity": "medium",
"location": "E7: _prior_basis flagged branch",
"issue": "Flagged prior needed (c) and not (b) on one placement; UNKNOWN establishment computed.",
"resolved": true,
"evidence": "scratch/review/old.py: born 1962-06-28 UNKNOWN establishment -> REFUSED 'No annual placement supports a listed prior's first insured quarter'."
},
{
"severity": "low",
"location": "E8: pre-1951 qc_quarters vs 213(c) aggregate",
"issue": "Flags waive the aggregate route silently.",
"resolved": true,
"evidence": "scratch/review/elows.py: John Doe flags -> FULLY False 27/37; note's SIMPLIFIED_PRE1951 row now says flags add nothing (the fix offered)."
},
{
"severity": "low",
"location": "E9: male age-65 cohort text",
"issue": "Note/README/registry misdated the cohort.",
"resolved": true,
"evidence": "Note and README now cite 404.110(b)(2)(ii)-(iv); PR body bullet restated (read via GitHub API)."
},
{
"severity": "low",
"location": "E10: _witness FULLY treatment diagnostics",
"issue": "FULLY reports disregard-treatment counts that disagree with qcs_by_year/requirement.",
"resolved": false,
"evidence": "scratch/review/elows.py: FULLY 64 of 23 while qcs_by_year[1995]=(2,2) and helper 22. Disclosed as a larger-margin convention; status unaffected. Still low."
},
{
"severity": "low",
"location": "E11: DISABILITY scan past FRA",
"issue": "DISABILITY can be insured past FRA while DLI is capped.",
"resolved": true,
"evidence": "scratch/review/elows.py: DISABILITY True at 2017-01-01, DLI 1989-12-31; DLI row now documents it (fix allowed documenting)."
},
{
"severity": "low",
"location": "E12: current end after FRA silently capped",
"issue": "Declared end past statutory end was capped.",
"resolved": true,
"evidence": "scratch/review/elows.py: raises 'Current period ends after its statutory FRA end'; listed prior raises too (scratch/review/old.py)."
},
{
"severity": "low",
"location": "E13: birth-year cap on annual QCs",
"issue": "Annual QCs in birth year capped.",
"resolved": true,
"evidence": "scratch/review/elows.py: born 2000-12-15 -> FULLY True 6/6."
},
{
"severity": "low",
"location": "E14: loose deferred conversion refusals",
"issue": "Deferred rows refuse even when bounds agree.",
"resolved": false,
"evidence": "scratch/review/elows.py: 2028 wages $1,969 -> REFUSED qc_amount_year 'No captured QC increment for 2028'; documented as conservative; row kept. Still low."
},
{
"severity": "low",
"location": "E15: declared DIB/RIB month replaces query event",
"issue": "Past DIB month decides CURRENTLY.",
"resolved": true,
"evidence": "scratch/review/elows.py: CURRENTLY False 0/6; module docstring now documents it (fix allowed flagging/documenting)."
},
{
"severity": "low",
"location": "E16: impossible entitlement months accepted",
"issue": "DIB after FRA accepted.",
"resolved": true,
"evidence": "scratch/review/elows.py: InvalidFamilyInput 'DIB entitlement at or after FRA month'."
},
{
"severity": "low",
"location": "E17: registry values unread",
"issue": "README overclaimed figure checks.",
"resolved": true,
"evidence": "README:14-18 now says expected/implemented are for review and no test reads them; mutating poms_140_ralph required_qcs 12->13 still passes 208 tests, consistent with the narrowed claim."
},
{
"severity": "low",
"location": "E18: Joseph/Frank erratum labels",
"issue": "Overstated erratum labels.",
"resolved": true,
"evidence": "examples.yaml:198-206 now calls them placement-dependent intermediate counts."
},
{
"severity": "low",
"location": "E19: pre-May-1983 refusal",
"issue": "Fired for under-31 Rule II onsets.",
"resolved": true,
"evidence": "scratch/review/elows.py: born 1956-09-16 flagged prior, onset 1982-03 -> computes DISABILITY True under31_special."
},
{
"severity": "low",
"location": "E20: note cites scratch files / PR body stale",
"issue": "Uncommitted references and stale counts.",
"resolved": true,
"evidence": "grep scratch/review in the note: none; test_the_note_cites_only_tests_that_exist passes."
},
{
"severity": "low",
"location": "E21: past-blindness basis before 1973",
"issue": "Prior of any date could rest on blindness.",
"resolved": true,
"evidence": "scratch/review/elows.py: 1965 prior -> REFUSED 'No annual placement supports a listed prior's first insured quarter'."
},
{
"severity": "low",
"location": "E22 / G low: long-period third parse",
"issue": "Third parse of 404.130(d)(2) left open but code answers false / InvalidFamilyInput where only it insures.",
"resolved": false,
"evidence": "scratch/review/old.py: L22 not established DISABILITY False 14/20; established InvalidFamilyInput. Register now lists the parse for Max (d1920); behavior unchanged by design. Still low."
},
{
"severity": "low",
"location": "E23: helper skips validation",
"issue": "fully_insured_requirement skipped person checks.",
"resolved": true,
"evidence": "scratch/review/elows.py: helper raises 'Entitlement follows query month'."
},
{
"severity": "low",
"location": "E24: post-death quarterly wages",
"issue": "Input error for wages after death.",
"resolved": true,
"evidence": "scratch/review/elows.py: (7700,100,0,0) -> FULLY True 73/16."
},
{
"severity": "nit",
"location": "E25-E29: bound names, fiscal gap, citations, wording, PR body invariant",
"issue": "Wording nits.",
"resolved": true,
"evidence": "Note no longer has '36 quarters from 1989Q2' or 'by at least 10 QCs'; PR body invariant qualified; note round-23 list records each."
},
{
"severity": "medium",
"location": "F1: round 23 note test opened barred tests/",
"issue": "test_the_note_cites_only_tests_that_exist globbed all tests/.",
"resolved": true,
"evidence": "Round-23 module passed in the gate run; c25a32c limits the scan to insured modules (diff read)."
},
{
"severity": "low",
"location": "F2: listed prior end past FRA capped",
"issue": "Inconsistent with current-period error.",
"resolved": true,
"evidence": "scratch/review/old.py: Person with prior end 2017-12-31 raises 'Prior period ends after its statutory FRA end'."
},
{
"severity": "low",
"location": "F3: M4/M8 unpinned branches",
"issue": "living and age-31 bound unpinned.",
"resolved": true,
"evidence": "Sandbox mutation F_M4_living: round 23 1 failed; F_M8_age31 killed in sandbox and in the worktree (1 failed, 70 passed)."
},
{
"severity": "nit",
"location": "F4: RS 00301.340 garbled amounts",
"issue": "Lost $ and spaces.",
"resolved": true,
"evidence": "examples.yaml:593 and :914 restored."
},
{
"severity": "nit",
"location": "F5: 404.321(b) cited for FRA end",
"issue": "Should be (c)(1).",
"resolved": true,
"evidence": "Note round-23 section says comments now cite 404.321(c)(1)."
},
{
"severity": "uncertain",
"location": "F uncertain (a): death-month count",
"issue": "Living on the 1st of the death month.",
"resolved": false,
"evidence": "scratch/review/old.py: 1971-12 False 20/22, 1972-01 True 20/20; note says no captured source settles it. Open, disclosed."
},
{
"severity": "uncertain",
"location": "F uncertain (b): RIB in month of attaining 62",
"issue": "Act 202(a) uncaptured.",
"resolved": false,
"evidence": "scratch/review/elows.py/scratch/review/old.py: Person(1940-03-01, RIB 2002-02) constructs; deferred in note. Open, disclosed (= H low)."
},
{
"severity": "uncertain",
"location": "F uncertain (c): _settle_current_basis upper completions",
"issue": "Not demonstrated.",
"resolved": false,
"evidence": "No counterexample found: scratch/review/prop.py and prop_t*.py (1,050 records, 0 completion-consistency violations). Remains undemonstrated."
},
{
"severity": "mutation",
"location": "F M1 (special is not False)",
"issue": "Survived at 8522452c.",
"resolved": true,
"evidence": "Sandbox: round 24+23 -> 1 failed, 71 passed (killed)."
},
{
"severity": "mutation",
"location": "F M9 (drop blindness in _current_period_special)",
"issue": "Survived.",
"resolved": false,
"evidence": "Sandbox: 134 passed (still survives). Agree it is equivalent: a blind holder keeps 404.130(e), which dominates 404.130(d)."
},
{
"severity": "mutation",
"location": "F M12 (first-start flag is True)",
"issue": "Survived.",
"resolved": false,
"evidence": "Sandbox: 134 passed (still survives). Refusal-policy only, as the pre-screen said."
},
{
"severity": "medium",
"location": "G1: _refuse_unsupported_priors support on some completion",
"issue": "Impossible established period raised InvalidFamilyInput though a completion refuses by name.",
"resolved": true,
"evidence": "scratch/review/old.py: G unflagged 1989 UNKNOWN -> REFUSED unknown_earnings 'Unknown earnings decide a listed prior's support'; 0/1 -> named refusal; 2-4 -> InvalidFamilyInput. Flagged variant 1990 UNKNOWN -> REFUSED; 4 -> named refusal; 0/3 -> InvalidFamilyInput. Targeted property prop_t.py: 112 envelope input errors, every completion also raised."
},
{
"severity": "low",
"location": "G2: r6 mutation survived",
"issue": "Start-year completion unpinned.",
"resolved": true,
"evidence": "Worktree mutation completions_skip_start_year: 1 failed, 10 passed."
},
{
"severity": "low",
"location": "G3: third parse",
"issue": "Same as E22.",
"resolved": false,
"evidence": "See E22."
},
{
"severity": "nit",
"location": "G4: PR body differentials bullet",
"issue": "Stale cohort claim.",
"resolved": true,
"evidence": "PR body now says the PDF footnote's 1/2/31 conflicts with 404.110(b)(2)(iv) and the rule follows the CFR."
},
{
"severity": "nit",
"location": "H1: second RS 00301.340 note garbled",
"issue": "Lost $ signs.",
"resolved": true,
"evidence": "examples.yaml:914-917 restored."
},
{
"severity": "nit",
"location": "H2: PR body registry/cohort sentences",
"issue": "Stale.",
"resolved": true,
"evidence": "PR body updated (read via GitHub API)."
},
{
"severity": "low",
"location": "H3: RIB month of attaining 62",
"issue": "Open per Act 202(a).",
"resolved": false,
"evidence": "Unchanged; disclosed and deferred."
}
],
"executed": [
{
"command": "git rev-parse HEAD",
"result": "d30e44267cd25cbf804f8b4e9a07679f2c4a9939"
},
{
"command": "scratch/review/run_gates.sh (pytest -q -p no:cacheprovider -n 4 per module, both data roots /nonexistent/review-data)",
"result": "46 modules, 7461 passed, 0 failed: all 41 tests/test_track_b_insured_status*.py (incl. stress 52, round_23 70, round_24 64, classification_oracle 202, qc 310, sources 159), input_schema 742, refusal_notes 21, gross_benefits round_13_audit 1168, round_15_arguments 346, round_15_receivers 3187."
},
{
"command": "black -l 79 --check / ruff check --no-cache on the 50 changed .py files",
"result": "50 unchanged; All checks passed"
},
{
"command": "git diff --name-only origin/master...HEAD | grep protected paths",
"result": "none; no scratch/report/bundle files committed; git status --porcelain empty"
},
{
"command": "sha256/bytes of every capture vs manifest.json",
"result": "insured_status_sources 48/48 match; all track_b manifests 196 entries, 0 mismatches"
},
{
"command": "QC_AMOUNTS vs POMS RS 00301.250 and OACT capture",
"result": "1978-2026 match the chart; 2027 = $1,970 per OACT"
},
{
"command": "python scratch/review/old.py, e3.py, elows.py",
"result": "Earlier counterexamples rebuilt; see sol_findings evidence"
},
{
"command": "python scratch/review/oracle.py 1 150; 2 600; oracle2.py 3 400",
"result": "Independent oracle (404.110/.120/.130(b),(c)/.131/.132, favorable placement, DLI and censoring), 1,150 records: 0 mismatches"
},
{
"command": "python scratch/review/oracle_prior.py 1 200; oracle_prior2.py 5 350",
"result": "Independent oracle for one unflagged listed prior (bases 404.130(b) and (e), every placement, use/disregard treatment), 550 records: 0 mismatches; reproduces Appendix C's hand figures (b 2007-12-31, e 2008-03-31)"
},
{
"command": "python scratch/review/prop.py 1 60; 2 300; prop_t.py 7 250; prop_t2.py 11 300",
"result": "Completion consistency (input error on envelope => every completion; computed statuses and DLI contain every computed completion), determinism, refusal weight 5/2: 0 violations; 112 envelope input errors with established period and listed prior all held on every completion"
},
{
"command": "python scratch/review/end_probe.py",
"result": "UNKNOWN year moving start past declared end -> REFUSED unknown_earnings; 0 fill -> InvalidFamilyInput; 1,2 -> computes"
},
{
"command": "python scratch/review/ex140.py",
"result": "RS 00301.140 Fred Brown 17/17 True (16 False), Mary Smith ex 3 True 6/6, ex 4 False 5/6, ex 5 True 6/6, as published"
},
{
"command": "worktree mutations via scratch/review/mut.py /home/user/pr <m> round_24 round_23; git checkout -- src/populace_dynamics/track_b/insured_status.py",
"result": "undecided_upper 1 failed; completions_skip_start_year 1 failed; boundary_low_only 1 failed; flag_never_carries 1 failed; pre1978_only_high 1 failed; F_M8_age31 1 failed. git status clean after each; file sha256 7d2d202b... equals HEAD"
},
{
"command": "sandbox (/tmp/mut copy) mutations",
"result": "completions_drop_high, pre1956_window_late, boundary_vacant_ignores_fixed, drop_undecided_call, drop_boundary_call, cap_ge, requirement_no_cap (base modules), F_M4, F_M1 killed; F_M9 and F_M12 survive (benign)"
}
],
"findings": [
{
"severity": "low",
"location": "src/populace_dynamics/track_b/insured_status.py:3419-3431",
"issue": "The frozen-exit ongoing-period refusal fires for test=DISABILITY too, though the onset status is settled; only the DLI horizon is unobserved. Documented (note:584, :702), rows kept, so loose rather than wrong.",
"counterexample": "Person(1970-06-15, FEMALE, onset 2021-01-15 established OBSERVED, end UNKNOWN); 4 QCs 2001-2010 and 2016-2020; coverage_end_month 2020-02-01; month 2021-06-01; test DISABILITY -> REFUSED ongoing_disability_period_dli_horizon_unsupported; without the exit the same record computes DISABILITY True 20/20 at 2021-01-01.",
"fix": "Optional: return the DISABILITY decision and leave only the DLI open, or keep as documented."
}
],
"needs_max": [
{
"id": "us:oasdi-insured-subsequent-special-long-period",
"assessment": "keep",
"source_text": "Act 223(c)(1)(B)(iii) 'not less than one-half of the quarters beginning after such individual attained age 21'; 404.130(d)(2) 'up to a maximum of 20 QCs out of 40 calendar quarters'",
"note": "Two or three defensible parses; refusing where they differ is safe. The open low: where only the third parse insures, the rule computes false and an established period raises InvalidFamilyInput. Max should rule on the third parse (d1920)."
},
{
"id": "us:oasdi-insured-one-filling-first-start",
"assessment": "keep",
"source_text": "404.321(a) 'Your period of disability begins on the day your disability begins if you are insured for disability on that day'; RS 00301.230 'Assignment of QCs is flexible.'",
"note": "Flexible assignment against a single start is a real tension. One-filling plus named refusal is the safer default. Its prior-start extension (Sol's added item) is now implemented and refuses in Sol's records."
},
{
"id": "us:oasdi-insured-prior-disability-favorable-disregard",
"assessment": "resolve",
"source_text": "404.130(f) 'we will count all the quarters in the prior period of disability established for you if by doing so you would be entitled'; RS 00301.140 ex 9 'does not meet insured status as of 5/93'",
"note": "Regulation governs; implemented reading is right."
},
{
"id": "us:oasdi-insured-disability-period-endpoint-quarters",
"assessment": "resolve",
"source_text": "404.130(f) 'unless the quarter is the first or last quarter of this period and the quarter is a QC'",
"note": "No real conflict; placement-dependent figures."
},
{
"id": "us:oasdi-insured-pre1951-seven-elapsed-years",
"assessment": "keep",
"source_text": "RS 00301.315 'The 1990 Amendments eliminated the seven EY test.'",
"note": "Unmodeled filing facts justify the refusal."
},
{
"id": "us:oasdi-insured-simplified-pre1951-disability-scope",
"assessment": "keep",
"source_text": "404.132 'we use the fully insured status requirements in \u00a7 404.110'; RS 00301.315 'The simplified method does not apply to disability claims.'",
"note": "Statute and CFR outrank POMS; refusing where the aggregate could decide is safe."
},
{
"id": "us:oasdi-insured-pre1956-alternate-any-quarter-scan",
"assessment": "keep",
"source_text": "RS 00301.480 A 'does not have 20/40 for freeze or DIB in any quarter before 10/60'",
"note": "Two readings; refusal where they differ."
},
{
"id": "us:oasdi-insured-historical-end-recovery-month",
"assessment": "resolve",
"source_text": "404.321(b) 'the last day of the second month following the month in which your disability ended'",
"note": "Arithmetic settled."
},
{
"id": "us:oasdi-insured-unknown-prior-historical-blindness",
"assessment": "resolve",
"source_text": "404.130(e) 'You are disabled by blindness ... and (2) You are fully insured.'",
"note": "Current non-blindness doesn't exclude past blindness. My oracle_prior treats both bases and agrees with the code."
},
{
"id": "death-month count for pre-1913 men (F uncertain a) and RIB in month attaining 62 (H low)",
"assessment": "add (low)",
"source_text": "404.110(b)(2)(iv) vs (b)(3); Act 202(a) not captured",
"note": "Disclosed; capture Act 202(a) before relying on those months."
}
]
}Generated by Claude Code |
|
Ready for hub review 1. RunCloud run of the round 24 mutation list and the Track B gate at 2. Environment
3. HashesEvery hash matched: the 43 files in the brief's table ( 4. Mutations (135)
5. Totals
Some first-failing-test cells end mid-parameter (for example 6. Gate: 1 failedExit 1. Last summary line: Failing node and its error:
Per the brief, I did not rerun it. Context from the container: 7. Oracle mutations
8. Round 24's module on the earlier source (
|
Cloud brief 6931 ran round 24's 135 mutations at d30e442 through every insured status module (PR #562 comment 6620539979). All 135 failed a named test, and every run's open audit counted no restricted open. The ledger takes the records, the runner, the test hashes and the replay steps, and the design note gets one sentence for the run. The comment's base64 block miscopies one character, at offset 5037. With that character restored, the block passes gzip's CRC check and matches the SHA-256 the comment gives for the file. The ledger's note records the repair. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nch's tests Master adds CE1 (#583) and D2 (#581), which change no Track B file. Master and this branch both add lines to scripts/first_estimates_birth_evidence.py and its test, and git keeps both sets. The tier files take master's counts plus the 2,735 unit tests this branch adds since 97003ac: 26,654 unit and 36,123 in all. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
I merged this PR at
|
|
TheAxiomFoundation/rulespec-us#2055 asks for RuleSpec encodings of 42 USC 413, 414 and 423(c)(1), and TheAxiomFoundation/rulespec-us#2054 registers this PR's nine readings, pinned to the merge commit |
This PR adds Track B's insured-status rule: quarters of coverage, and fully, currently and disability insured status, decided per person-month (Act 213, 214, 216(i) and 223(c); 20 CFR 404 subpart B; POMS RS 00301). Max ruled d1802 that the rules lane builds it. B6a, the baseline claiming hazard on an insured, unclaimed person-month risk set, needs it, and the open-population lane's OP8(d) will call it for entrants. Nothing in the repository decided insured status before (
docs/parity-ledger.md). The work checks statutory conformance on invented cases and published examples only, and makes no population claim.This PR waits on CI at
ecbee31e, then the coordinator's slot. An independent cloud reviewer approvedd30e4426with no finding of medium or higher (brief 6932, comment 6619466973), and all 135 of round 24's cloud mutations failed a named test there (brief 6931, comment 6620539979).c81036b6records that run in the ledger and the design note, and changes no code.ecbee31emerges master4f99edfb, which changes no Track B file. Sol audits the merged commit when the Codex lanes reopen. The tier files count 26,654 unit tests and 36,123 in all, and the coordinator checks them at its slot.What it does
unknown_earnings_years_decide_status), and the row stays in the shared denominator.count_family_outcomesdenominator, and validation once per call.Invariants
Tests execute each of these, through Hypothesis properties, exhaustive grids or worked examples:
_prior_start_bindsanswers true wherever placement splits a listed prior on its basis, and a flagged prior every placement carries on its route, short of 20 of 40, binds nothing (rounds 20 and 21).InvalidFamilyInputonly where every completion of its UNKNOWN years would. Where some completion leaves a listed prior unsupported, it refuses by name and keeps the row's weight (round 24).Worked examples and differentials
Worked examples. The registry (
tests/data/track_b/insured_status_examples.yaml) inventories 48 cases:The source tests find each entry's quote in its pinned capture and check that each computed entry names an existing test, which asserts the rule's figures. No test reads the registry's
expectedorimplementedfields.Differentials.
last_insuredscan against a scan of every quarter (test_status_stress_last_insured_matches_a_full_scan).test_rs00301_800_pdf_footnote_misdates_the_male_age_65_cohort).Mutation checks.
docs/design/track_b_insured_status_mutations.jsonholds the lane's first mutations and every later round's records, runners and replays. The exhibit differential also catches moving the 1975 cap and moving the 1913 male cutoff.Source readings
The design note's source-conflict register lists nine readings. A marker at each decision line names its reading, and
~/reviews/us-hub/source-conflicts/RULINGS.mdlogs each one:us:oasdi-insured-prior-disability-favorable-disregard,us:oasdi-insured-disability-period-endpoint-quarters).us:oasdi-insured-subsequent-special-long-period).RS 00301.340's short-year allocation stays refused, with both readings pinned. They differ by $100 in allocated earnings and not at all in status. An exit year's annual amounts cover work through the exit month, an interface convention the design note documents, and the exit bars no quarter of its own year (RS 00301.230 B).
Effort
The coordinator estimated 5–10 engineer-days for a person. An automated lane wrote the first build, and 24 rounds of review and repair followed; none of that measures human effort. B6a still needs its empirical risk set, observed histories, claim timing and estimation; this PR supplies only the statutory predicate.
Round 24 (session, after the reviews of
fc689ecbandf32d8812)Round 24 adds
0c39ea4b,d30e4426records brief 6870's round 23 mutation run in the ledger, andc81036b6records brief 6931's round 24 run.ecbee31emerges master4f99edfb, which changes no Track B file. Master and this branch both add lines toscripts/first_estimates_birth_evidence.pyandtests/estimates/test_birth_evidence_artifact.py, and git keeps both sets. The cloud reviewer on brief 6641 asked for changes atfc689ecbon one medium, two lows and a nit (comment 6615437593).f32d8812changed only the stress module, the tier files and the note, so the medium still held there. The reviewer on brief 6871 started before that report posted, and approvedf32d8812with two nits and a low (comment 6616118566).fc689ecb,_prior_basislooked for support on upper credits and_flag_fitson any completion, so the rule raisedInvalidFamilyInputon records that only some completions support. For example, a woman born 1950-02-02 has 16 QCs from 1981 to 1984, a prior from 1990 and an established 2005 period. She needs 18 QCs for fully insured status at 1990Q1, so two must come from 1989. With 1989 UNKNOWN, the rule atfc689ecbdropped her row, though with none or one 1989 QC it refuses by the prior's name._refuse_undecided_priorsnow refuses byunknown_earnings_years_decide_statuswherever some completion leaves a listed prior unsupported. Where four 1985 QCs support the prior on every completion, the rule still raises the input error._refuse_undecided_priorspicks the completions it reads by the prior's basis:test_either_bound_of_a_start_year_can_unseat_a_flagged_prior._boundary_variantsrefuses more than 4,096 assignments of the QCs in a listed prior's endpoint years. A year's assignments peak at a middle count: two QCs in four open quarters have six, while none or four have one. So a completion between the bounds can exceed the cap where neither bound does. For example, atf32d8812the rule raisedInvalidFamilyInputon an invented record with 1988 and 1989 UNKNOWN. The woman in it, born 1955-02-02, has priors from October 1980, 1984 and 1988, each running to the next March, and two QCs in each of 1980, 1981, 1984 and 1985. Two QCs in each of 1988 and 1989 give 46,656 assignments, and the rule refuses that completion._refuse_boundary_completionsnow bounds every completion's assignments and refuses past the cap. The session's own checks found this gap.test_an_input_error_holds_on_every_completiondraws invented records with listed priors, an established current period and one or two open years. Wherever the rule raisesInvalidFamilyInputon one, the test runs each completion and checks that each raises one too. Two searches of 400 such records outside the suite ran 10,427 and 9,407 completions and found no violation; with_refuse_undecided_priorsoff, the first found 37.InvalidFamilyInputon an established period. The rule still accepts an RIB that begins in the month a holder born on the first attains 62 (low). Act 202(a) may require age 62 throughout the month, and a follow-up after this PR captures its text. The second RS 00301.340 short-year note in the registry gets back its dollar signs, and the Worked examples and Differentials bullets above now match the sources README (nits)._refuse_undecided_priorsand_refuse_boundary_completions, read the wrong credits for one kind of prior, move the last open year, break_completions, or replay the reviewer's r6. Each fails a named round 24 test, and the audit hook logged no restricted open. A cloud session on brief 6931 then ran them atd30e4426with round 23's 107, whereprecedence_possiblenow drops only the_refuse_unsupported_priorscall. All 135 failed a named test through every insured status module, with no restricted open in any run's audit (comment 6620539979), andc81036b6adds their records toround_24_mutations. The comment's base64 block miscopies one character, at offset 5037. With that character restored, the block passes gzip's CRC check and matches the comment's SHA-256fa546be3…. In the same run, both mutations of the stress oracle's scan failtest_status_stress_last_insured_matches_a_full_scan. Withf32d8812'sinsured_status.pyin place, eight of round 24's 64 tests fail, in a local run and on brief 6931. Seven of the local eight fail onInvalidFamilyInput.f32d8812had left it at 33,178.ecbee31etakes master's counts plus the 2,735 unit tests this branch adds since97003ac2: 26,654 unit and 36,123 in all.The rule now refuses by name on rows it used to drop as input errors, and those rows keep their weight. Every status and date the rule computed before stays the same, and no payment moves, since this module computes none.
Locally, on invented data and at most four processes,
black -l 79andruff checkpass on round 24's two Python files. Under an audit hook that raises on any open of a barred path, the insured status modules pass all 1,997 of their tests, and no test opened a barred path. Atc81036b6and again atecbee31e, the note and ledger tests and round 24's module pass all 348 of their tests under the same hook.In brief 6931's Track B gate at
d30e4426, 17,019 tests passed, 20 skipped and one failed: the[bun]test from master's B0.1 classifier (#534), which chip task_a2daf659 tracks. This PR touches no B0.1 file.The reviewer on brief 6932 read the whole diff and approved
d30e4426with no finding of medium or higher (comment 6619466973). It rebuilt the record behind every earlier medium and found each resolved, ran the 46 modules the brief names (7,461 tests), and ran its own oracles over 1,700 records with no mismatch. Its completion checks over 1,050 records found no violation, and the 112 input errors among them held on every completion. Its one new finding, a low, says the refusal for a frozen exit on an ongoing period also covers DISABILITY, whose status the onset settles. The design note documents that refusal and the row keeps its weight, so a follow-up after this PR takes it. The lows it leaves open cover the third parse (d1920), FULLY's larger-margin diagnostics, the conservative deferred refusals and the uncaptured Act 202(a) month. The pre-screen's two surviving mutations still survive in its sandbox, as the design note's Mutations section accounts.Round 23 (session, after the review of
7b5b126a)Round 23 adds
8522452c,c25a32c8,aeef5c74,fc689ecbandf32d8812, and2f5ee7a9merges master 97003ac (D4, #574), which changes no Track B file. Cloud brief 6563 asked for changes on 7 medium, 17 low and 6 nit findings (comment 6596920658), and brief 6562 recorded 70 of 70 kills at7b5b126a(comment 6596641719).7b5b126acarried that fact only on listed priors, so a current period the rule began on 404.130(c) alone lost 404.130(d) for the quarters after it. On the review's invented record (born 1980-02-02, onset 2003-01-15, a period ending 2004-12-31, queried in January 2013), it reported an exact date last insured of 2006-06-30, where 404.130(d) gives 2012-12-31._current_period_specialnow records the fact on the period the rule begins. Where placement or an UNKNOWN year decides that basis and the two bases give different dates, the rule refuses the date by name. One more QC can now bring the date earlier, by letting 404.130(b) begin the period, and the test labels that intended. A differential lists the period the rule begins as a prior with the flag 404.130(b) implies: over its 11,700 records the two agree on 11,599, and the other 101 refuse by the long-period register entry's name.7b5b126araisedInvalidFamilyInputon her established record and lost the row. Periods may now share a quarter but not a day. Round 23 removes the overlap search and retires I13, B15 and the register entryus:oasdi-insured-flag-first-insured-quarter, which read a recent-rule quarter inside a prior period.7b5b126afound 3. A birth bars no quarter of its year either.7b5b126areported 2010-07-01. Where a binding prior's two bases give different witnesses, each status reports the range they give, and the result listsprior_disability_period_basisamong its unknown facts: 2008-04-01 with an upper qualifying quarter of 2008-01-01, and a count of 20 to 21 on a 1955 birth. Under UNKNOWN priors the range reaches the onset quarter: 2007-04-01 with an upper qualifying quarter of 2007-01-01.7b5b126aended a living man's count at the query year, so it found a man born 1908-07-01 with 20 QCs from 1951 to 1970 fully insured in December 1971 at 20 of 20, where he needs 22. A test checks 404.115's table, read from the captured regulation, for every cohort.7b5b126achecked the two halves on different placements._flag_fitsnow asks for one placement that does both, on every completion still open by the prior's start, and refuses by name where none does.InvalidFamilyInputat7b5b126anow keeps its row.fully_insured_requirementrunsinsured_status's checks; wages paid after a death count toward the year's total (Act 213(a)(2)(B)); and a quarterly bound names the birth. The note answers the other lows and nits in text, and this body now carries the ledger path, the current example counts and the qualified invariants (low 20, nit 30).8522452c,test_the_note_cites_only_tests_that_existsearched every folder undertests/and read each module it found, including folders the cloud briefs bar.c25a32c8limits it to the design note and the insured status modules, andtest_the_note_check_reads_only_the_note_and_insured_moduleschecks each Path listing and open before it runs; six local mutations of the check fail that guard. Briefs 6636 and 6637 would have run the old check, so the session withdrew both before either launched. Their replacements at2f5ee7a9, 6638 and 6639, gave way before launch to 6640 and 6641 ataeef5c74, and those in turn to 6640 and 6641 atfc689ecb.7b5b126afails 568 of the M1 differential's 11,700 and 90 of the exit-month test's 300, so a run misses the first about 29% of the time and the second about once in 7,500 runs. A local run at7b5b126amissed the first. Each now runs an explicit example that7b5b126afails: the review's record with four QCs in each of 1998 to 2000, and a February exit with four 2020 QCs. All three of round 23's property tests pass on every input of their strategies atfc689ecb.edba88f7: 26,320 unit and 33,175 in all.fc689ecb's three new tests make 26,323 and 33,178.fc689ecb). A pre-screen of8522452cby an Opus 5.5 subagent of this session found one medium, the note check's reach, whichc25a32c8had already fixed, three lows and two nits. A listed prior's end past the statutory FRA end still capped silently while the current period's raised; both now raiseInvalidFamilyInput, and round 3's two tests and the historical boundary lattice declare lawful ends.test_a_death_after_the_query_keeps_the_living_count,test_a_period_begun_in_the_age_31_quarter_rests_on_paragraph_dandtest_an_open_flag_keeps_paragraph_b_where_every_placement_meets_itpin three branches that no test caught under mutation: the living test in_requirement, the age-31 bound in_current_period_special, and_with_current_period's reading of an open flag as unflagged. Of the pre-screen's twelve mutations, ten now fail named tests, and the design note's Mutations section accounts for the two that survive every insured module.special_ignores_blindnesschanges no answer across 1,500 generated blind records. Every changefirst_start_flag_true_onlymakes across 11,000 generated records turns a refusal into a result, and the stress oracle accepts the result on both cap readings for each of the ten records it can judge; the other 22 end with an exit month, which it doesn't model, or hold too many placements to enumerate. The current-period comment and the low 12 test cite 404.321(c)(1) for the FRA end, the RS 00301.340 example note gets back its dollar amounts, and the Joseph note no longer breaks mid-sentence. Of its three uncertain items, the new death test pins the first. The second, whether an RIB can begin in the month a first-of-month birth attains 62, waits on a capture of Act 202(a) in a follow-up. Code reading settles the third:_settle_current_basisreads the flag at the lower completions' start, which matches the upper completions' start, since the rule refuses wherever the two differ.aeef5c74aligns the rulespec-us issue draft with round 23: a declaration that contradicts itself fails before the rule runs, and otherwise an input error means every filling is invalid, so a listed prior that no completion supports refuses first. Its long-period bullet now names the third parse and what the Python rule does with each reading.f32d8812).last_insurednow scans down from the query and stops at the first insured quarter, the same quarter a full scan finds.This adds no register id and retires one, so the register lists nine readings. The
RULINGS.mdrows record the retirement, the third long-period parse and the pre-1956 listed prior.Round 23 changes only classifications, dates and row weights. No payment moves, since this module computes none.
A cloud session on brief 6870 ran 107 mutations through every insured status module at
f32d8812: round 22's 70, 17 of them re-derived where round 23 rewrote their code, and round 23's 37. Each failed a named test, and the audit hook logged no restricted open (comment 6618201683).d30e4426adds their records toround_23_mutations. Both mutations of the stress oracle's scan failtest_status_stress_last_insured_matches_a_full_scan, which passes at the head. With7b5b126a's source in place, 44 of round 23's 70 tests fail, and 3 of the stress module's 52.In brief 6870's Track B gate at
f32d8812, 16,955 tests passed, 20 skipped and one failed. That test,tests/test_track_b_b0_1_review_root.py::test_every_engine_match_of_a_spelled_denied_name_is_flagged[bun], skips on machines without Bun, and the cloud VM has Bun. It finds a gap in master's B0.1 classifier (#534) that chip task_a2daf659 tracks, and this PR touches no B0.1 file.Locally, on invented data and one process,
black -l 79andruff checkpass on the 22 Python files8522452cchanged and on round 23's module atc25a32c8. At8522452c's source, every insured status module but the stress module passed (1,877 tests in 4 minutes), as did the three other modules that import the insured module or read its note (2,256 tests), and the stress module's 51 passed in 20 minutes; those runs had no audit hook and ran the old note check. Atc25a32c8, under an audit hook that raises on any open of a barred path, round 23's module passes 67 of 67, the six modules that read the insured status notes pass 281 tests, as they do again ataeef5c74, and no test opened a barred path.Round 22 (session, after the review of
f37f7f79)Round 22 adds
7b5b126a. Cloud brief 6123 asked for changes on one medium and one low (comment 6592883037), and brief 6122 recorded 62 of 62 kills atf37f7f79(comment 6594394873).special_insuredrecords the 404.130(d)(1) fact of a prior "for which you were only insured under paragraph (c)", so 404.130(c) can't begin an unflagged prior alone, and round 21 let it. On the review's invented record (born 1968-02-02, a listed 1998-1999 prior before the quarter she attains 31), 404.130(c) holds the prior on every placement, while 404.130(b) needs the 1998 QC in 1998Q1, which gives a date last insured of 2007-12-31.f37f7f79reported 2008-03-31. An unflagged prior now rests on 404.130(b), on 404.130(d) at 31 or later after a flagged prior, or on past blindness. That record now refuses by name for the date and for DISABILITY, with no onset, with an exit frozen after 2003, with an UNKNOWN 2005 and with a current period after the prior. Flagged, it still computes 2008-03-31.prior_holdsandprior_can_begindrop 404.130(c) for unflagged priors, andflagslets one record mix flagged and unflagged priors.young_basis_declarationredraws the review's record around its edges, andmixed_flag_declarationadds an unflagged prior after a flagged one. Round 22's two properties compare_keeps_priors,_prior_basisand_prior_start_bindswith every placement of those draws.f37f7f79. Round 19'stest_placement_binds_a_prior_only_when_it_splits_themdrew a flagged prior starting in 1991Q1, the quarter she attains 31, which the interface rejects. It now draws flagged starts through 1990Q4.This applies the field's definition and reads an omitted onset favorably, so it adds no register id. The
us:oasdi-insured-one-filling-first-startrow inRULINGS.mdand its register entry now name both.Round 22 changes only classifications and row weights. No payment moves, since this module computes none.
A cloud session on brief 6562 ran 70 mutations (round 21's 62, with
ordinary_keeps_special_routere-derived against the new condition, plus 8 of round 22's) through every insured status module at7b5b126a. All 70 failed a named test with no restricted open (comment 6596641719), andround_22_mutationsholds the records (9d2db199). A local first pass through rounds 19 to 22 killed 66. Round 15's module kills the three moving-start mutants left and round 2's killsdate_tested_at_query, as at round 21, all with no restricted open. Againstf37f7f79, 13 of round 22's 17 tests fail, as dotest_status_stress_a_young_prior_on_either_basisand round 21'stest_each_basis_matches_every_placement. Brief 6562's run of round 22's module and the stress module on that source found the same 14 failures, with 54 passing.Brief 6122's gate at
f37f7f79: 16,850 passed, 20 skipped and 2 failed. One failure comes from the round 19 draw above. The other,tests/test_track_b_b0_1_review_root.py::test_every_engine_match_of_a_spelled_denied_name_is_flagged[bun], runs only on a machine withbun, like the cloud VM, and skips elsewhere. It comes from master (#534), and this PR doesn't touch it.Brief 6562's gate at
7b5b126a: 16,868 passed, 20 skipped and 3 failed. The[bun]test failed again. The other two,tests/test_track_b_input_schema.py::test_all_valid_public_argument_controls_still_computeandtests/test_track_b_gross_benefits_fix_round_10_api.py::test_public_api_has_no_unclassified_name_field_or_argument, come from master's G review round 13 (3e4196f7). Their tables expect CPython 3.14's name foradd_note's parameter,note, and 3.13 calls itobject. That VM had no Python 3.14, so the brief ran on 3.13.18; brief 6122 ran on 3.14.6, and CI runs the Track B shards on 3.14. This PR touches neither test, and a separate task makes both read the name from the running Python.Locally, on invented data and one process,
black -l 79andruff checkpass on the changed Python files. At this head's source, every insured status module but the stress module, plus the four other tests that read the insured note or module, passed (4,074 tests in 4 minutes), and the stress module's 51 passed in 22 minutes,test_status_stress_an_unflagged_prior_after_a_flagged_onetaking 163 seconds.Round 21 (session, after the review of
38a573a8)Round 21 adds
e2507802,e2b9390cand the commits throughf37f7f79. Cloud brief 807 asked for changes on one medium and one low (comment 6589002155), and brief 806 recorded 41 of 41 kills at38a573a8(comment 6589941045).38a573a8held every prior to the first. On an invented 1955-born record with a 1998-1999 prior, it reported a date last insured of 2008-03-31 and DISABILITY true at a 2008 onset, where 404.130(b) pins the 1998 QC in 1998Q1 and gives 2007-12-31 and false._prior_basisnow picks the strictest basis some placement allows, one prior at a time. Every filling that passes it passes the weaker basis, and results take the best filling, so a result such a filling attains holds on both. Any other result refuses by name and keeps the row.38a573a8computed as if the prior set no limit. Six older invented records listed such a prior, and each gained the QCs it needs.basis_worldsreplacesfillings_keeping_priorsand requires each status and the date on every combination of bases.basis_prior_declarationandtwo_basis_declarationdraw around the edge.test_each_basis_matches_every_placementcompares_prior_passes,_prior_basisand_prior_start_bindswith every placement on both bases.This treats a missing fact and adds no reading of the law, so it adds no register id. The
us:oasdi-insured-one-filling-first-startrow inRULINGS.mdand its register entry now name the basis.Round 21 changes only classifications and row weights. No payment moves, since this module computes none.
A cloud session on brief 6122 ran 62 mutations (round 20's list, re-derived, less one branch the rule no longer has, plus 17 of round 21's and five of round 15's) through every insured status module at
f37f7f79. All 62 failed a named test with no restricted open (comment 6594394873), andround_21_mutationsholds the records. Against38a573a8, 29 of the 207 tests in six changed modules fail (22 of round 21's 26, 3 in round 20 and 4 in round 19; round 15, the contract module and the base module fail none). The brief also ran the stress module on that source, where 10 of its 49 tests fail.Locally, on invented data,
black -l 79andruff checkpass, 1,779 tests across every insured status module but the stress module passed atd1af0366, round 15's 48 tests, the readings test and the mutations test passed atfbfb08bb, and the stress module's 49 passed in 21 minutes on one process before its last seed change, after which the changed tests passed again. A wide search on the final generators (150 fresh seeds for each of eight checks, plus 150 draws each fromdeclarationandsubsequent_declaration) held on all 1,276 checks: 884 computed, 286 refused by name and 106 raisedInvalidFamilyInput. A log of each_prior_basisrefusal found two older tests passing on the new refusal for the wrong reason,test_the_date_last_insured_alone_can_refuse_a_moving_startand ten seeds oftest_status_stress_refuses_a_start_no_filling_supports. Both now reach their own refusal and pin its detail. The Track B gate runs in the mutation brief. Brief 806's gate at38a573a8had one failure,tests/test_track_b_b0_1_review_root.py::test_every_engine_match_of_a_spelled_denied_name_is_flagged[bun], the B0.1 Bun classifier gap on chip task_a2daf659, and this diff touches no B0.1 file.Round 20 (session, after the round 19 rerun)
Round 20 adds
f9287518,7d8cecbeand38a573a8, with no master merge.168bb3a8refuses: birth 1970-02-02, four QCs in each of 1990 to 1999 and 2, 3, 2, 2 and 2 in 2016 to 2020, a listed prior from 2000-04-02 through 2003-09-30, an established period from an onset of 2004-01-15, December 2020 query. Round 17's start-keeping search asked for years through the latest possible start, here the query month, and counted 5,184 placements of 2016 to 2020, past its 4,096 cap. A period begins at the onset or in the first later quarter that insures its holder (404.321(a)), and each insured test counts QCs through its own quarter only, so no year after the start can move it._fillings_keeping_startnow passes the reported start, and the record computes fully insured status with 40 QCs against eight elapsed years. An@exampleon round 2's property andtest_partial_years_after_the_start_stay_openpin it.168bb3a8through every insured status module (comment 6584722299): 36 failed a named test and four passed every test. Nine new tests intests/test_track_b_insured_status_fix_round_20.pykill them:binding_reaches_open_period: under UNKNOWN establishment the universal proof settles a result a split listed prior can't move, so an UNKNOWN year leaves it computing.disability_reads_the_completion: a period's establishment counts no quarter of its own period (26 QCs, where the mutant counts 27).every_reads_listed_periods: the worst filling stays exact only with no period in force, because 404.130(f) and 404.146(d) keep a period's credited endpoint quarters.flagged_refuses_every_placement: a flagged prior every placement carries on its route, short of 20 of 40, binds nothing.tests/test_track_b_insured_status_readings.pyholds the markers and the register to the same ids and functions.round_19_mutationsrecords brief 176's run, decoded from the comment's gzip block, whose SHA-256c92576cc…matches.Round 20 changes only classifications and row weights. The rule now computes rows whose later years held more than 4,096 placements, where it refused them before. No payment moves.
Each of the four survivors and
fix_reverted(the horizon restored) fails at least one of the nine new tests in its own local process, and the unmodified source passes all nine. Brief 806 reruns all 41 at38a573a8through every insured status module, and its records go toround_20_mutationsin a docs-only commit. Against168bb3a8, 6 of the 32 tests in the three changed modules fail: round 2's pinned record,test_partial_years_after_the_start_stay_open, and the four register tests.Local checks (session processes, invented data, both data roots nonexistent): the round 20, round 2, readings, ledger, docs and sources modules pass (193 tests) on the tree that became
7d8cecbe, the readings, ledger and docs modules pass again at38a573a8, and Black 26.5.1 and ruff pass on the new module. The tier files add nine unit tests (22,991 unit, 29,590 total); the coordinator's slot recount replaces them.Round 19 (session, after the fourteenth review)
Round 19 adds
bbed6be2, and168bb3a8merges master 89d064b (SSI0, #573), which touches no Track B file.Sol's fourteenth review of
129d44bdasked for changes with one medium, and it reproduced. Sol'sneeds_maxlist keeps, resolves or adds to earlier readings, so it holds no new call for Max.Noneand namescurrent_disability_period_start.The new tests check these invented records:
129d44bdreported a lower date of 2008-03-31. A prior from 1998-01-01 through 1999-12-31 holds the 1998 QC in 1998Q1 and that history gives an exact date of 2007-12-31.129d44bdreported CURRENTLY true, and a prior from 1990-01-01 through 1999-12-31 denies it on all 64 placements that keep the prior and the start.Round 19 changes classification and row weight on rows with UNKNOWN periods or a listed prior that placement decides, and moves no payment. On the second record with a second 2002 QC and the prior listed, the rule reports 20 QCs for DISABILITY in place of 21.
The first pass of the 40 listed mutations failed a named test on 38, and
test_a_prior_reaches_a_year_the_start_cannotandtest_a_listed_prior_holds_every_ending_to_the_datenow kill the other two. Two stress tests gained@examplepins while that pass ran, so a rerun at the final bytes writes the ledger entry in a later commit; it waits on a Fleet ops slot. Against129d44bd, 44 of the 162 tests then in the five changed modules fail, and four of the five tests that arrived or changed later fail there. The fifth checks only arithmetic.The new tests execute these invariants:
check_every_historynow adds a January and a July prior in each partial year before the onset, andcheck_no_periodexhausts records with no current period. Local checks at the tree that becamebbed6be2: all 1,786 insured status tests pass in a session process, and Black and ruff pass. Fleet ops holds heavy local runs, so CI and a cloud run take the whole Track B suite. The wide search drew 250 invented declarations from fresh seeds and skipped 65 declared seeds with more than 96 placements. All 2,450 checks held: 1,034 computed, 1,164 refused by name and 252 raisedInvalidFamilyInput.Round 18 (session, after the thirteenth review)
Sol's thirteenth review of
88a0e7bcasked for changes with one medium and one low, and both reproduced. Sol'sneeds_maxlist keeps each earlier reading, so nothing here needs a new call from Max. No reading changes._settle_lower_dateread the current period back into its search, so a filling could reach the date through the current freeze. Counting an added prior can take a credited quarter from that filling, and disregarding it drops the freeze too._fillings_keeping_startnow gives each filling the record with no period in force under UNKNOWN priors, and one such filling has to keep the start and reach the date. Otherwise the row refuses withdisability_boundary_assignments_unsupportedand keeps its weight. The lower date itself needed no change, because UNKNOWN priors already left it as the date with no period in force, as B9 says._settle_first_startread the same fillings, so a status could rest on the freeze, and the shared change covers it. An OBSERVED empty history keeps the freeze.The new tests check these invented records:
88a0e7bcreported a lower date of 2010-03-31. On a prior from 1999-04-01 through 1999-12-31, the 16 placements that keep the 2000Q1 start reach 2009-12-31 and no later. The row now refuses by name.88a0e7bcreported CURRENTLY true. On a prior from 1996-01-01 through 1999-12-31, no filling with the 2000Q1 start stays currently insured. The row now refuses by name.All 11 mutations die at the final source and test bytes with no restricted open, and 13 of the 85 tests in the three changed modules fail against
88a0e7bc.test_status_stress_every_historypasses at that head, so it stands only as a broad guard. The start-edge property's first generator also passed there, so the session rebuilt it around the two records above, and it now fails there.The new tests execute these invariants:
check_every_historyadds three lawful priors to each record and exhausts the placements with the reported start. Local checks at the tree that became129d44bd: all 14,356 Track B tests pass and 7 skip in a session process. Black and ruff pass. The wide search drew 550 invented declarations from fresh seeds and ran each on both ending kinds and three requests. All 3,300 checks held: 1,454 computed, 1,498 refused by name, 318 raisedInvalidFamilyInput, and 30 reported no start.Round 17 (session, after the twelfth review)
Sol's twelfth review of
e9f4140casked for changes with two mediums, and both reproduced. One needed a reading, and the session logged it. Sol'sneeds_maxlist keeps each earlier reading.subsequent_special_long_period_unsupportedotherwise, with its row and weight. A FULLY request with no established period reads no disability test, so it still computes._settle_lower_datenow searches fillings that keep the reported start, and refuses by name unless each ending reaches the lower date. A frozen OP12 exit overstated its lower date the same way.The reading (logged,
us:oasdi-insured-subsequent-special-long-period). Two readings stay live past 40 counted quarters: half the whole period, as the Act says, and 20 of the last 40, as the regulation says, which adds nothing to 404.130(b). The session rejected a third parse, 20 QCs anywhere in the period. It drops "out of 40 calendar quarters", the denominator 404.130(d)(2) states, and every period in 404.130 ends with the tested quarter. RS 00301.147 prints Mary Brown's onset result and no date last insured, so it doesn't decide this parse. The conflict sets a statute against a regulation, the pattern in d1920, so the refusal stands until Max rules that pattern._unknown_prior_joint_shortfallproves impossibility, so itsspecial_recenttakes the Act's whole period, and its own 40-quarter test carries the capped reading. The last-40 form raised an input error on a record where the proof's clock holds 21 QCs in 42 quarters and only 19 in the last 40.The new tests check these invented records:
e9f4140ccomputed DISABILITY false with a date last insured of 1991-09-30, where the Act's reading insures this record through 1991-12-31. The row now refuses by name. With an established period the same record raisedInvalidFamilyInput, even for an age-62 FULLY request.e9f4140creported a lower date of 2010-03-31, which needs a later start.All 22 mutations die at the final source bytes, including the three that survived Sol's twelfth review, and 38 of the 261 tests in the three changed modules fail against
e9f4140c. Two early mutations proved equivalent, so the clause they changed left the source.The new tests execute these invariants:
Both oracles now hold a computed result to both readings, and a new
check_unknown_endingexhausts each ending's fillings on the reported start. Local checks at the tree that became88a0e7bc: all 14,332 Track B tests pass and 7 skip in a session process, on round 17 before the master merge. Black and ruff pass. The wide search drew 5,100 invented declarations from fresh seeds, and every check held. A probe of 4,500 stress declarations with an UNKNOWN ending found one record that needs a different filling for each ending, now a public test, and no search reached an ending with no date.Rounds 2 to 16
Rounds 2 to 16 answered the first eleven reviews and two gaps the session's own checks found. GitHub caps a PR body at 65,536 characters, so this body's edit history keeps their notes, and the design note keeps their reasoning.
axiom: TheAxiomFoundation/rulespec-us#2055 queued. Axiom (rulespec-us) encodes 42 U.S.C. 402, 415, 416(l) and 426 but not 413, 414 or 423(c), so no differential exists yet.
🤖 Generated with Claude Code