From 346df652309f2d9a246fa2f6ca2f5e8ad98f8185 Mon Sep 17 00:00:00 2001 From: David Trimmer Date: Thu, 1 Oct 2026 09:25:20 -0400 Subject: [PATCH 1/4] Remove the years_since_us_entry default of 5 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) Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH --- ...ve-years-since-us-entry-default.changed.md | 1 + .../aca/eligibility/is_aca_ptc_eligible.yaml | 3 +++ .../eligibility/is_medicaid_eligible.yaml | 2 ++ ..._medicaid_immigration_status_eligible.yaml | 10 ++++++++ .../emergency_medicaid/integration.yaml | 2 ++ .../hfs/hbi/eligibility/il_hbi_eligible.yaml | 2 ++ .../il_hbi_immigration_status_eligible.yaml | 2 ++ ...er_oregon_immigration_status_eligible.yaml | 2 ++ .../dshs/rca/eligibility/wa_rca_eligible.yaml | 15 +++++++++++- .../wa_tanf_immigration_status_eligible.yaml | 9 +++++--- .../wa_rca_immigration_window_eligible.py | 4 +++- .../wa_tanf_immigration_status_eligible.py | 9 ++++---- .../person/years_since_us_entry.py | 23 ++++++++++++------- 13 files changed, 67 insertions(+), 17 deletions(-) create mode 100644 changelog.d/remove-years-since-us-entry-default.changed.md diff --git a/changelog.d/remove-years-since-us-entry-default.changed.md b/changelog.d/remove-years-since-us-entry-default.changed.md new file mode 100644 index 00000000000..0258a867d93 --- /dev/null +++ b/changelog.d/remove-years-since-us-entry-default.changed.md @@ -0,0 +1 @@ +Remove the default of 5 from years_since_us_entry, so it defaults to 0 and noncitizens in statuses subject to the five-year bar are treated as inside the bar unless the input is supplied. diff --git a/policyengine_us/tests/policy/baseline/gov/aca/eligibility/is_aca_ptc_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/aca/eligibility/is_aca_ptc_eligible.yaml index 0c8789a0467..5c0592f1875 100644 --- a/policyengine_us/tests/policy/baseline/gov/aca/eligibility/is_aca_ptc_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/aca/eligibility/is_aca_ptc_eligible.yaml @@ -76,6 +76,9 @@ person1: age: 40 immigration_status: LEGAL_PERMANENT_RESIDENT + # Past the five-year bar, so Medicaid immigration-eligible; previously + # relied on the removed default of 5. + years_since_us_entry: 5 is_medicaid_eligible: false is_chip_eligible: false is_basic_health_program_eligible: false diff --git a/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/is_medicaid_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/is_medicaid_eligible.yaml index 2fb92c16b1e..b4470ce3b25 100644 --- a/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/is_medicaid_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/is_medicaid_eligible.yaml @@ -77,6 +77,8 @@ input: medicaid_category: YOUNG_ADULT immigration_status: LEGAL_PERMANENT_RESIDENT + # Past the five-year bar; this case checks an eligible status. + years_since_us_entry: 5 ca_ffyp_eligible: false output: is_medicaid_eligible: true diff --git a/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/is_medicaid_immigration_status_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/is_medicaid_immigration_status_eligible.yaml index a29c8c2aa0f..dd313825b82 100644 --- a/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/is_medicaid_immigration_status_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/eligibility/is_medicaid_immigration_status_eligible.yaml @@ -9,6 +9,8 @@ period: 2024 input: immigration_status: LEGAL_PERMANENT_RESIDENT + # Past the five-year bar; this case checks the eligible status list. + years_since_us_entry: 5 output: is_medicaid_immigration_status_eligible: true @@ -28,6 +30,14 @@ output: is_medicaid_immigration_status_eligible: true +- name: Legal permanent resident without years_since_us_entry is treated as inside the five-year bar + period: 2025 + input: + immigration_status: LEGAL_PERMANENT_RESIDENT + # years_since_us_entry is omitted, so its default of 0 applies. + output: + is_medicaid_immigration_status_eligible: false + - name: Recent one-year parolee is ineligible during five-year bar period: 2025 input: diff --git a/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/emergency_medicaid/integration.yaml b/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/emergency_medicaid/integration.yaml index 8f4c2c5f1bf..2691ee60b00 100644 --- a/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/emergency_medicaid/integration.yaml +++ b/policyengine_us/tests/policy/baseline/gov/hhs/medicaid/emergency_medicaid/integration.yaml @@ -207,6 +207,8 @@ age: 50 employment_income: 14_000 immigration_status: LEGAL_PERMANENT_RESIDENT + # Past the five-year bar; this case checks an eligible status. + years_since_us_entry: 5 has_emergency_medical_condition: true tax_units: tax_unit: diff --git a/policyengine_us/tests/policy/baseline/gov/states/il/hfs/hbi/eligibility/il_hbi_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/il/hfs/hbi/eligibility/il_hbi_eligible.yaml index 96ae1048e70..40971940a98 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/il/hfs/hbi/eligibility/il_hbi_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/il/hfs/hbi/eligibility/il_hbi_eligible.yaml @@ -68,6 +68,8 @@ state_code: IL age: 70 immigration_status: LEGAL_PERMANENT_RESIDENT + # Past the five-year bar, so federal Medicaid covers this LPR. + years_since_us_entry: 5 social_security: 10_000 output: il_hbi_eligible: false diff --git a/policyengine_us/tests/policy/baseline/gov/states/il/hfs/hbi/eligibility/il_hbi_immigration_status_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/il/hfs/hbi/eligibility/il_hbi_immigration_status_eligible.yaml index 75714b52249..77fa8bbb5ad 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/il/hfs/hbi/eligibility/il_hbi_immigration_status_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/il/hfs/hbi/eligibility/il_hbi_immigration_status_eligible.yaml @@ -35,6 +35,8 @@ input: state_code: IL immigration_status: LEGAL_PERMANENT_RESIDENT + # Past the five-year bar, so federal Medicaid covers this LPR. + years_since_us_entry: 5 output: il_hbi_immigration_status_eligible: false diff --git a/policyengine_us/tests/policy/baseline/gov/states/or/oha/healthier_oregon/eligibility/or_healthier_oregon_immigration_status_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/or/oha/healthier_oregon/eligibility/or_healthier_oregon_immigration_status_eligible.yaml index 02ac7da344a..f4c57108dc8 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/or/oha/healthier_oregon/eligibility/or_healthier_oregon_immigration_status_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/or/oha/healthier_oregon/eligibility/or_healthier_oregon_immigration_status_eligible.yaml @@ -41,6 +41,8 @@ period: 2024 input: immigration_status: LEGAL_PERMANENT_RESIDENT + # Past the five-year bar, so federal Medicaid covers this LPR. + years_since_us_entry: 5 state_code: OR output: or_healthier_oregon_immigration_status_eligible: false diff --git a/policyengine_us/tests/policy/baseline/gov/states/wa/dshs/rca/eligibility/wa_rca_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/wa/dshs/rca/eligibility/wa_rca_eligible.yaml index 2edd2848f13..06c9f7c3fcf 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/wa/dshs/rca/eligibility/wa_rca_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/wa/dshs/rca/eligibility/wa_rca_eligible.yaml @@ -41,16 +41,29 @@ output: wa_rca_eligible: false -- name: Case 5, refugee using default years_since_us_entry (5) - ineligible. +- name: Case 5, refugee 5 years after entry - ineligible (past ORR window). period: 2024-01 input: state_code: WA immigration_status: REFUGEE + # Previously relied on the removed default of 5; now stated explicitly. + years_since_us_entry: 5 wa_tanf_income_eligible: true wa_tanf_resources_eligible: true output: wa_rca_eligible: false +- name: Case 5b, refugee without years_since_us_entry - eligible (default of 0 is inside ORR window). + period: 2024-01 + input: + state_code: WA + immigration_status: REFUGEE + # years_since_us_entry is omitted, so its default of 0 applies. + wa_tanf_income_eligible: true + wa_tanf_resources_eligible: true + output: + wa_rca_eligible: true + - name: Case 6, refugee income-ineligible - ineligible. period: 2024-01 input: diff --git a/policyengine_us/tests/policy/baseline/gov/states/wa/dshs/tanf/eligibility/wa_tanf_immigration_status_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/wa/dshs/tanf/eligibility/wa_tanf_immigration_status_eligible.yaml index 5cb64a042d8..ba4a8bc5789 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/wa/dshs/tanf/eligibility/wa_tanf_immigration_status_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/wa/dshs/tanf/eligibility/wa_tanf_immigration_status_eligible.yaml @@ -69,11 +69,13 @@ output: wa_tanf_immigration_status_eligible: true -- name: Case 8, LPR using default years_since_us_entry is eligible. +- name: Case 8, LPR with years_since_us_entry set to the former default of 5 is eligible. period: 2024-01 input: state_code: WA immigration_status: LEGAL_PERMANENT_RESIDENT + # Previously relied on the removed default of 5; now stated explicitly. + years_since_us_entry: 5 output: wa_tanf_immigration_status_eligible: true @@ -134,7 +136,8 @@ input: state_code: WA immigration_status: CITIZEN - # years_since_us_entry intentionally omitted to rely on the default; the - # is_citizen short-circuit must keep citizens eligible regardless. + # years_since_us_entry intentionally omitted, so the default of 0 (inside + # the bar) applies; the is_citizen short-circuit must keep citizens + # eligible regardless. output: wa_tanf_immigration_status_eligible: true diff --git a/policyengine_us/variables/gov/states/wa/dshs/rca/eligibility/wa_rca_immigration_window_eligible.py b/policyengine_us/variables/gov/states/wa/dshs/rca/eligibility/wa_rca_immigration_window_eligible.py index ea51470b95d..6438ed8d04e 100644 --- a/policyengine_us/variables/gov/states/wa/dshs/rca/eligibility/wa_rca_immigration_window_eligible.py +++ b/policyengine_us/variables/gov/states/wa/dshs/rca/eligibility/wa_rca_immigration_window_eligible.py @@ -13,7 +13,9 @@ class wa_rca_immigration_window_eligible(Variable): ) # NOTE: For asylees and Cuban-Haitian entrants, per 45 CFR 400.211(b), # years_since_us_entry should encode years-since-status-grant rather - # than years-since-physical-entry. + # than years-since-physical-entry. years_since_us_entry defaults to 0, so + # an RCA-eligible person is treated as inside the window unless the input + # is supplied. def formula(person, period, parameters): immigration_eligible = person("wa_rca_immigration_status_eligible", period) diff --git a/policyengine_us/variables/gov/states/wa/dshs/tanf/eligibility/wa_tanf_immigration_status_eligible.py b/policyengine_us/variables/gov/states/wa/dshs/tanf/eligibility/wa_tanf_immigration_status_eligible.py index 12f4b74575b..fc38eaff1f6 100644 --- a/policyengine_us/variables/gov/states/wa/dshs/tanf/eligibility/wa_tanf_immigration_status_eligible.py +++ b/policyengine_us/variables/gov/states/wa/dshs/tanf/eligibility/wa_tanf_immigration_status_eligible.py @@ -16,11 +16,12 @@ class wa_tanf_immigration_status_eligible(Variable): ) # KNOWN LIMITATION (WAC 388-424-0006): qualified aliens who entered the # US before Aug 22, 1996 and continuously resided are NOT subject to the - # 5-year bar. PolicyEngine's default years_since_us_entry of 5 makes - # most pre-1996 entrants pass the past_bar check trivially, but a - # household-calculator user who supplies a low years_since_us_entry for - # a pre-1996 LPR would be incorrectly classified as still within the # 5-year bar. This pre-1996 grandfather is not separately modeled. + # years_since_us_entry defaults to 0, so a pre-1996 entrant is treated as + # within the 5-year bar unless the input is supplied. Supplying years + # since entry passes the past_bar check, but supplying years since a + # recent status grant for a pre-1996 LPR would incorrectly classify them + # as still within the bar. def formula(person, period, parameters): status = person("immigration_status", period.this_year) diff --git a/policyengine_us/variables/household/demographic/person/years_since_us_entry.py b/policyengine_us/variables/household/demographic/person/years_since_us_entry.py index 3474709da9b..d36ea4165b1 100644 --- a/policyengine_us/variables/household/demographic/person/years_since_us_entry.py +++ b/policyengine_us/variables/household/demographic/person/years_since_us_entry.py @@ -5,14 +5,21 @@ class years_since_us_entry(Variable): value_type = float entity = Person label = "Years since US entry or qualified immigration status grant" + documentation = ( + "Years since the person entered the United States or was granted the " + "qualifying immigration status, measured as each program starts its " + "clock. The federal five-year bar under 8 USC 1613(a) runs from entry " + "with qualified-alien status; the refugee cash assistance window runs " + "from entry for refugees and from the status grant for some other " + "statuses, such as asylees. When not supplied this defaults to 0, so a " + "noncitizen in a status subject to the five-year bar is treated as " + "inside the bar, and a refugee as inside the refugee cash assistance " + "window." + ) unit = "year" definition_period = YEAR - default_value = 5 - # 8 USC 1613(a) defines the federal five-year limited eligibility - # period. The default of 5 here is a PolicyEngine modeling decision — - # not a statutory value — chosen to treat unspecified-entry persons as - # past the five-year bar, preserving pre-5-year-bar behavior for - # households that do not supply this input. Refugee-like or bar-exempt - # statuses are handled via separate parameter lists rather than this - # clock. + # No explicit default_value: the float default of 0 applies. Supply this + # input to model a person past the five-year bar or outside the refugee + # cash assistance window. Statuses exempt from the bar are handled through + # separate parameter lists rather than this clock. reference = "https://www.law.cornell.edu/uscode/text/8/1613" From b3cceda70da864b469aaa86aeeda1bf1dedda822 Mon Sep 17 00:00:00 2001 From: David Trimmer Date: Thu, 1 Oct 2026 21:47:06 -0400 Subject: [PATCH 2/4] Update the SNAP waiting period for the years_since_us_entry default of 0 - 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) Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH --- .../is_snap_immigration_status_eligible.yaml | 25 ++++--- ...s_snap_qualified_alien_waiting_period.yaml | 65 +++++++++++++++++-- ...ets_snap_qualified_alien_waiting_period.py | 18 +++-- 3 files changed, 85 insertions(+), 23 deletions(-) diff --git a/policyengine_us/tests/policy/baseline/gov/usda/snap/eligibility/immigration/is_snap_immigration_status_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/usda/snap/eligibility/immigration/is_snap_immigration_status_eligible.yaml index 410bc4c85b9..246fba620d8 100644 --- a/policyengine_us/tests/policy/baseline/gov/usda/snap/eligibility/immigration/is_snap_immigration_status_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/usda/snap/eligibility/immigration/is_snap_immigration_status_eligible.yaml @@ -68,6 +68,9 @@ people: person1: immigration_status: LEGAL_PERMANENT_RESIDENT + # Tests the status list, not the waiting period, so the LPR has + # completed the waiting period. years_since_us_entry now defaults to 0. + years_since_us_entry: 5 households: household1: members: [person1] @@ -119,9 +122,9 @@ # Cases 11 onward apply the qualified alien waiting period of 8 USC # 1612(a)(2)(L) and 7 CFR 273.4(a)(6) on top of the 7 USC 2015(f) status -# list. years_since_us_entry defaults to 5, which satisfies the waiting -# period, so Cases 1-10 are unchanged and every case below that exercises -# the waiting period sets it explicitly. +# list. years_since_us_entry defaults to 0, which leaves a person in a +# subject status inside the waiting period, so Case 7 sets it to 5 and every +# case below that exercises the waiting period sets it explicitly. - name: Case 11, adult LPR inside the five-year waiting period is ineligible. period: 2026-01 @@ -568,15 +571,16 @@ ca_snap_immigration_status_eligible: true is_snap_immigration_status_eligible: false -- name: Case 48, California parolee with default years in status is eligible during the delayed implementation. +- name: Case 48, California parolee past the waiting period is eligible during the delayed implementation. period: 2026-01 input: immigration_status: PAROLED_ONE_YEAR age: 30 + years_since_us_entry: 5 state_code: CA output: - # years_since_us_entry defaults to 5, so the pre-existing California - # result is unchanged. + # Past the waiting period, the pre-existing California result is + # unchanged. This case relied on the former default of 5, now stated. ca_snap_immigration_status_eligible: true is_snap_immigration_status_eligible: true @@ -604,16 +608,18 @@ ca_snap_immigration_status_eligible: true is_snap_immigration_status_eligible: false -- name: Case 51, parolee and conditional entrant with default years in status are eligible before OBBBA. +- name: Case 51, parolee and conditional entrant past the waiting period are eligible before OBBBA. period: 2025-01 input: people: person1: immigration_status: PAROLED_ONE_YEAR age: 30 + years_since_us_entry: 5 person2: immigration_status: CONDITIONAL_ENTRANT age: 30 + years_since_us_entry: 5 marital_units: marital_unit1: members: [person1] @@ -624,8 +630,9 @@ members: [person1, person2] state_code: TX output: - # Default inertness: unchanged from the result before the waiting - # period was added. + # Past the waiting period, the result is unchanged from before the + # waiting period was added. This case relied on the former default of + # 5, now stated. is_snap_immigration_status_eligible: [true, true] - name: Case 52, California parolee child inside the waiting period is eligible during the delayed implementation. diff --git a/policyengine_us/tests/policy/baseline/gov/usda/snap/eligibility/immigration/meets_snap_qualified_alien_waiting_period.yaml b/policyengine_us/tests/policy/baseline/gov/usda/snap/eligibility/immigration/meets_snap_qualified_alien_waiting_period.yaml index 69012f202c1..20cd0e4a97c 100644 --- a/policyengine_us/tests/policy/baseline/gov/usda/snap/eligibility/immigration/meets_snap_qualified_alien_waiting_period.yaml +++ b/policyengine_us/tests/policy/baseline/gov/usda/snap/eligibility/immigration/meets_snap_qualified_alien_waiting_period.yaml @@ -1,6 +1,7 @@ # 8 USC 1612(a)(2); 7 CFR 273.4(a)(6)(ii)-(iii). years_since_us_entry is read -# as years in qualified alien status. Its default of 5 satisfies the waiting -# period, so every case that exercises the bar sets it explicitly. The +# as years in qualified alien status. It defaults to 0, which leaves a person +# in a subject status inside the waiting period; Cases 5b and 50b lock that +# default, and every other case that exercises the bar sets it explicitly. The # waiting period applies to LEGAL_PERMANENT_RESIDENT, PAROLED_ONE_YEAR and # CONDITIONAL_ENTRANT (273.4(a)(6)(iii)); all other statuses pass this gate # and are screened only by the status list. @@ -42,14 +43,26 @@ output: meets_snap_qualified_alien_waiting_period: true -- name: Case 5, default years_since_us_entry leaves an adult LPR past the waiting period. +- name: Case 5, adult LPR with five years in qualified status meets the waiting period. period: 2026-01 input: immigration_status: LEGAL_PERMANENT_RESIDENT age: 30 + # Formerly relied on the default of 5; now stated. Duplicates Case 4. + years_since_us_entry: 5 output: meets_snap_qualified_alien_waiting_period: true +- name: Case 5b, adult LPR without years_since_us_entry is inside the waiting period. + period: 2026-01 + input: + immigration_status: LEGAL_PERMANENT_RESIDENT + age: 30 + output: + # years_since_us_entry defaults to 0. + is_snap_alien_waiting_period_exempt: false + meets_snap_qualified_alien_waiting_period: false + - name: Case 6, LPR age 17 is exempt as a child. period: 2026-01 input: @@ -567,19 +580,22 @@ is_snap_alien_waiting_period_exempt: false meets_snap_qualified_alien_waiting_period: false -- name: Case 50, default years in status leave every subject status past the waiting period. +- name: Case 50, five years in qualified status leave every subject status past the waiting period. period: 2025-01 input: people: person1: immigration_status: LEGAL_PERMANENT_RESIDENT age: 30 + years_since_us_entry: 5 person2: immigration_status: PAROLED_ONE_YEAR age: 30 + years_since_us_entry: 5 person3: immigration_status: CONDITIONAL_ENTRANT age: 30 + years_since_us_entry: 5 marital_units: marital_unit1: members: [person1] @@ -592,12 +608,47 @@ members: [person1, person2, person3] state_code: TX output: - # years_since_us_entry defaults to 5 and the new inputs default to - # non-exempt values, so the gate passes through the clock, not an - # exception. + # The exception inputs default to non-exempt values, so the gate passes + # through the clock, not an exception. This case relied on the former + # years_since_us_entry default of 5, now stated. is_snap_alien_waiting_period_exempt: [false, false, false] meets_snap_qualified_alien_waiting_period: [true, true, true] +- name: Case 50b, without years_since_us_entry every adult in a subject status is inside the waiting period and a child is exempt. + period: 2025-01 + input: + people: + person1: + immigration_status: LEGAL_PERMANENT_RESIDENT + age: 30 + person2: + immigration_status: PAROLED_ONE_YEAR + age: 30 + person3: + immigration_status: CONDITIONAL_ENTRANT + age: 30 + person4: + immigration_status: LEGAL_PERMANENT_RESIDENT + age: 10 + marital_units: + marital_unit1: + members: [person1] + marital_unit2: + members: [person2] + marital_unit3: + members: [person3] + marital_unit4: + members: [person4] + households: + household: + members: [person1, person2, person3, person4] + state_code: TX + output: + # years_since_us_entry defaults to 0, so only the under-18 exception + # lifts the waiting period. + is_snap_alien_waiting_period_exempt: [false, false, false, true] + meets_snap_qualified_alien_waiting_period: [false, false, false, true] + - name: Case 51, exceptions are applied person by person in an LPR household inside the waiting period. period: 2026-01 input: diff --git a/policyengine_us/variables/gov/usda/snap/eligibility/waiting_period/meets_snap_qualified_alien_waiting_period.py b/policyengine_us/variables/gov/usda/snap/eligibility/waiting_period/meets_snap_qualified_alien_waiting_period.py index 1ef5dd12a47..6ce49d147df 100644 --- a/policyengine_us/variables/gov/usda/snap/eligibility/waiting_period/meets_snap_qualified_alien_waiting_period.py +++ b/policyengine_us/variables/gov/usda/snap/eligibility/waiting_period/meets_snap_qualified_alien_waiting_period.py @@ -22,13 +22,17 @@ class meets_snap_qualified_alien_waiting_period(Variable): "data overstate it for people who adjusted from a visa or " "unauthorized status, which under-applies the waiting period. " "273.4(a)(6)(iii) sets no entry-date limit, so there is no carve-out " - "for people who entered before August 22, 1996. The default " - "years_since_us_entry of 5 leaves everyone past the waiting period, " - "so results change only when that input is set below the threshold. " - "Microsimulation output is unchanged until the input data supply " - "immigration status and years in qualified alien status " - "(PolicyEngine/microcosm#1020). Not modeled: battered aliens and " - "trafficking victims, who have no immigration status value, and the " + "for people who entered before August 22, 1996. years_since_us_entry " + "defaults to 0, so a lawful permanent resident, parolee or " + "conditional entrant without that input is inside the waiting period " + "unless an exception applies; supply it for anyone who has completed " + "the waiting period. Until the input data supply years in qualified " + "alien status (PolicyEngine/microcosm#1085 for the national pool, " + "PolicyEngine/microcosm#1020 for the ACS local lane), " + "microsimulation treats everyone in a subject status as inside the " + "waiting period unless an exception applies. Not modeled: battered " + "aliens and trafficking victims, who have no immigration status " + "value, and the " "exemption of Afghan (paroled July 31, 2021, to September 30, 2023) " "and Ukrainian (paroled February 24, 2022, to September 30, 2024) " "humanitarian parolees before P.L. 119-21, who are modeled as " From 8a98ccf900af1c94c51be1200a605e1f0c43d43e Mon Sep 17 00:00:00 2001 From: David Trimmer Date: Mon, 26 Oct 2026 11:11:17 -0400 Subject: [PATCH 3/4] State years_since_us_entry in CHIP and Nebraska LIHEAP tests after merging 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) Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH --- .../is_chip_immigration_status_eligible.yaml | 20 +++++++++++++++++-- .../dhhs/liheap/ne_liheap_household_size.yaml | 5 +++++ .../person/years_since_us_entry.py | 5 ++++- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/policyengine_us/tests/policy/baseline/gov/hhs/chip/is_chip_immigration_status_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/hhs/chip/is_chip_immigration_status_eligible.yaml index 6e40e7c0515..33033e9dc69 100644 --- a/policyengine_us/tests/policy/baseline/gov/hhs/chip/is_chip_immigration_status_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/hhs/chip/is_chip_immigration_status_eligible.yaml @@ -34,6 +34,16 @@ output: is_chip_immigration_status_eligible: [false, true] +- name: Case 2b, Arizona permanent resident child without years_since_us_entry is inside the five-year bar. + period: 2025 + input: + state_code: AZ + age: 10 + immigration_status: LEGAL_PERMANENT_RESIDENT + # years_since_us_entry is omitted, so its default of 0 applies. + output: + is_chip_immigration_status_eligible: false + - name: Case 3, Texas option covers recent permanent resident children under 19 only. period: 2025 input: @@ -133,6 +143,8 @@ person4: age: 10 immigration_status: LEGAL_PERMANENT_RESIDENT + # Past the five-year bar; this case checks the eligible status list. + years_since_us_entry: 5 households: household1: members: [person1] @@ -266,8 +278,10 @@ # From October 1, 2026, 42 USC 1397gg(e)(1)(R) applies the 1396b(v)(5) limit to # CHIP, which ends federal CHIP funding for asylees, people granted withholding # of deportation, parolees and conditional entrants outside the option (SHO -# #26-001 Appendix A). Arizona elected neither option, and the default five years -# since entry clears the bar, so only the status limit applies. +# #26-001 Appendix A). Arizona elected neither option. Asylees and people granted +# withholding are exempt from the five-year bar, and the parolee and conditional +# entrant state five years since entry to clear it, so only the status limit +# applies. - name: Case 14, after section 71109 asylees, withheld deportations, parolees and conditional entrants lose CHIP in Arizona. period: 2027 input: @@ -281,9 +295,11 @@ person3: age: 10 immigration_status: PAROLED_ONE_YEAR + years_since_us_entry: 5 person4: age: 10 immigration_status: CONDITIONAL_ENTRANT + years_since_us_entry: 5 households: household1: members: [person1] diff --git a/policyengine_us/tests/policy/baseline/gov/states/ne/dhhs/liheap/ne_liheap_household_size.yaml b/policyengine_us/tests/policy/baseline/gov/states/ne/dhhs/liheap/ne_liheap_household_size.yaml index bbbe2a5b37b..f831a5c1a7d 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ne/dhhs/liheap/ne_liheap_household_size.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ne/dhhs/liheap/ne_liheap_household_size.yaml @@ -110,6 +110,9 @@ ne_aabd: 0 general_assistance: 0 immigration_status: LEGAL_PERMANENT_RESIDENT + # Past the SNAP waiting period; this case checks that permanent + # residents count. + years_since_us_entry: 5 employment_income: 24_000 person6: age: 43 @@ -117,6 +120,8 @@ ne_aabd: 0 general_assistance: 0 immigration_status: LEGAL_PERMANENT_RESIDENT + # Past the SNAP waiting period, as for person5. + years_since_us_entry: 5 spm_units: spm1: members: diff --git a/policyengine_us/variables/household/demographic/person/years_since_us_entry.py b/policyengine_us/variables/household/demographic/person/years_since_us_entry.py index 3a3d9fd0400..f354be3c2ae 100644 --- a/policyengine_us/variables/household/demographic/person/years_since_us_entry.py +++ b/policyengine_us/variables/household/demographic/person/years_since_us_entry.py @@ -9,7 +9,10 @@ class years_since_us_entry(Variable): "Years since the person entered the United States or was granted the " "qualifying immigration status, measured as each program starts its " "clock. The federal five-year bar under 8 USC 1613(a) runs from entry " - "with qualified-alien status; the refugee cash assistance window runs " + "with qualified-alien status. Medicaid and CHIP apply that bar, and " + "Washington TANF and the Missouri and New Hampshire state supplementary " + "payments apply waiting periods measured the same way. The refugee " + "cash assistance window runs " "from entry for refugees and from the status grant for some other " "statuses, such as asylees. SNAP (7 CFR 273.4(a)(6)(iii)) reads it as " "cumulative years in qualified alien status since the person first " From d0137171b818415fd8642d23a85e58ec5e44f007 Mon Sep 17 00:00:00 2001 From: David Trimmer Date: Mon, 26 Oct 2026 11:17:59 -0400 Subject: [PATCH 4/4] State years_since_us_entry in the two LPR partner cases 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) Claude-Session: https://claude.ai/code/session_01LqCGPgxDukji8Bhs57c5rH --- .../edge_cases/federal/cash/ssi/federal.yaml | 3 +++ .../edge_cases/federal/nutrition/snap/federal.yaml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/policyengine_us/tests/policy/baseline/partners/analytics_coverage/edge_cases/federal/cash/ssi/federal.yaml b/policyengine_us/tests/policy/baseline/partners/analytics_coverage/edge_cases/federal/cash/ssi/federal.yaml index 802de5f7ba3..41506140975 100644 --- a/policyengine_us/tests/policy/baseline/partners/analytics_coverage/edge_cases/federal/cash/ssi/federal.yaml +++ b/policyengine_us/tests/policy/baseline/partners/analytics_coverage/edge_cases/federal/cash/ssi/federal.yaml @@ -828,6 +828,9 @@ is_disabled: false is_pregnant: false immigration_status_str: LEGAL_PERMANENT_RESIDENT + # Past the Medicaid five-year bar; the input no longer defaults to 5 + # (#9732). + years_since_us_entry: 5 employment_income_before_lsr: 0 is_medicare_eligible: false ssi_countable_resources: 0 diff --git a/policyengine_us/tests/policy/baseline/partners/analytics_coverage/edge_cases/federal/nutrition/snap/federal.yaml b/policyengine_us/tests/policy/baseline/partners/analytics_coverage/edge_cases/federal/nutrition/snap/federal.yaml index 8866915cc51..5138a7cb5e5 100644 --- a/policyengine_us/tests/policy/baseline/partners/analytics_coverage/edge_cases/federal/nutrition/snap/federal.yaml +++ b/policyengine_us/tests/policy/baseline/partners/analytics_coverage/edge_cases/federal/nutrition/snap/federal.yaml @@ -703,6 +703,9 @@ is_tax_unit_dependent: false is_disabled: false immigration_status_str: LEGAL_PERMANENT_RESIDENT + # Past the five-year qualified-alien waiting period; the input no + # longer defaults to 5 (#9732). + years_since_us_entry: 5 employment_income_before_lsr: 20_000 spouse: age: 33