Preserve claiming state through disability conversion - #437
Draft
MaxGhenis wants to merge 1 commit into
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Sep 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Disability conversions and people already marked as claimed can currently receive a new behavioral claiming-age draw when their planned age is missing. Add an explicitly imported successor adapter that partitions those people out before any PMF lookup or random draw. A conversion retains a missing behavioral plan, enters claimed state, and keeps that state after its annual event flag clears; existing plans and previously claimed years remain intact.
Callers can inject
populace_dynamics.engine.claiming.apply_claimingthrough the existingPeriodModules.claiminginterface. The historical function and registered assembly remain unchanged. An exact source exclusion and reachability assertions keep this separate module outside the historical birth-evidence identity while retainingengine.stepsin that identity.The schedule, age-50 threshold, nearest-year selection, and per-person random streams are unchanged. Eligible keyed draws match the historical adapter; the batch fallback is reproducible but can shift other people's same-seed draws because excluded people no longer consume randomness. This does not establish statutory conversion timing, insured status, PIA, benefit correctness, or a new scientific acceptance result.
Validation: 31 focused tests passed (17 new synthetic cases, 11 existing engine-step cases, and three exact source-identity/reachability selectors); Black at 79 columns, Ruff, and
git diff --checkpassed. The real annual projection loop is exercised with an injected successor and synthetic other steps. Full local collection was not run. The test-tier baseline adds the 17 new unit cases, for 5,775 total cases. Independent source review covers the adapter, tests, documentation, and historical identity boundary.