Migrate my_friend_ben fixture off removed medical_out_of_pocket_expenses#1493
Merged
Merged
Conversation
policyengine-us 1.673.0 removed the umbrella `medical_out_of_pocket_expenses` input (PR PolicyEngine/policyengine-us#8178), which decomposed it into program-specific aggregates with separate premium and non-premium pieces. Send `other_medical_expenses` instead, the load-bearing replacement for non-premium medical spending used by every internal program aggregate (itemized_medical_expenses, snap_allowable_medical_expenses, hud_medical_expenses, medicaid_medically_needy_medical_expenses, pa_ccw_medical_expenses, and SPM MOOP). Without this fix, the my_friend_ben integration test fails with HTTP 500 / VariableNotFoundError once the package is bumped past 1.672.0. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 6, 2026
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
Migrates the
my_friend_bencustomer-household integration fixture off the input variablemedical_out_of_pocket_expenses, which is removed inpolicyengine-us1.673.0+. Sendsother_medical_expensesinstead — the load-bearing replacement for non-premium medical spending.Unblocks #1491 (the weekly
policyengine-us1.663.0 → 1.686.0 bump), whose CI currently fails becausetests/integration_with_auth/test_customer_inputs.py::TestCustomerInputs::test_my_friend_benreturns HTTP 500 /VariableNotFoundErrorwhen the engine receives the removed variable.Why the change is needed
policyengine-usPR PolicyEngine/policyengine-us#8178 ("Decompose SPM MOOP premiums") removed the umbrellamedical_out_of_pocket_expensesPerson variable. It was previouslyadds = ["health_insurance_premiums", "other_medical_expenses"]— a convenience aggregate. Each statutory program (IRS §213 itemized, SNAP, HUD, Medicaid medically-needy, PA CCW, SPM MOOP) now has its own program-specific aggregate that follows its own legal definition, all of which readother_medical_expenses(and a premium variable) directly.The granular pieces —
other_medical_expenses,health_insurance_premiums_without_medicare_part_b,over_the_counter_health_expenses— have existed since PolicyEngine/policyengine-us#4997 (September 2024), so this migration carries no semantic loss. The fixture's prior value was0, so the substitution is exact regardless.Partner impact
Customers (e.g., MyFriendBen) sending
medical_out_of_pocket_expensesin household payloads need the same migration. A separate partner notice covers the full mapping. For most cases, the substitution ismedical_out_of_pocket_expenses → other_medical_expenses; if the value also represented premiums, sendhealth_insurance_premiumsalongside.Files
tests/data/customer_households/my_friend_ben.py— rename input keychangelog.d/migrate-medical-out-of-pocket-expenses-fixture.changed.md— fragmentTest plan
pytest tests/integration_with_auth/test_customer_inputs.py::TestCustomerInputs::test_my_friend_benpasses locally againstpolicyengine-us1.686.0 (previously failed withVariableNotFoundError)ruff format --checkclean🤖 Generated with Claude Code