Skip to content

Fix SNAP state take-up crash: Frame.broadcast only targets person#414

Closed
daphnehanse11 wants to merge 1 commit into
mainfrom
fix-snap-spm-unit-state-fips
Closed

Fix SNAP state take-up crash: Frame.broadcast only targets person#414
daphnehanse11 wants to merge 1 commit into
mainfrom
fix-snap-spm-unit-state-fips

Conversation

@daphnehanse11

Copy link
Copy Markdown
Collaborator

Every release run crashes at the SNAP state take-up stage (#376's wiring):

ValueError: broadcast target must be the person entity 'person', got 'spm_unit'.

_spm_unit_state_fips asked Frame.broadcast for a spm_unit target, but broadcast supports only the person entity by contract (bundle.py:757). The helper was never unit-covered, and no release-scale run had reached this stage until Build K (staging, 2026-07-13): earlier main-head attempts die at the QBI base-column requirement first (#412), so Build M will hit this crash once it clears its source stages.

Fix

Broadcast state_fips to persons and collapse to one value per SPM unit via person_spm_unit_id (members of an SPM unit share a household, hence a state), aligned to spm_unit table order, with a hard error on member-less SPM units. Regression test added (borrows the _us_frame fixture from the take-up stage tests).

Verified at release scale: Build K (b335241 + this fix, base-j 0b50660a…) proceeds past the SNAP state take-up stage.

Refs #372, #376.

🤖 Generated with Claude Code

… SPM unit

Frame.broadcast rejects group-entity targets, so the SNAP state take-up
stage crashed on every release run. Broadcast state_fips to persons and
take the first value per person_spm_unit_id, aligned to spm_unit table
order. Build K local fix at b335241; same defect exists on main.

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

Copy link
Copy Markdown
Collaborator Author

Superseded by #426, which lands the same person-linkage routing with a fail-closed single-household check plus regression coverage in the builder tests. Closing; the Build K run that surfaced the crash is documented in #419.

@daphnehanse11 daphnehanse11 deleted the fix-snap-spm-unit-state-fips branch July 14, 2026 12:25
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