PolicyEngine / PolicyEngine/microcosm
Seed protocol: declare draw_condition for zero-target humanitarian sites
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 0
- Forks
- 4
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 94
Description
Split from #767 / #779 review (Sep 4).
The thirteen immigration_humanitarian_*_assignment sites in spec_engine/seeds.py use the default draw_condition="always", but the kernel skips a category whose cited target is zero (if draw.target <= 0: continue in _assign_humanitarian_statuses) — so the deportation_withheld site (explicit cited zero) declares a draw it never consumes. The existing TANF/EITC sites show the precedent for a conditional declaration (only_for_missing_or_legacy_constant_output_cells).
Fix: declare the humanitarian sites with something like draw_condition="only_when_cited_target_positive". This changes the seed-protocol digest, so bundle it with the next change that already moves the attested identities (envelope digests, seed protocol/map digests, coverage evidence) rather than paying the re-pin cascade for a label alone. Purely a protocol-honesty fix; no behavioral change.
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 spec_engine/seeds.py and inspect the thirteen immigration_humanitarian_*_assignment sites, then compare the TANF/EITC sites' conditional declaration. Check how _assign_humanitarian_statuses handles zero targets and verify the protocol digest and attested identity updates are bundled with the next planned change without altering behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 63/100