Skip to content

Add a national liheap_eligible output - #11243

Open
hua7450 wants to merge 1 commit into
mainfrom
liheap-eligible
Open

hua7450 wants to merge 1 commit into
mainfrom
liheap-eligible

Conversation

@hua7450

@hua7450 hua7450 commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

Adds liheap_eligible, a national output that is true when a household is eligible for its state's regular LIHEAP heating or cooling benefit, and ak_hap_eligible for Alaska.

Closes #11114

What and why

liheap gives the national payment total, but a caller who wants eligibility has to know each state's variable name. liheap_eligible reads a list of state eligibility variables, as liheap reads its list of payments.

  • gov.hhs.liheap.regular_eligibility: 61 state eligibility variables. Each is a yes/no output on the SPM unit.
  • liheap_eligible (SPM unit, yes/no, year): true when any listed variable is true. It uses adds on the list, as liheap does.
  • ak_hap_eligible: Alaska had no eligibility output.

No existing output changes.

The issue's four points

Point in #11114 This PR
Alaska has no eligibility variable Adds ak_hap_eligible, true when ak_hap is above $0
Michigan's Home Heating Credit Left out, as liheap leaves it out
Illinois crisis eligibility Left out; il_liheap_eligible is the regular heating flag
heating_type unset Ships now. The variable's documentation says heating_type is a required input; #9754 tracks the default

Alaska follows the award, not the base benefit

Alaska's award function applies every condition of 7 AAC 44. It tests the 2.0-point minimum of 44.080(m) after the dwelling share (h) and the utility-allowance reduction (l). A household can therefore have a positive ak_hap_base_benefit and no award, so the flag is ak_hap > 0. ak_hap_eligible.yaml Case 2 pins this: a subsidized Juneau household has a $525 base benefit, a $0 award, and is not eligible.

Three choices in the list

  • California lists ca_liheap_basic_eligible. Each of its three payments requires it.
  • West Virginia lists wv_lieap_income_eligible, its only eligibility output.
  • Delaware lists de_liheap_cooling_eligible although liheap sums no Delaware cooling payment, because that benefit has no fixed amount.

Eligible does not mean a payment above $0

Every payment in liheap is gated by a variable on the list, so a household with a payment is always eligible. The reverse does not hold. The flag follows each state's own variable and can be true while liheap is $0:

  • a fuel with no amount in the state's benefit table, such as fuel oil in Alabama;
  • Delaware cooling eligibility alone;
  • a California household that meets the common eligibility but no payment's own conditions, such as a Madera County household below the county's priority minimum.

The variable's documentation says so.

Tests

  • liheap_eligible.yaml, four cases: a Texas household within 150% of the poverty guideline (true); the same household over the limit (false); Delaware cooling eligibility alone, with liheap $0 (true); a Michigan household eligible for the Home Heating Credit (false).
  • ak_hap_eligible.yaml, two cases: a Fairbanks household with a $1,925 award (true); the Juneau household above (false). Both reuse the inputs of existing ak_hap.yaml cases.
  • test_aggregate_list_integrity.py: the new list joins AGGREGATE_LISTS, so the three existing list checks cover it (members are defined variables, members are state-gated, no silent removals between year blocks). One new test, test_liheap_eligibility_lists_the_flag_of_every_listed_payment, fails when a payment joins gov.hhs.liheap.regular_payments without its eligibility flag joining the new list. YAML cannot compare two parameter lists. The test reuses the module's variables fixture and builds no model or simulation.

Test plan

  • YAML tests: six cases. I computed each directly with a script against this branch and all matched; I did not run the test suites locally, so CI validates them.
  • The new list check, evaluated directly: 61 members, all defined, state-gated, yes/no on the SPM unit; no listed payment lacks its flag.
  • Source conflicts: not applicable.
  • make format: ruff format --check and ruff check pass on the changed Python files (ruff 0.15.5).
  • Changelog fragment in changelog.d/
  • No file under tests/policy/baseline/partners/ changes.

axiom: n/a: adds two outputs derived from existing variables; no rule, parameter value or existing result changes

🤖 Generated with Claude Code

liheap_eligible is true when a household is eligible for its state's
regular LIHEAP heating or cooling benefit. It reads a new list of state
eligibility variables, gov.hhs.liheap.regular_eligibility, as liheap reads
its list of payments.

Alaska had no eligibility output, so this adds ak_hap_eligible, true when
the household has an award. Michigan's Home Heating Credit and Illinois
crisis assistance are left out, as in liheap.

The list-integrity test now covers the new list and checks that every
payment in the national total has its eligibility flag in it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@hua7450
hua7450 marked this pull request as ready for review November 23, 2026 19:06

@PavelMakarchuk PavelMakarchuk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#11243: Add a national liheap_eligible output

Verdict: APPROVE (head da81ef3096)

The head did not move during the review. The head commit is from 2026-11-23, 2:02pm EST.

Summary

The PR adds liheap_eligible, a national yes/no output on the SPM unit. It reads a new list, gov.hhs.liheap.regular_eligibility, with adds, in the same way as liheap reads gov.hhs.liheap.regular_payments. The PR also adds ak_hap_eligible (true when ak_hap > 0), because Alaska had no eligibility output. No existing output changes. The list covers every jurisdiction that liheap covers (50 of 51; Michigan stays out, as in liheap), and every cooling eligibility variable in the model. All tests pass at the head, CI is green, and I found no wrong value or behavior.

Findings

CRITICAL

None.

SHOULD ADDRESS

None.

SUGGESTION

  1. The West Virginia member is an income test only. policyengine_us/parameters/gov/hhs/liheap/regular_eligibility.yaml:67 lists wv_lieap_income_eligible. That variable does not check the fuel. Failure case: a 2026 West Virginia household with $15,000 of wages and heating_type UNSPECIFIED gets liheap_eligible: true and wv_lieap: 0. In the other 49 jurisdictions, an unset fuel usually gives false. The PR body and the variable documentation describe this. Optional: add a short wv_lieap_eligible (income test and a supported fuel), or name West Virginia in the documentation of liheap_eligible.
  2. Program registry. policyengine_us/programs.yaml (LIHEAP entry, about line 1037) names only liheap. The registry has no field for a second output, so no change is necessary. Optional: say in the entry notes that liheap_eligible exists.

What I checked

  • Head and state. The head is da81ef3096 (1 commit on main at 0a440f1de8). main moved by two commits after that base (Massachusetts HEAP FY2027, #11205). Those commits do not touch the LIHEAP lists. A merge with current main is clean. GitHub reports MERGEABLE, BLOCKED (review needed).
  • Reference. I fetched 42 U.S.C. 8624 from Cornell. The anchor #b_2 exists. It is the income eligibility rule (150% of the poverty level or 60% of state median income, and categorical eligibility). This is a correct citation for an eligibility list. For ak_hap_eligible, I fetched 7 AAC 44.080. Subsection (m) makes a household with fewer than 2.0 points after (a) to (l) ineligible. So ak_hap > 0 is a correct eligibility test. Both Alaska URLs return 200.
  • List coverage. I loaded the system and checked each of the 61 members: all are bool, SPM unit, YEAR and state-gated. I compared the list with the 62 payments in regular_payments. Every payment has its gate on the list: defined_for for most; al_liheap, fl_liheap and ok_liheap read their flag in the formula; the three California payments each require ca_liheap_basic_eligible (directly, or through ca_liheap_utility_eligible and the liquid-fuel formula). I searched all state folders for cooling eligibility variables. All 11 (AL, AR, DE, GA, KY, LA, NE, NJ, OK, SC, VA) are on the list.
  • No conflict or double count. No other variable is named liheap_eligible. The new variable is an output only. Nothing in the model reads it, and it is not in a benefit or net income total.
  • Formula. adds on a bool variable returns bool. A household with two true flags (Alabama heating and cooling) gives true, not 2.
  • Default for states without a model. Michigan gives false. A state flag is false outside its state, so no other state leaks in.
  • Tests at the head. policyengine-core test on gov/hhs/liheap and gov/states/ak/dpa/hap: 177 passed. test_aggregate_list_integrity.py: 42 passed, including the new list-to-payment test. I also merged the head with the open Alaska HAP PR #11229 (it changes ak_hap_base_benefit). The Alaska and LIHEAP tests pass on that merge (187 passed).
  • Hand-computed cases (2026, one adult, $15,000 of wages, $1,800 of electricity, $600 of gas, cooling expense), in one vectorized simulation:
    • Alabama with electric heat: both Alabama flags true, liheap_eligible true, liheap $1,020.
    • Texas with electric heat: true, $1,200.
    • Georgia with no fuel: heating flag false, cooling flag true, so liheap_eligible true and liheap $400.
    • Michigan with gas heat: false, $0.
    • Alaska with no place code: ak_hap $0 and ak_hap_eligible false.
    • West Virginia with no fuel: true with a $0 payment (Suggestion 1).
    • California with electric heat: true, $484.
  • Format and changelog. ruff format --check and ruff check pass on the three changed Python files. The fragment changelog.d/liheap-eligible.added.md is top level and the type is valid.
  • CI. All 40 checks pass, including Microsimulation, Household API Partners and all baseline and contrib shards.
  • Overlap. Open PRs #11229 (Alaska HAP) and #11235 (Hawaii LIHEAP) touch related files. Neither conflicts textually. #11229 passes the new tests when merged (see above).
  • Partner tests. No file under tests/policy/baseline/partners/ changes.

Not verified

  • I did not run a microsimulation. CI runs one and passes. In the current data, heating_type is unset, so this output is false for most records outside the cooling states. The documentation says so.
  • I did not check each state's eligibility variable against its own state rules. This PR only aggregates them.
  • I did not check the HHS LIHEAP guidance documents. The statute is enough for the one reference that this PR adds.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a national liheap_eligible output, and note that heating eligibility is false in 41 jurisdictions when heating_type is unset

2 participants