PolicyEngine / PolicyEngine/microcosm
E19200 split: share AGI validation with the exported low-level splitter; band-boundary controls for Decimal/string AGI
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 0
- Forks
- 4
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 94
Description
PR #561 merged (2ae4339a) with the E19200 AGI-band decomposition after a four-round review. The final verdict carried two non-blocking advisories worth closing:
-
The low-level splitter is exported and permissive.
split_us_puf_e19200_by_agi_bandcasts AGI directly to float64, so booleans/datetime/timedelta become finite band values if a caller reaches it directly. Not a production defect — the donor API (puf_tax_unit_donor_from_arrays) validates first (dtype-kind gate +infer_dtypeelement screen + finiteness) and passes validated float64 down — but the splitter is separately exported frompopulace.build.us_runtime. Either share the validation (move/reuse the screen inside the splitter) or remove the low-level export. -
Decimal/numeric-string positive controls prove acceptance, not correct banding. The round-4 controls use a fixture without E19200, so the split short-circuits before band selection. Add a nonzero-E19200 boundary comparison: identical records with AGI supplied as
Decimal/string vs float64 must produce identical mortgage/non-mortgage splits at a band boundary.
Both from the round-4 review verdict on PR #561.
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 with the exported split_us_puf_e19200_by_agi_band and its caller puf_tax_unit_donor_from_arrays in the merged PR #561 changes. Review the existing dtype, element, and finiteness checks, then inspect the round-4 positive controls. Done means direct splitter inputs are handled consistently and nonzero-E19200 Decimal/string boundary cases match float64 mortgage and non-mortgage splits.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, testing-qa
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100