Repository navigation
Conversation
The variable now defaults to 0, so a non-citizen in a status subject to a five-year bar is treated as inside the bar (and a refugee as inside the RCA window) unless the input is supplied. Tests that are not about the bar now state years_since_us_entry: 5 explicitly. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9732 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 4 3 -1
Lines 76 40 -36
Branches 2 0 -2
=========================================
- Hits 76 40 -36
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…nce-us-entry-default # Conflicts: # policyengine_us/variables/household/demographic/person/years_since_us_entry.py
…nce-us-entry-default
- meets_snap_qualified_alien_waiting_period docstring: the default is now 0, so a bar-subject status without the input is inside the waiting period unless an exception applies. - SNAP tests that relied on the old default now state years_since_us_entry. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
|
@hua7450, this PR needs the partner-test sign-off before two files under Model change. This PR removes
Before this PR, the default of 5 treated them as past the bar. You raised this in standup. Partner cases that change (CI "Household API Partners", run 36952591908):
Proposed edit. Add Partner impact even with that edit. An API partner that sends an LPR without The PR stays a draft and on hold until the data supplies Before I edit either file, could you answer:
|
…nce-us-entry-default
…rging main Main added two direct readers of years_since_us_entry (CHIP immigration eligibility from #9737 and New Hampshire adult cash assistance) and two LIHEAP programs (Nebraska, Oklahoma) that read SNAP immigration eligibility, including the qualified-alien waiting period. - is_chip_immigration_status_eligible Case 7: the Arizona permanent resident checks the post-71109 status list, so it now states five years. - Case 14: the comment no longer relies on the default of 5; the parolee and conditional entrant state five years so only the status limit applies. - New Case 2b locks the default of 0 for CHIP (inside the bar). - ne_liheap_household_size Case 2: the permanent resident couple checks that permanent residents count, so both state five years. - years_since_us_entry documentation names the programs that apply the bar. No expected value changed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
snap_head_immigration_lpr and ssi_aged_lpr_status relied on the old default of 5. Each LPR now states years_since_us_entry: 5, so both expected values are unchanged (SNAP 5,442; Medicaid 13,708.50). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH
|
@hua7450, a quick update on my earlier comment. After talking it over, I've added
I've marked the PR ready for review so CI runs. |
Summary
This PR removes
default_value = 5fromyears_since_us_entry, so the variable now falls back to the float default of 0. #8151 added the default of 5, and its own comment called it "a PolicyEngine modeling decision — not a statutory value." Ziming Hua raised this in standup: the default quietly treated every noncitizen without an entry date as past the federal five-year bar.With a default of 0, the model treats a noncitizen in a status subject to the five-year bar as inside the bar, and a refugee as inside the refugee cash assistance (RCA) window, unless the caller supplies the input. The variable's documentation now says what the input means for each program: for the 8 USC 1613(a) bar, years since entry with qualified-alien status; for the Office of Refugee Resettlement window, years since entry, or since the status grant for statuses such as asylee. Households that supply
years_since_us_entryget the same results as before.Behavior before and after, when the input is omitted
is_medicaid_immigration_status_eligiblewa_tanf_immigration_status_eligiblewa_sfa_immigration_status_eligiblemo_ssp_immigration_status_eligiblewa_rca_immigration_window_eligiblemeets_snap_qualified_alien_waiting_periodis_chip_immigration_status_eligibleis_chip_eligible_child,is_chip_eligible_standard_pregnant_personand California's County Children's Health Initiative Program (CCHIP)nh_ssp_eligiblesnap_alien_qualifying_quarters)ne_liheap_household_size,ok_liheap_immigration_eligibleis_snap_immigration_status_eligible, so a person inside the SNAP waiting period with no exception does not count in the household, and their income is prorated (Nebraska) or deemed (Oklahoma)Downstream of Medicaid, an LPR inside the bar can now qualify for Emergency Medicaid, Illinois Health Benefits for Immigrants, Healthier Oregon, and the ACA premium tax credit's below-100%-FPL exception for lawfully present immigrants.
Code comments in
wa_tanf_immigration_status_eligible(the pre-1996 limitation note) andwa_rca_immigration_window_eligibleno longer refer to the default of 5. Themeets_snap_qualified_alien_waiting_perioddocumentation no longer says the default of 5 leaves everyone past the waiting period. It now says the default of 0 leaves a person in a subject status inside the waiting period unless an exception applies.Test changes
I ran every case that has a person in a bar-subject or RCA status and no explicit
years_since_us_entry(190 cases across 101 files, including partner files). I also ran the full WA DSHS, MO SSP and Medicaid eligibility test directories and every edited file in full. Other cases can't change: every consumer short-circuits citizens, andimmigration_statusdefaults toCITIZEN. No expected value changed. Each case that relied on the old default now states the input:years_since_us_entry: 5and a comment:is_medicaid_immigration_status_eligible.yaml: "Eligible immigration status - Legal Permanent Resident"is_medicaid_eligible.yaml: "Eligible via medicaid eligibility and immigration eligibility"emergency_medicaid/integration.yaml: Case 7il_hbi_eligible.yaml: "LPR senior not eligible"il_hbi_immigration_status_eligible.yaml: "Legal Permanent Resident not eligible for HBI"or_healthier_oregon_immigration_status_eligible.yaml: "LPR NOT eligible (uses federal Medicaid)"years_since_us_entry: 5:is_aca_ptc_eligible.yaml: "Medicaid immigration-eligible immigrant below FPL does not qualify through exception"wa_tanf_immigration_status_eligible.yaml: Case 8. It now duplicates Case 6 and could be dropped.wa_rca_eligible.yaml: Case 5false).true).wa_tanf_immigration_status_eligible.yamlCase 15: the comment now names the default of 0.SNAP, after merging #9661: I ran the SNAP immigration tests (185 cases, counting the two new ones). I also ran 576 more cases: the rest of the SNAP eligibility directory, the SNAP ineligible-member tests and the California SNAP tests. All pass. I also traced all 81 cases, partner files included, that have a person in a waiting-period status and no explicit input. Only four reach
meets_snap_qualified_alien_waiting_period: my two new cases, one case whose outputs don't change, and the partner case below. No expected value changed:years_since_us_entry: 5, with a comment:is_snap_immigration_status_eligible.yaml: Case 7 ("LPR still eligible post-OBBBA").meets_snap_qualified_alien_waiting_period.yaml: Case 5, renamed "adult LPR with five years in qualified status meets the waiting period". It now duplicates Case 4.false).false), and an LPR child is exempt (true).After merging main on October 26, 2026
The merge with main (545 commits) had no conflicts. Main added two direct readers of
years_since_us_entry:is_chip_immigration_status_eligible(#9737) andnh_ssp_eligible. It also added the Nebraska and Oklahoma LIHEAP programs, which read SNAP immigration eligibility, including the waiting period. I scanned every YAML case for a person in a qualified-noncitizen status with noyears_since_us_entry(208 cases in 116 files). I then ran 30 non-partner files (516 cases): the 22 whose outputs can reach a reader, and every other test file this PR edits. All pass after the changes below. No expected value changed:is_chip_immigration_status_eligible.yaml:years_since_us_entry: 5, with a comment. Without it, the LPR fails the bar.false.false).ne_liheap_household_size.yamlCase 2 tests whether permanent residents count. Both LPRs now stateyears_since_us_entry: 5. Without the input, their household size falls from 2 to 0.years_since_us_entrydocumentation now names the programs that apply the bar: Medicaid, CHIP, Washington TANF, and the Missouri and New Hampshire SSPs.Partner test impact
Two partner cases relied on the old default. Each LPR now states
years_since_us_entry: 5(commit d013717), so both expected values are unchanged and both files pass (38 cases). Without the input, these are the values a caller who omits the field would get:partners/analytics_coverage/edge_cases/federal/cash/ssi/federal.yaml, casessi_aged_lpr_status (federal), a 65-year-old LPR in Texas in 2026:medicaidfalls from 13,708.50 to 0.is_medicaid_eligiblechanges from true to false.partners/analytics_coverage/edge_cases/federal/nutrition/snap/federal.yaml, casesnap_head_immigration_lpr (federal). The household is in Texas in 2026: a 35-year-old LPR head earning $20,000, a citizen spouse and a citizen child.snapfalls from 5,442 to 4,158 a year. The head is inside the waiting period, so the head becomes an ineligible member: excluded from the unit, with income prorated.is_snap_eligiblestays true.Microsim note
The default dataset (
populace_us_2024.h5@populace-us-2024-spm-20260909) has noyears_since_us_entrycolumn, so every record uses the default. It does fillimmigration_status_str:No records are refugee, asylee, parolee or conditional entrant.
This PR therefore moves all 11.03M weighted LPRs from past the bar to inside it:
These counts predate the merge of #9737 and the newer programs. LPR children and pregnant people in states that elected the lawfully residing option, including California for children, now pass Medicaid through the option. The Medicaid effect is therefore smaller than "nationwide" above. The CHIP, New Hampshire SSP and Nebraska and Oklahoma LIHEAP effects are not counted here.
The dataset carries the raw CPS year-of-entry code
PEINUSYR. By my unverified reading of the code bands, about 26% of weighted LPRs (2.86M) entered in 2020 or later. Neither default fits the population. The old default overstated eligibility for recent entrants, and the new one understates it for long-resident LPRs. Of the 8.64M adult LPRs with no exception, 1.92M have those codes. Derivingyears_since_us_entryin the data (PolicyEngine/microcosm#776) resolves this; without it, expect a material drop in modeled Medicaid enrollment and in SNAP benefits among LPRs.axiom: n/a: the default value of years_since_us_entry is a PolicyEngine input convention, not a provision of law
🤖 Generated with Claude Code
https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH