Conversation
- DC LIHEAP pointed at `dc_liheap`, which does not exist; the benefit variable is `dc_liheap_payment`. - Riverside County LIHEAP's parameter_prefix `gov.local.ca.riv.liheap` resolved to nothing; its parameters are under `gov.local.ca.riv.cap.liheap`. - Remove the Oregon LIHEAP implementation (status in_progress, no code on main; PR #5333 closed unmerged 2026-02-23) and drop OR from coverage. The registry has no not-started status. - Add parameter prefixes for DC, MA and IL, which resolve. - Texas CEAP note: the SMI alternative limit is applied through 2024. - New tests/test_programs_registry.py checks statuses, state codes, and that every variable and parameter_prefix resolves; ten pre-existing unresolved references elsewhere are listed in KNOWN_UNRESOLVED, which must shrink as they are fixed. Refs #273 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Summary
Fixes the LIHEAP entries in
policyengine_us/programs.yamlso every reference points at something the model defines, and adds the registry's first test.variabledc_liheap(undefined)dc_liheap_paymentgit grep -w dc_liheaphits only programs.yaml;dc_liheap_paymentis the SPM-unit USD benefit,defined_for="dc_liheap_eligible"parameter_prefixgov.local.ca.riv.liheap(resolves to nothing)gov.local.ca.riv.cap.liheapca_riv_liheap_countable_incomereadsgov.local.ca.riv.cap.liheap.countable_income.sources; sibling SHARE already usesriv.cap.*in_progress, no variablecoveragegit log -S or_liheapis empty); #5333 opened 2024-11-17 and closed unmerged 2026-02-23; no open PR. The registry has no not-started status (complete,partialandin_progressonly), and the only otherin_progressimplementation without a variable (IA SSP) has an open PR (#8017)parameter_prefixgov.states.dc.doee.liheap,gov.states.ma.doer.liheap,gov.states.il.dceo.liheapuses_smi_thresholdis true from 2023-10-01 until 2025-01-01, and the annual formula reads it on Jan 1, so it applies to 2024 and earlier and is off from 2025Other checks, where the entries already matched the code:
ma_liheap), IL (il_liheap) and TX (tx_ceap,partial) name existing SPM-unit benefit variables.ca_riv_liheap_eligibleexists and is eligibility-only, consistent withstatus: completeplus "Only includes eligibility rules", as in theil_fpp/il_ibccp/il_ihwapentries.system.py:102only setsmodelled_policies. policyengine-core'sadd_modelled_policy_metadataonlyyaml.loads it, with no validation.build_metadata.pyonly fingerprints the file.dc_liheapor on the OR entry.New test:
policyengine_us/tests/test_programs_registry.pyInvariants, checked for every program and state implementation:
statusis one ofcomplete,partialorin_progress.StateCodevalues.variableis insystem.variables.parameter_prefixresolves throughsystem.parameters.get_child.On
mainthe test fails on exactly the two LIHEAP defects above. On this branch it passes: 620 passed and 10 skipped.The whole-registry scan also found 10 unresolved references outside LIHEAP:
csfp,clean_vehicle_credits,sf_wftcandmontgomery_county_eitcvariables, and thefdpir,social_security,dc_power,dc_gac,la_expectant_parentandmontgomery_county_eitcprefixes. They are listed inKNOWN_UNRESOLVEDand skipped for now. A companion test fails if a listed key starts resolving or disappears, so the list can only shrink. Fixing them is a follow-up, kept out of this PR to keep it LIHEAP-scoped.Mutation checks:
KNOWN_UNRESOLVEDfails the stale-allowlist check.CLAUDE.md's registry section now documents the test, and says to remove a deadin_progressentry rather than invent a status.Downstream effect
This was computed by running policyengine-model's own
fetchPrograms.tsandprogramStatus.tson its current registry snapshot.partial. After this change it shows "Partial". The stat cards move from 10 Partial / 5 In progress to 11 Partial / 4 In progress.parameter_prefixand Riverside's variables live underriv/liheap, notriv/cap/liheap. SHARE has the same split. The field is the parameter prefix, so this PR sets it to the parameter path, and a follow-up covers the site and the directory layout.Notes
coverageline. After this merges, that line should readDC, Riverside County, MA, IL, KS, TX.ma_liheaplacksunit = USD.completegiven their assumed IRS-gross-income concept.in_progressstatuses:summer_ebtandchapter_7_bankruptcyhave no code and no open PR;section_8has shipped code.axiom: n/a: program registry metadata and a registry test; no policy rule changes
🤖 Generated with Claude Code