PolicyEngine / PolicyEngine/microcosm
acs-local: weekly_hours_worked_before_lsr defaults to 40, silently nulling SNAP ABAWD analysis
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 0
- Forks
- 4
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 94
Description
Reported by @TheDavidTrimmer in Slack (#microcosm-us, 2026-08-24), with the full trace — filing so the fix has a tracking home.
Defect: on the acs-local builds (populace-us-2024-buildp-acs-local-592ae5d6…), weekly_hours_worked_before_lsr arrives ~96% defaulted: the gate summary shows it missing for 3.4M of 3.6M ACS-spine persons, and the engine default fills 40 hours. The SNAP ABAWD work-requirement test reads this variable, and 40 clears both the 20- and 30-hour thresholds — so every affected person looks compliant and the OBBBA work-requirement counterfactual silently returns ~$0. No error is raised.
Trace (David's): hours_worked_last_week in the same file is real (mean ~17, 54% zeros), so the signal exists; the _before_lsr leaf specifically isn't transferred. acs_transfer.py skips it as a runtime-owned leaf; the seeding stage wants ASEC columns the ACS-spine persons don't have; and us_hours_worked_signal_gate — which would have caught this — is not wired into the local finalize gates. The national stacked-spine pool is unaffected because #578 already QRF-transfers weekly_hours_worked_before_lsr from ASEC HRSWK; that transfer was never extended to the local-area lane.
Impact: blocks the state + congressional-district SNAP work-requirement analysis (Daniel Kim's paper). An interim proxy (override with hours_worked_last_week, corr 0.97 but ~20% high in levels) is fine for exploration, not publication. policyengine-us#9261 already flipped the engine default 40→0, so the remaining work is pipeline-side.
Fix scope:
- Extend the #578 ASEC-HRSWK hours transfer to the local-area builder.
- Wire
us_hours_worked_signal_gateinto the local finalize gates so a defaulted hours column can never ship quietly again. - A regression that fails the local lane on a defaulted
weekly_hours_worked_before_lsr.
🤖 Filed by the microcosm owner session with Claude Code
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in acs_transfer.py and trace the #578 ASEC-HRSWK transfer from the national stacked-spine path into the local-area builder. Then inspect the local finalize gates and the existing us_hours_worked_signal_gate. Done means the local lane transfers weekly_hours_worked_before_lsr, the gate is wired, and a regression fails when that column is defaulted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-engineering, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100