You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Default heating_type to electricity and remove the UNSPECIFIED-gated state heating adapters #9754
Follow-up to #9284 and #9360 (the "Stage 3" cleanup named in the #9360 description), and the separate PR promised in the #9663 review thread.
Proposal
Change the heating_type default from UNSPECIFIED to ELECTRICITY.
Remove the UNSPECIFIED-gated legacy adapters from the state programs, so every household takes the canonical path (heating_expense, the bill matching the heating type).
Keep UNSPECIFIED as an enum member that callers can send explicitly. The new state LIHEAP PRs send it in tests and expect $0.
Why
Microsimulation. No dataset stamps heating_type, so every record is UNSPECIFIED. The new state LIHEAP programs have no fuel row for UNSPECIFIED and pay $0 on every record (raised in the Add Kansas LIEAP regular heating assistance #9663 review). An electricity default gives those programs a row to read.
The state enum mappings also send UNSPECIFIED to the electricity row (dc_liheap_heating_type.py:41, il_liheap_heating_type.py:29, ma_liheap_heating_type.py:34). Those lines and their documentation need the same pass.
Once the four adapters are gone, heating_expense_person has no reader left and can be removed with a removed changelog fragment.
The default change also switches off three shared gates
These are not state adapters, but they test heating_type == UNSPECIFIED, so they stop firing for every caller who does not send a fuel:
Counts heating_cooling_expense as its own utility category
With an electricity default and no other change, a household that sends only heating_cooling_expense loses the SNAP heating and cooling allowance unless it also sends an electricity bill or has_cooling_expense. This PR has to decide what replaces these gates; it cannot change the default alone.
Behavior changes to expect
Callers sending only legacy inputs. DC, IL and MA LIHEAP cap the payment at heating_expense, which for an electricity household reads pre_subsidy_electricity_expense. A household that sends heating_cooling_expense or heating_expense_person and no electricity bill moves to a $0 cap. The MI credit moves the same way.
Partner contract fixtures. Under tests/policy/baseline/partners/, 17 files send heating_cooling_expense (98 lines) and none sends the canonical heating_type. LIHEAP and SNAP expectations in those fixtures will move. API partners need notice, and a migration path to heating_type plus the per-fuel bill, before this merges.
What replaces the three shared gates: keep reading heating_cooling_expense without the UNSPECIFIED condition, or remove the legacy read and require the canonical inputs.
Whether heating_cooling_expense is removed in this PR or stays as a deprecated input.
What DC, IL and MA do with an explicit heating_type: UNSPECIFIED after the adapters go ($0 cap, matching the new states, or the electricity row).
Timing of the partner notice relative to the merge.
Tests
Move the DC, IL, MA and MI legacy-adapter cases to canonical inputs or delete them with the adapters.
Existing cases that rely on the default must send heating_type explicitly, so their expectations do not depend on the default.
Follow-up to #9284 and #9360 (the "Stage 3" cleanup named in the #9360 description), and the separate PR promised in the #9663 review thread.
Proposal
heating_typedefault fromUNSPECIFIEDtoELECTRICITY.UNSPECIFIED-gated legacy adapters from the state programs, so every household takes the canonical path (heating_expense, the bill matching the heating type).Keep
UNSPECIFIEDas an enum member that callers can send explicitly. The new state LIHEAP PRs send it in tests and expect $0.Why
heating_type, so every record isUNSPECIFIED. The new state LIHEAP programs have no fuel row forUNSPECIFIEDand pay $0 on every record (raised in the Add Kansas LIEAP regular heating assistance #9663 review). An electricity default gives those programs a row to read.State adapters to remove
Line numbers are on
mainat7d2a2d7eee.UNSPECIFIEDvariables/gov/states/dc/doee/liheap/dc_liheap_payment.py:28heating_expense_person, else the per-fuel bill by the DC enumvariables/gov/states/il/dceo/liheap/payment/il_liheap_base_payment.py:41heating_expense_person, elseheating_cooling_expensevariables/gov/states/ma/doer/liheap/payment/ma_liheap.py:29heating_expense_person, else the per-fuel bill by the MA enum (post-subsidy electricity), elseheating_cooling_expensevariables/household/expense/housing/heating_expenses.py:22heating_expense_personThe state enum mappings also send
UNSPECIFIEDto the electricity row (dc_liheap_heating_type.py:41,il_liheap_heating_type.py:29,ma_liheap_heating_type.py:34). Those lines and their documentation need the same pass.Once the four adapters are gone,
heating_expense_personhas no reader left and can be removed with aremovedchangelog fragment.The default change also switches off three shared gates
These are not state adapters, but they test
heating_type == UNSPECIFIED, so they stop firing for every caller who does not send a fuel:has_heating_cooling_expensevariables/household/expense/utilities/has_heating_cooling_expense.py:23heating_cooling_expensequalifies the household for the SNAP heating and cooling standard utility allowanceutility_expensevariables/household/expense/utilities/utility_expense.py:23heating_cooling_expenseto the per-fuel billscount_distinct_utility_expensesvariables/household/expense/utilities/count_distinct_utility_expenses.py:23heating_cooling_expenseas its own utility categoryWith an electricity default and no other change, a household that sends only
heating_cooling_expenseloses the SNAP heating and cooling allowance unless it also sends an electricity bill orhas_cooling_expense. This PR has to decide what replaces these gates; it cannot change the default alone.Behavior changes to expect
heating_expense, which for an electricity household readspre_subsidy_electricity_expense. A household that sendsheating_cooling_expenseorheating_expense_personand no electricity bill moves to a $0 cap. The MI credit moves the same way.tests/policy/baseline/partners/, 17 files sendheating_cooling_expense(98 lines) and none sends the canonicalheating_type. LIHEAP and SNAP expectations in those fixtures will move. API partners need notice, and a migration path toheating_typeplus the per-fuel bill, before this merges.Open decisions
heating_cooling_expensewithout theUNSPECIFIEDcondition, or remove the legacy read and require the canonical inputs.heating_cooling_expenseis removed in this PR or stays as a deprecated input.heating_type: UNSPECIFIEDafter the adapters go ($0 cap, matching the new states, or the electricity row).Tests
heating_typeexplicitly, so their expectations do not depend on the default.