Skip to content

Populate reported TANF, SNAP, and WIC enrollment from CPS admin-linkage fields (#591) - #600

Merged
MaxGhenis merged 8 commits into
mainfrom
reported-enrollment-591
Aug 3, 2026
Merged

Populate reported TANF, SNAP, and WIC enrollment from CPS admin-linkage fields (#591)#600
MaxGhenis merged 8 commits into
mainfrom
reported-enrollment-591

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

Three of the five never-populated engine inputs from the #591 audit are class-1 admin-linkage facts the CPS actually reports. This wires them from the raw ASEC checkpoint through the pre-clone CPS-carried producer and the ACS transfer:

Variable Source Positive units
is_tanf_enrolled PAW_VAL (SPM-unit max > 0) 1,997 SPM units
receives_snap SPM_SNAPSUB (shared max-positive path with SNAP take-up seeding) 18,452 SPM units
receives_wic WICYN == 1 4,039 reporting adults

WIC follows the carrier convention adjudicated on #591: Census asks adult women (possibly reporting for a child beneficiary), so the flag on the reporting adult IS the SPM unit's receipt fact, and unit-level aggregation is the only supported consumption grain. The consumer-existence guard now enforces that mechanically — every engine consumer of receives_wic must consume it at spm_unit grain (both current consumers do: VA spm_unit.any, MD add(spm_unit, …)); a synthetic person-grain consumer injected into the AST index fails CI by name with the adjudication link.

All three document the annual-positive → all-12-month broadcast (unknown entry/exit timing; TANF's zero-dollar sanctioned-case limitation), with January and December live-engine tests. Transfer plan: 115 → 118 targets, surface 139, hash recomputed from the live registry at each step.

Medicaid stays unpopulated pending upstream policyengine-us#9206 (consumers read enrollment where eligibility is meant); previous_year_income_available / qualified_bdc_income remain the two adjudicated gate-consumed exceptions.

Verification: focused 12 + guards 190 + broader 308; full workspace 4,949 passed / 59 skipped; ruff + format + git diff --check clean; #583 guard unchanged at 495.

Part of #591.

🤖 Generated with Claude Code

MaxGhenis and others added 8 commits August 2, 2026 18:59
# Conflicts:
#	packages/populace-build/tests/test_us_multispine_pool.py
PAW_VAL > 0 conflates TANF with other cash welfare: the official ASEC
dictionaries split the program with PAW_TYP (1 TANF/AFDC, 2 other,
3 both), and in the 2023 ASEC 271 of 682 PAW-positive SPM units (39.7%
unweighted, 42.6% SPM-weighted) report no TANF type. The engine's
is_tanf_enrolled feeds TANF-specific cycle-safe helpers, so those units
must not be marked enrolled.

Restore PAW_TYP from the pinned official Census ASEC person archives —
the ED_VAL sidecar repair class, sharing its per-income-year archive
pins — carry it through the raw-stage checkpoint (schema v3, exact
integer composition audits per year), and gate the SPM-unit predicate
on any member reporting PAW_VAL > 0 with PAW_TYP in {1, 3}. Callers
deriving from frames without PAW_TYP must pass the pinned sidecar;
falling back to PAW_VAL alone is refused loudly.

Regenerated raw-stage checkpoint receipts: all 183 pre-existing columns
byte-identical, person.PAW_TYP the only addition; reported-TANF units
1,997 -> 1,191 across the pooled years (2022: 682 -> 411).

Fixes round-1 review finding on #600 (populace#591).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Round-1 finding addressed in c219b6f: is_tanf_enrolled is now gated on PAW_TYP ∈ {1,3}, with PAW_TYP carved into the ASEC raw-stage checkpoint via the pinned-sidecar restoration pattern (ED_VAL/LKWEEKS precedent — the frozen roots' producer repo is archived, so the sidecar restores from the pinned official Census ASEC archives). Regenerated checkpoint: schema v3, sha 51e9fafc…, all 183 pre-existing columns byte-identical across all six entity tables (PAW_TYP is the only addition; the source-construction frame is byte-identical, proving nothing upstream moved). Reported-TANF units 1,997 → 1,191 (−40.4%); the 271 type-unreported 2022 units from the review are exactly the drops. Fail-closed: positive PAW_VAL without PAW_TYP raises; the v3 loader rejects v2 artifacts. Full workspace 4,956 passed / 0 failed; plan unchanged at 118/139.

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