Repository navigation
Description
Microcosm's US immigration stage gives every documented noncitizen LEGAL_PERMANENT_RESIDENT unless a DACA or Cuban/Haitian entrant test applies, and the open PR #779 adds draws for five humanitarian labels. Nonimmigrants, such as students and temporary workers on visas, and people with a pending asylum application get no label of their own. In policyengine-us 2.2.1 and 2.90.4, ImmigrationStatus has no value for either group, so a label for them would need a new engine value and a Microcosm imputation that assigns it.
What main assigns
At main, the stage's docstring (item 5) names two tests, DACA and the Cuban/Haitian entrant class, and says "every other documented non-citizen stays LEGAL_PERMANENT_RESIDENT (the modal true status)". The stage starts every person at that value, sets citizens to CITIZEN and the NONE SSN pool to UNDOCUMENTED, and then applies the two tests (L716-L738).
A noncitizen leaves the NONE pool in one of two ways:
- A legal-status indicator, such as Medicaid receipt or government employment, moves them to
OTHER_NON_CITIZEN(L623-L639). - Workers and students left in the pool spill to
NON_CITIZEN_VALID_EADin seeded order until the remaining undocumented worker and student counts match their controls (item 3, L646-L673).
Outside the DACA and Cuban/Haitian tests, both routes end at LEGAL_PERMANENT_RESIDENT, and anyone the spill leaves in the pool carries UNDOCUMENTED. The stage reads no column that records a visa class or an asylum application (L141-L166). We infer from those inputs that a nonimmigrant or pending applicant in the survey gets whatever label their indicators, birth country, arrival year and spill draw give them.
What #779 adds and leaves
PR #779 draws PAROLED_ONE_YEAR, REFUGEE, ASYLEE, DEPORTATION_WITHHELD and TPS to cited stocks, from candidates matched on SSN code, arrival window and, for most draws, birth country (item 5, L1415-L1533). The ASYLEE draw targets a stock of asylum grants, and no draw targets pending applications or nonimmigrant classes. The PR's docstring keeps the default for everyone else: "every other documented non-citizen stays LEGAL_PERMANENT_RESIDENT" (item 6, L2240). We described the same two-way split for TPS holders in the #767 design comment, and #779 adds a TPS draw for them.
What the engine has
Main pins policyengine-us 2.2.1 in its engine ABI lock (engine_abi.lock.json). Both 2.2.1 and 2.90.4 define eleven ImmigrationStatus values in policyengine_us/variables/household/demographic/person/immigration_status.py: CITIZEN, LEGAL_PERMANENT_RESIDENT, REFUGEE, ASYLEE, DEPORTATION_WITHHELD, CUBAN_HAITIAN_ENTRANT, CONDITIONAL_ENTRANT, PAROLED_ONE_YEAR, UNDOCUMENTED, DACA and TPS. None of them names a nonimmigrant or a pending asylum applicant.
In 2.90.4, policyengine_us/parameters/gov/hhs/medicaid/eligibility/lawfully_residing/immigration_statuses.yaml cites a definition of lawfully present (SHO #10-006, page 3) whose items include nonimmigrants who have not violated their status and, with conditions, pending asylum applicants. Without enum values for those two groups, the parameter can list neither. On the Microcosm side, main's composition gate fails any immigration_status_str outside the stage's own IMMIGRATION_STATUS_VALUES (L895-L903), so a new engine value also needs an entry in that list.
What a LEGAL_PERMANENT_RESIDENT label passes in 2.2.1 and 2.90.4
- Medicaid.
policyengine_us/parameters/gov/hhs/medicaid/eligibility/eligible_immigration_statuses.yamllistsLEGAL_PERMANENT_RESIDENTfrom 2018 and keeps it on 2026-10-01, when the list narrows toCITIZEN,LEGAL_PERMANENT_RESIDENTandCUBAN_HAITIAN_ENTRANT(its references include 42 USC 1396b(v) and 8 USC 1641).policyengine_us/variables/gov/hhs/medicaid/eligibility/is_medicaid_immigration_status_eligible.pypasses a listed noncitizen when the status appears inpolicyengine_us/parameters/gov/hhs/medicaid/eligibility/bar_exempt_immigration_statuses.yamloryears_since_us_entryreaches 5 (policyengine_us/parameters/gov/hhs/medicaid/eligibility/five_year_bar_years.yaml, citing 8 USC 1613(a)). The exempt list leaves outLEGAL_PERMANENT_RESIDENT, so for that label the clock decides. The variable's state terms, a state parameter for undocumented immigrants and California's state-funded list ofUNDOCUMENTED,DACAandTPS, leave it out too. In 2.90.4, the CHIP test reads the same list and clock (policyengine_us/variables/gov/hhs/chip/is_chip_immigration_status_eligible.py). The 2.90.4 lawfully-residing option (policyengine_us/variables/gov/hhs/medicaid/eligibility/is_medicaid_lawfully_residing_option_eligible.py) passes aLEGAL_PERMANENT_RESIDENTchild or pregnant person in an electing state without the clock. - ACA premium tax credit.
policyengine_us/variables/gov/aca/eligibility/is_aca_ptc_immigration_status_eligible.pypasses every status missing frompolicyengine_us/parameters/gov/aca/ineligible_immigration_statuses.yaml. That list never namesLEGAL_PERMANENT_RESIDENT, and from 2027-01-01 it namesDACA,UNDOCUMENTED,TPS,REFUGEE,ASYLEE,DEPORTATION_WITHHELDandPAROLED_ONE_YEAR(its references include 45 CFR 155.20 and H.R.1 section 71301). The status test reads no clock, butpolicyengine_us/variables/gov/aca/eligibility/pays_aca_premium.pyexcludes anyone with a coverage source listed inpolicyengine_us/parameters/gov/aca/ineligible_coverage.yaml, Medicaid and CHIP eligibility among them, so the credit reads the clock through the Medicaid test. Until 2026-01-01 (policyengine_us/parameters/gov/aca/below_fpl_immigration_exception_in_effect.yaml), an exception for tax units under the poverty line (policyengine_us/variables/gov/aca/eligibility/aca_ptc_below_fpl_immigration_exception.py) also makes a unit income-eligible when a noncitizen member passes the status test and fails the Medicaid one. - SNAP.
policyengine_us/parameters/gov/usda/snap/eligibility/eligible_immigration_statuses.yamllistsLEGAL_PERMANENT_RESIDENTfrom 2018 and keeps it on 2025-07-01, when the list narrows toCITIZEN,LEGAL_PERMANENT_RESIDENTandCUBAN_HAITIAN_ENTRANT(its references include 7 USC 2015(f) and 8 USC 1612). Version 2.2.1 reads no clock, and 2.90.4 adds a five-year waiting period forLEGAL_PERMANENT_RESIDENT(policyengine_us/variables/gov/usda/snap/eligibility/waiting_period/meets_snap_qualified_alien_waiting_period.py), with exceptions that include people under 18. - SSI.
policyengine_us/parameters/gov/ssa/ssi/eligibility/status/qualified_noncitizen_status.yamlnamesLEGAL_PERMANENT_RESIDENT, andpolicyengine_us/variables/gov/ssa/ssi/eligibility/status/is_ssi_qualified_noncitizen.pyadds a condition of 40 qualifying quarters of earnings for that status. Main's engine ABI lock declares those quarters absent from the file, so every person gets the default of 40 inpolicyengine_us/variables/household/income/person/ssi_qualifying_quarters_earnings.pyand everyLEGAL_PERMANENT_RESIDENTlabel meets the condition.
An UNDOCUMENTED label fails each of these federal lists, and the Medicaid variable passes it only through its state terms.
How the #1085 clock interacts
Main's national build stores no years_since_us_entry, so every person gets the engine default of 5, which policyengine_us/variables/household/demographic/person/years_since_us_entry.py calls a modeling decision. Every LEGAL_PERMANENT_RESIDENT label therefore clears the Medicaid five-year test, and in 2.90.4 the SNAP waiting period. The ACS local lane already fills the clock (#1052, for #1020). PR #1085 proposes storing it nationally as the period minus the PEINUSYR arrival year. A person with that label who arrived fewer than five years before the period would then fail the federal Medicaid test, and in 2.90.4 the SNAP waiting period unless an exception applies. One who arrived earlier passes as before, so the clock changes the outcome for recent arrivals alone. The 2.90.4 lawfully-residing option skips the clock for children and pregnant people in electing states.
Open question
How should the US file represent nonimmigrants and pending asylum applicants, when the stage reads no column that identifies them and the engine has no value for either? We have not measured how many nonimmigrants or pending applicants carry each label, or which way those labels move any program.
The humanitarian statuses sit in #767 and #779, the entry clock in #776 and #1085, the stage's origin in #225, and the composition gate's anchor in #864.
🤖 Generated with Claude Code
Activity