PolicyEngine / PolicyEngine/microcosm

E19200 split: share AGI validation with the exported low-level splitter; band-boundary controls for Decimal/string AGI

Open
#562 0 comments 0 reactions 0 assignees View on GitHub

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:

  1. The low-level splitter is exported and permissive. split_us_puf_e19200_by_agi_band casts 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_dtype element screen + finiteness) and passes validated float64 down — but the splitter is separately exported from populace.build.us_runtime. Either share the validation (move/reuse the screen inside the splitter) or remove the low-level export.

  2. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.