Read SNAP utility allowance incurrence from the canonical heating inputs - #9397
Draft
hua7450 wants to merge 2 commits into
Draft
Read SNAP utility allowance incurrence from the canonical heating inputs#9397hua7450 wants to merge 2 commits into
hua7450 wants to merge 2 commits into
Conversation
has_heating_cooling_expense derives heating from heating_expense net of heat_expense_included_in_rent and cooling from the new has_cooling_expense input, keeping heating_cooling_expense as the signal for UNSPECIFIED households. A new has_gas_and_fuel_expense treats metered gas and every deliverable or cooking fuel as the one SNAP gas-and-fuel utility for both the individual standard and the utility count. utility_expense sums the per-fuel bills without double counting a known heating fuel, and Illinois AABD reads gas_expense for its metered gas allowance, deprecating metered_gas_expense. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9397 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 2 8 +6
Lines 20 126 +106
Branches 0 3 +3
==========================================
+ Hits 20 126 +106
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:
|
This was referenced Sep 6, 2026
…into heating-snap-utility-incurrence
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stage 2a of the heating-input consolidation (#9284, under the #9275 atomic-inputs rule), following the foundation PR #9360. This half moves SNAP's utility-allowance incurrence and the utility-count variables onto the canonical heating inputs and fixes two latent gaps in the individual and limited allowance paths. Stage 2b (Michigan home heating credit + the #8964 utilities-responsibility projection) is a separate PR because it carries a partner-facing default flip.
What the regulation says
7 CFR 273.9(d)(6)(iii):
Changes
has_cooling_expensehas_gas_and_fuel_expensegas_expense,bottled_gas_expense,fuel_oil_expense,wood_expense,coal_expense,other_heating_fuel_expense,cooking_fuel_expense> 0. One SNAP standard, one incurrence flag.has_heating_cooling_expenseheating_cooling_expense > 0(heating_expense > 0 & ~heat_expense_included_in_rent) | has_cooling_expense | (UNSPECIFIED & heating_cooling_expense > 0)count_distinct_utility_expenseshas_gas_and_fuel_expenseso deliverable and cooking fuels count (once)snap_individual_utility_allowancegas_expensehas_gas_and_fuel_expenseutility_expenseaddsof heating_cooling + gas + electricity + water/sewage/trash/phoneheating_cooling_expenseonly forUNSPECIFIEDhouseholdsutility_typesmetered_gas_expensegas_expense(parameter node staysmetered_gas, the regulation's term, via a key override in the formula)metered_gas_expenseBehavior preservation
The same
UNSPECIFIEDgate as #9360: a household that does not sendheating_typekeeps its pre-canonical signal (heating_cooling_expense > 0), which still ignoresheat_expense_included_in_rentexactly as before. Live traffic check (household API analytics, 14 days to 2026-09-06):heating_cooling_expense+has_heating_cooling_expenseride on 65% of all requests as the SNAP signal, always withoutheating_type;metered_gas_expense,has_cooling_expense, and every deliverable-fuel column have zero traffic. So no partner value moves from the incurrence change.Two value changes are possible only for households that send the affected columns:
metered_gas_expenseto IL AABD gets no metered gas allowance until it sendsgas_expense(zero traffic; the one analytics-coverage fixture is migrated in this PR).Canonical households (a known
heating_type): heating incurrence follows the primary fuel's bill and is switched off byheat_expense_included_in_rentper (D)(1); a heat-in-rent home with gas and electricity bills lands on the LUA. A known type never readsheating_cooling_expense, so the migration contract from #9360 holds: send the canonical inputs, not both vocabularies.Not in this PR
heating_expenseandheat_expense_included_in_rent(MCL 206.527a(1)(c) halves the standard credit when "heating costs are included in the claimant's rent"), plus the Reconcile tenant_pays_utilities (Household) and utilities_included_in_rent (TaxUnit): near-inverse vars, different entities, contradictory defaults #8964tenant_pays_utilitiesprojection and default flip (partner notification gate).UNSPECIFIED-gated legacy branches and the deprecated inputs after partner migration. TheUNSPECIFIEDenum value itself stays (it still means "heating fuel not supplied"); only the fallback code behind it goes.Tests
has_heating_cooling_expense(11 cases: legacy signal, per-fuel bill alone, heat in rent on canonical vs legacy paths, cooling with and without heating, known type ignoring the legacy input),has_gas_and_fuel_expense(6),utility_expense(4, including the no-double-count case).count_distinct_utility_expenses(deliverable fuel counts, gas + propane counts once, cooking fuel),snap_individual_utility_allowance(fuel oil only, gas + propane once, wood + cooking fuel once),snap_utility_allowance_type(five end-to-end cases from canonical inputs through both derived variables), IL AABD (gas_expense pays the metered gas allowance;metered_gas_expenseno longer read).Refs: #9284, #9275, #9360, #7745.
🤖 Generated with Claude Code