Skip to content

Bind SSI targets to SSA's federal payment columns - #1573

Draft
MaxGhenis wants to merge 1 commit into
mainfrom
us-ssi-federal-targets-1558
Draft

MaxGhenis wants to merge 1 commit into
mainfrom
us-ssi-federal-targets-1558

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

WIP. This branch holds the rebind and its tests. The feed re-pin waits on PolicyEngine/chronicle#434; PolicyEngine/chronicle#294 merged on 10 November.

Summary

Engine ssi computes the federal SSI payment, but Microcosm's SSI targets also count the state supplements SSA administers. This branch's compiler binds them to the federal columns of SSA Annual Statistical Supplement Tables 7.B3 and 7.B7, which PolicyEngine/chronicle#434 adds to the feed:

Role Targets Source at main Source here
ssi_total 1 The OASDI table's SSI row: $63.08 billion in 2024, federal SSI plus federally administered state supplementation Table 7.B7's All-areas federal payments: $59.67 billion
ssi_state_payments 51 Table 7.B1's state totals, which count both kinds of payment Table 7.B7's federal payments, 50 states and DC
ssi_recipients 51 Table 7.B1's state totals, which count recipients of either kind Table 7.B3's federal recipients in December 2024, 50 states and DC

SSI Monthly Statistics' three age bands keep the national caseload, and they sum to Table 7.B3's All-areas count, 7,289,843. Table 7.B1's rows, the OASDI SSI row, Table 7.B3's All-areas row and the two tables' state supplementation and average payment columns bind nothing.

The target-parity tool marks Table 7.B1's two families superseded, the two average payment families non-linear and the two state supplementation families deferred, and moves the red line from ssa_supplement.ssi_recipients to ssa_supplement.ssi_federal_payment_recipients.

Each role keeps family ssa, its measure mode (sum for dollars, indicator_sum for recipients) and so its loss-weight basis. The targets take new names from their source records and new hierarchy categories: ssi_total and ssi_state_payments share "Federal SSI payments", and ssi_recipients joins the age bands under "Federal SSI payment recipients". The recipient facts count December 2024, so the compiler gives their 2024 targets no Chronicle label, as it does for the age bands.

Target moves

A prototype feed takes Tables 7.B1, 7.B3 and 7.B7 from PolicyEngine/chronicle#294 and PolicyEngine/chronicle#434 and every other row from the pinned feed.

Role Main, pinned feed This branch, prototype feed Change
ssi_total $63.08 billion $59.67 billion −5.4%
ssi_state_payments, summed over the 51 targets $63.92 billion $59.66 billion −6.7%
ssi_recipients, summed over the 51 targets 7,332,400 7,288,741 −0.6%

Two changes make up each state's move. PolicyEngine/chronicle#294 corrects the Table 7.B1 package, whose 416 values at the pinned feed match SSA's table in one cell, the national payment total. The correction moves all 51 state payment totals by a median of +8.2%, from −22.9% in Massachusetts to +57.7% in Idaho. It moves all 51 recipient totals by a median of +2.5%, from −12.7% in Maine to +56.3% in Idaho. The federal columns then differ from the corrected totals in the 11 states and DC with federally administered supplementation, and in Alabama's recipient count by 4. For example, California's payment target falls 29.7% from its corrected Table 7.B1 total and 40.4% from main's.

Plan

  1. Add SSA Supplement 2025 Tables 7.B3 and 7.B7 by state chronicle#434 merges.
  2. Cherry-pick Replace SSA Table 7.B1 values with SSA's own workbook chronicle#294 and Add SSA Supplement 2025 Tables 7.B3 and 7.B7 by state chronicle#434 onto the feed pin, Chronicle 41b2fb2, tag the branch and rebuild the feed with tools/build_us_chronicle_feed.py. If Calibrate ACS local state slices to Census Vintage 2025 age groups #1531 re-pins the feed first, cherry-pick onto its feed commit instead. The scope gains six record-set pairs at build year 2024: four from Table 7.B3 (month 2024-12) and two from Table 7.B7 (calendar year 2024).
  3. Re-pin us/chronicle_feed.json and the scope file, regenerate the parity resources with tools/build_us_target_parity_manifest.py, list the replaced Table 7.B1 rows and the added rows for the ESI premiums re-pin chain test, and add this re-pin to docs/us-chronicle-feed-repin.md.
  4. Re-solve on the latest certified frame, on main's target register at merge, and report the changed targets' fit and every other family's loss.
  5. Review, then mark ready.

Invariants

test_us_fiscal_targets.py checks these for the SSA dispatch:

  1. Federal figures only. Hypothesis generates 400 facts over the six Table 7.B3 and 7.B7 record sets, three measures and four kinds of place: the nation, the 50 states and DC, the outlying areas, and a county. A target compiles only from Table 7.B7's federal payments or Table 7.B3's federal recipients, and each binds engine ssi, as a dollar sum for payments and an indicator sum for recipients.
  2. One national dollar target. ssi_total binds Table 7.B7's All-areas federal payments once, and no target takes Table 7.B7's Total ($63,079,493,000) or its state supplementation ($3,414,366,000).
  3. Each state once per role. The test compiles every row of the three tables and the OASDI SSI row for the nation, the 50 states, DC and the Northern Mariana Islands. It gets one ssi_total, 51 ssi_state_payments and 51 ssi_recipients targets, one for each FIPS code of the 50 states and DC, and no outlying area or county binds.
  4. Table 7.B1 and the OASDI SSI row never bind (Hypothesis, 300 examples over both measures, every category and every area).
  5. The age bands keep the national caseload under role ssa_ssi_age_band_recipients, and Table 7.B1's aged category row never binds as the 65+ band.

test_release_target_parity.py checks that ssa_supplement.ssi_federal_payment_recipients sits on the red line and compiles, and that the Table 7.B1 families carry the superseded classification.

Checks run at 722544b

A script called each test directly:

  • test_us_fiscal_targets.py: 177 passed and 1 failed. The failing test, test_pinned_feed_national_state_surface_restores_the_fences, pins the pinned feed's registry at 33,250 targets. That feed lacks both new tables, so until the re-pin this branch compiles 33,147 from it, with no SSI target but the three age bands. CI has no feed and skips the four pinned-feed tests.
  • test_release_target_parity.py: 35 passed and 6 failed. The six that fail check the shipped manifest and the pinned feed, which the re-pin regenerates and replaces: test_committed_artifacts_match_regeneration, test_gate_passes_on_real_compiled_registry, test_checked_in_anti_rot_passes, test_federally_administered_ssi_families_are_superseded, test_red_line_families_are_compiled and test_ssi_federal_families_are_compiled.
  • test_us_soi_congressional_district_vintage.py: 51 passed.

On the prototype feed, main's code and this branch's each compile a US registry of 33,250 targets, 6,102 of them in the national_state surface. 103 targets leave (Table 7.B1's 51 payment and 51 recipient totals and the OASDI SSI row), and 103 join (Table 7.B7's All-areas and 51 state federal payments, and Table 7.B3's 51 state federal recipients). Each new target keeps the role, state, family, entity, measure mode, base variable and target period of the one it replaces, and takes its place in the national_state surface. No other target changes. When the parity tool regenerates its resources from that feed, its gate passes on this branch's registry, with 32 compiled families and 70 reviewed exclusions.

Refs #1558.

🤖 Generated with Claude Code

Engine ssi computes the federal SSI payment, but the SSI targets also counted
the state supplements SSA administers. ssi_total took the OASDI table's SSI row
($63.08 billion in 2024, Table 7.B7's Total column), and the state targets took
Table 7.B1's totals. Tables 7.B3 and 7.B7 of SSA's 2025 Supplement
(PolicyEngine/chronicle#434) give federal SSI its own columns, and the targets
now bind them:

- ssi_total: Table 7.B7's All-areas federal payments, $59.67 billion.
- ssi_state_payments: Table 7.B7's federal payments in the 50 states and DC.
- ssi_recipients: Table 7.B3's December 2024 federal recipients in the 50
  states and DC.

SSI Monthly Statistics' three age bands still carry the national caseload, and
they sum to Table 7.B3's All-areas count, 7,289,843. Table 7.B1's rows, the
OASDI SSI row, Table 7.B3's All-areas row and the two tables' state
supplementation and average payment columns bind nothing.

The target-parity tool marks Table 7.B1's two families superseded, the two
averages non-linear and the two state supplementation families deferred, and
moves the red line from ssa_supplement.ssi_recipients to
ssa_supplement.ssi_federal_payment_recipients. Comments that gave Table 7.B1's
national count as 7,404,820, about 115,000 above the federal count, now give
7,423,856 and 134,013.

Tests cover each binding, the full tables (one ssi_total and one target per
state for each state role) and two Hypothesis properties of the routing. The
pinned feed (Chronicle 41b2fb2) lacks both new tables, so six parity tests fail
against the shipped manifest until the feed re-pin regenerates it.

Refs #1558.

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

This branch has not been deployed

No deployments
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