Skip to content

Conversation

@MaxGhenis
Copy link
Contributor

Summary

Fixes invalid filing_status enum values in test files that were silently converted to SINGLE (index 0) due to a bug in policyengine-core (see #410).

Changes

File Invalid Value Corrected To
Utah SS benefits credit tests single (lowercase) SINGLE
Missouri pension deduction section B 0 (numeric) SINGLE
Missouri pension deduction section C 0 (numeric) SINGLE
Colorado federal deduction addback HEAD_OF_HOUSE_HOLD (typo) HEAD_OF_HOUSEHOLD
North Carolina itemized deductions WIDWO (typo) SURVIVING_SPOUSE

Context

These invalid values didn't cause test failures because numpy.select() in Enum.encode() returns 0 (the default) when no condition matches, silently converting invalid values to the first enum value.

PolicyEngine/policyengine-core#411 adds validation to raise clear errors for invalid enum values. This PR should be merged first to prevent test failures when that fix is released.

Test Plan

  • Verified no remaining invalid filing_status values in test files
  • CI tests pass

🤖 Generated with Claude Code

Fixed the following invalid enum values that were silently converted
to SINGLE (index 0) due to numpy.select's default behavior:

- Utah: `single` (lowercase) → `SINGLE`
- Missouri: `0` (numeric) → `SINGLE`
- Colorado: `HEAD_OF_HOUSE_HOLD` (typo) → `HEAD_OF_HOUSEHOLD`
- North Carolina: `WIDWO` (typo) → `SURVIVING_SPOUSE`

These will cause test failures once policyengine-core#411 is merged,
which adds validation to raise clear errors for invalid enum values.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@MaxGhenis MaxGhenis merged commit 93989bc into PolicyEngine:master Dec 3, 2025
5 checks passed
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.

1 participant