From 23b6a949ab3df226143be9d557b134df6d3ff463 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Fri, 6 Nov 2026 09:37:35 -0500 Subject: [PATCH] Give the whole-period proof test a July onset Since round 23, _unknown_prior_joint_shortfall drops an uncredited onset quarter from its clock when a prior can end in that quarter, which needs an onset after the quarter's first month. With its August 1975 onset, test_unknown_prior_history_keeps_its_row_on_the_whole_period lost 1975Q3 that way. Its clock then held 41 quarters with 20 QCs in the last 40, so the test no longer told the Act's half of the whole period from the regulation's 20 of the last 40. A July onset keeps 1975Q3 on the clock, and the regulation's cap now fails the test. The mutation report's round 25 list holds that run, so a later list can carry proof_keeps_last_40 forward. Co-Authored-By: Claude Opus 5.5 --- docs/design/track_b_insured_status.md | 24 ++++++++++++++ .../track_b_insured_status_mutations.json | 32 ++++++++++++++++++- ...est_track_b_insured_status_fix_round_17.py | 9 ++++-- 3 files changed, 61 insertions(+), 4 deletions(-) diff --git a/docs/design/track_b_insured_status.md b/docs/design/track_b_insured_status.md index 4a1f68e4..601594d9 100644 --- a/docs/design/track_b_insured_status.md +++ b/docs/design/track_b_insured_status.md @@ -3954,6 +3954,30 @@ These tests execute the invariants this round adds: (`test_a_middle_completion_past_the_boundary_cap_refuses`, `test_the_boundary_guard_refuses_only_past_4096`). +## Round 25 the whole-period proof keeps its test + +Verification class: statutory conformance on invented declarations only. This +correction admits no population, behavioral, payment, or forecast claim. + +Since round 23, `_unknown_prior_joint_shortfall` drops an uncredited onset +quarter from its clock when a prior can end in that quarter. +`test_unknown_prior_history_keeps_its_row_on_the_whole_period` had an August +1975 onset, so a prior could end in July. Its clock then held 41 quarters at +1975Q3 with 20 QCs in the last 40, and the proof's own 40-quarter test kept the +row on either reading. This test caught round 17's `proof_keeps_last_40`, and +round 23's list didn't carry that mutation, so no run showed the loss. At +`4ab97297`, that mutation's cap passes all 1,997 cases in the 41 insured test +modules. + +The test now has a July onset. A prior can end in an onset's quarter only in an +earlier month of that quarter, and July opens 1975Q3, so the clock keeps that +quarter and holds 42 quarters. The 21 QCs meet half of them and 19 sit in the +last 40. With the regulation's cap in `special_recent`, the rule raises +`InvalidFamilyInput` on this record, and `proof_keeps_last_40` fails this test +again. `insured_status.py` doesn't change. `round_25_mutations` in +`track_b_insured_status_mutations.json` holds that run, and a later list takes +round 24's 135 mutations and this one. + ## Not in scope No real data, population evaluation, baseline claiming hazard, behavioral diff --git a/docs/design/track_b_insured_status_mutations.json b/docs/design/track_b_insured_status_mutations.json index e1fbea14..8eba2f0c 100644 --- a/docs/design/track_b_insured_status_mutations.json +++ b/docs/design/track_b_insured_status_mutations.json @@ -16686,5 +16686,35 @@ "tests/test_track_b_insured_status_status_stress.py": "882e3b1f0a1c91fd126d8ba85da50fd7672b475b13b81eb48e132d470cd27bed" }, "round_24_replay": "Write round_24_runner_source to scratch/review/run_round24_named.py. For each round_24_mutations record, write name/source_sha256/changes to its spec_path, then execute its exact command at d30e4426. Mutations apply only in memory.", - "round_24_final_source_sha256": "7d2d202b02bfcc14ee4d988cb35bef8706bf28de7af494fd6bad2f674ca80c89" + "round_24_final_source_sha256": "7d2d202b02bfcc14ee4d988cb35bef8706bf28de7af494fd6bad2f674ca80c89", + "round_25_mutations": [ + { + "changes": [ + { + "before": " window, required = elapsed, max(6, len(elapsed) // 2)\n return len(set(window) & assigned) >= required\n", + "after": " window, required = elapsed[-40:], max(6, min(40, len(elapsed)) // 2)\n return len(set(window) & assigned) >= required\n" + } + ], + "command": "env POPULACE_DYNAMICS_PSID_DIR=/nonexistent/trackb-round24 POPULACE_DYNAMICS_EPUF_DIR=/nonexistent/trackb-round24 OMP_NUM_THREADS=1 OMP_WAIT_POLICY=PASSIVE POLARS_MAX_THREADS=1 PYTHONPATH=$PWD/src:$PWD PYTHONDONTWRITEBYTECODE=1 TRACKB_ROUND24_MUTATION=scratch/review/round25-mutation-proof_keeps_last_40.json HYPOTHESIS_STORAGE_DIRECTORY=scratch/review/hyp25/proof_keeps_last_40 python scratch/review/run_round24_named.py -p no:xdist -p no:cacheprovider -q -x --tb=line -rf tests/test_track_b_insured_status_fix_round_17.py::test_unknown_prior_history_keeps_its_row_on_the_whole_period", + "exit_code": 1, + "failing_test_nodes": [ + "tests/test_track_b_insured_status_fix_round_17.py::test_unknown_prior_history_keeps_its_row_on_the_whole_period" + ], + "log": "scratch/review/round25-mutation-proof_keeps_last_40.log", + "name": "proof_keeps_last_40", + "open_audit": { + "os.system": 0, + "restricted_opens": 0, + "subprocess.Popen": 0 + }, + "source_sha256": "7d2d202b02bfcc14ee4d988cb35bef8706bf28de7af494fd6bad2f674ca80c89", + "spec_path": "scratch/review/round25-mutation-proof_keeps_last_40.json" + } + ], + "round_25_note": "proof_keeps_last_40 fails the named test with the July onset. At 4ab97297, with the August onset, the same cap, written as (elapsed[-40:], 20) past 40 quarters, passed all 1,997 cases in the 41 insured test modules. A later round's list takes round 24's 135 mutations and this one.", + "round_25_test_sha256": { + "tests/test_track_b_insured_status_fix_round_17.py": "c6fa611f7ba7b031c97dc09c7fc937853d5f949d5449bfd1921d9c9b29dd1065" + }, + "round_25_replay": "Write round_24_runner_source to scratch/review/run_round24_named.py. Write the round_25_mutations record's name/source_sha256/changes to its spec_path, then execute its exact command. Mutations apply only in memory.", + "round_25_final_source_sha256": "7d2d202b02bfcc14ee4d988cb35bef8706bf28de7af494fd6bad2f674ca80c89" } diff --git a/tests/test_track_b_insured_status_fix_round_17.py b/tests/test_track_b_insured_status_fix_round_17.py index e49dfaa9..a4775693 100644 --- a/tests/test_track_b_insured_status_fix_round_17.py +++ b/tests/test_track_b_insured_status_fix_round_17.py @@ -185,12 +185,15 @@ def test_an_age_62_fully_request_keeps_its_row(exit_month, last): def test_unknown_prior_history_keeps_its_row_on_the_whole_period(): # Fixed QCs sit in 1965Q2, 1965Q3, 1967Q1 to Q3 and 1971Q3 to 1975Q2. The # joint proof's clock drops uncredited quarters after the first possible - # prior, which leaves 42 quarters at 1975Q3. The 21 QCs meet half of those - # and only 19 sit in the last 40, so the proof must not reject the row. + # prior. No prior can end in 1975Q3 before a July onset, so the clock keeps + # that quarter and holds 42 at 1975Q3. The 21 QCs meet half of those and + # only 19 sit in the last 40, so the proof must not reject the row. A prior + # can end in July before an August onset, which leaves 41 quarters with 20 + # QCs in the last 40, and that record keeps its row on either reading. person = i.Person( date(1944, 2, 2), sex=i.Sex.FEMALE, - disability_onset=date(1975, 8, 15), + disability_onset=date(1975, 7, 15), current_disability_period_established=True, current_disability_period_provenance=OBSERVED, current_disability_period_end=date(1976, 6, 30),