Repository navigation
Conversation
policyengine 6.0.0 (policyengine-us 2.2.1, spm-calculator 1.0.0) made SPM
geography explicit: the default outputs of pe.us.calculate_household
include SPM poverty, and a household with only state_code raises
SPMInputError. Eight fast examples failed in skill-examples.
- Pass county_fips (a five-digit string) in every US household example.
- Document the requirement and the spm={"geography_kind": "national"}
alternative, with a verified example of both and of the first-county
fallback that county-less households get for county-dependent rules.
- Re-pin values that moved for located model changes: school-meal CPI-U
refresh (+$11), CalEITC phase-out re-indexed on published CA CPI, Head
Start gated out of net income (policyengine-us 1.819.0), and the Harris
County ACA rating area.
- Add a lint that fails any pe.us.calculate_household call without
county_fips or spm=, so the plain test job catches this next time.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
policyengine 6.0.0 returns enum outputs as indices; names arrived in 6.1.1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- US geography section: extra_variables cannot avoid the SPM defaults; county validation applies only in county mode (national silently maps a malformed county to the state's first county); metro selections, SPMSelection, error codes; provenance["spm"]; the 2022-2035 year limit; SNAP utility regions and NYC tax read the county; county vs state is unchecked. - policyengine-us: correct the default-column list; verified examples for the NY county effect on SNAP/poverty and for ABAWD hours defaulting to 0; SPM rule on the country Simulation used for tracing. - Head Start exception to budgetary-impact scoring; spm-calculator and the SPM measurement pin in "Checking what you're running". - YAML tests: quote county_fips (unquoted 06037 is octal 3103); SPM outputs need a county. - Household templates (backend-builder, new-tool, policyengine-tools, household-calc): collect a county or choose national SPM, year range, ABAWD hours. Version floors to >=6.0.0. Every claim executed on policyengine 6.1.2 / policyengine-us 2.2.1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
skill-examplesfails on 8 US examples against policyengine 6.x (e.g. run 36597005380 on #92).pe.us.calculate_household(household={"state_code": "CA"})raisesSPMInputError: County selection has no county FIPS input.This is an intended API change, not a regression. The error first appears in policyengine 6.0.0 (2026-09-15), which pins policyengine-us 2.2.1 and spm-calculator 1.0.0:
tests/test_spm_household.pyasserts this exact error for a state-only household.Bisect: 5.3.1 passes; 6.0.0, 6.1.0, 6.1.1 and 6.1.2 fail. No upstream fix is pending: neither policyengine.py main nor policyengine-us up to 2.17.0 changes this.
What changes
Every US
calculate_householdexample passescounty_fipsas a five-digit string: 06037 Los Angeles, 48201 Harris, 36001 Albany.The
policyengineskill gains a "US geography" section:spm={"geography_kind": "national"}vs metro selections, and the error codes;provenance;first_county_in_state, andcounty_fipsis never checked againststate_code.Asserted values that moved were re-pinned from real runs, and each move is attributed:
New verified examples:
weekly_hours_worked_before_lsrnow defaulting to 0 (SNAP $298 vs $3,607.57).Household templates (backend-builder, new-tool, policyengine-tools, household-calc) and the YAML-test reference (quote
county_fips; unquoted 06037 is octal 3103) now carry the new requirement. Version floors move to>=6.0.0.New lint,
tests/test_us_household_geography.py: anype.us.calculate_household(withoutcounty_fipsorspm=now fails the plaintestjob.Checks
uv run pytest --ignore=tests/test_skill_examples.py: 181 passed. Wrapper build OK.tests/test_skill_examples.pyat commit 4b97588: 20 passed, 1 skipped on policyengine 6.1.2, and the same on 6.0.0 after the rating-area fix.skill-examplesjob is their first run through the harness.🤖 Generated with Claude Code