Skip to content

Refuse a pre-1956 prior that only some placement begins - #614

Draft
MaxGhenis wants to merge 1 commit into
masterfrom
trackb-b1-placement-20261129
Draft

MaxGhenis wants to merge 1 commit into
masterfrom
trackb-b1-placement-20261129

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

An independent audit of #562's last head, ecbee31e, found one wrong status in the insured-status rule. Under RS00301.480 A and B.1, a listed prior that starts from July 1952 through 1955 needs, among other conditions, at least 20 QCs by the end of its first quarter. _prior_basis accepted such a prior wherever those conditions held at its start on some placement of the start year's annual QCs. A later disability test could then put the same QC in a quarter that never began the prior.

For example, the audit's worker has 19 QCs before 1955, one 1955 agricultural QC, a prior from January 1 to September 30, 1955, and every quarter from 1961Q1 through 1965Q3. Only a 1955Q1 placement begins the prior. For the 1965Q3 test, master puts the QC in 1955Q4, reaches 20 of 40 and reports the worker disability-insured with a DLI of September 30, 1965. Every placement that begins the prior leaves 19 QCs in that window, and with the QC fixed in 1955Q1 the rule reports the worker not insured.

The rule now accepts such a prior only where those conditions hold on every placement a later test could choose (_pre1956_counts_on_every_placement). Elsewhere it refuses by disability_before_1956_unsupported, and the row keeps its weight. The refusal also covers some records that a search over the placements that begin the prior would settle, and #612 tracks that search.

The PR also fixes the audit's three lows. The rulespec dispatch (docs/design/track_b_insured_status_rulespec_issue.md) now keeps the exit year's annual QCs assignable within that year and asks for DLI monotonicity on a fixed insured basis only. The SIMPLIFIED_PRE1951 row in the design note now matches its register entry. #612 also tracks the audit's nit on nine quotations.

Verification

  • tests/test_track_b_insured_status_b1_placement.py adds 18 unit tests, and 11 of them fail on master's insured_status.py. They cover the audit's record with observed, UNKNOWN-later-year and frozen-exit histories, a prior that every placement begins, and a grid of start quarters, 1940 credits and 1955 pay. Across the grid, a supported answer must report the worker insured when and only when some fixed placement that begins the prior does. On three of the grid's eight records, master reports the worker insured where every such placement reports not insured.
  • b1_placement_mutations in docs/design/track_b_insured_status_mutations.json records five mutations of the fix, each applied in memory at this source. Each fails between 5 and 11 tests in the new module, and the audit hook counts no restricted open and no subprocess.
  • All 42 insured-status modules pass on invented data, with both data roots pointed at nonexistent paths: 2,015 passed, none skipped.
  • black 26.5.1 (-l 79) and ruff pass on both changed Python files.
  • The tier files gain the new module's 18 unit tests: unit 26,672 and total 36,141.

axiom: TheAxiomFoundation/rulespec-us#2055 queued. A comment on #2055 adds B.1's placement requirement and the two corrected dispatch sentences to its encoding contract.

🤖 Generated with Claude Code

The audit of #562's head ecbee31 found one wrong status. For a listed
prior that RS00301.480 B.1 begins from July 1952 through 1955,
_prior_basis returned None wherever B.1's counts held at the start on
some placement of the start year's annual QCs. A later disability test
then placed that QC in a quarter that never began the prior and could
report DISABILITY true. The rule now returns None only where B.1's
counts hold on every placement a later world can choose, and elsewhere
refuses by disability_before_1956_unsupported and keeps the row.

The commit also brings the rulespec dispatch's exit-year and DLI
monotonicity sentences and the SIMPLIFIED_PRE1951 row in line with the
code, records five mutations in b1_placement_mutations, and adds 18
unit tests (unit 26,672, total 36,141). Issue #612 tracks the joint
search that settles the records this refusal takes in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
social-security-model Ready Ready Preview Nov 29, 2026 12:54pm UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview — 724e3c8f Deployed Nov 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant