Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/fix-wa-pte-county-lookup.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed crashes in the Washington senior and disabled property tax exemption for households outside Washington and Washington households with an unknown or out-of-state county.
Original file line number Diff line number Diff line change
Expand Up @@ -241,3 +241,89 @@
# CDI = 60,000 + 30,000 = 90,000 > King 2024 T3 ($84,000) -> ineligible.
# Without the cotenant amount the tax unit would have qualified for Tier 3.
wa_pte_income_eligible: false

- name: Case 12, out-of-state and unknown-county households in one simulation with a King County household.
# defined_for masks the output but the formula still runs over every
# household in the simulation. Before the county guard, the South Dakota
# county and the UNKNOWN county reached the Washington county-keyed
# thresholds and raised ParameterNotFoundError.
period: 2024
input:
people:
person1:
age: 70
person2:
age: 70
person3:
age: 70
person4:
age: 70
tax_units:
tax_unit1:
members: [person1]
adjusted_gross_income: 84_000
tax_unit2:
members: [person2]
adjusted_gross_income: 84_000
tax_unit3:
members: [person3]
adjusted_gross_income: 41_000
tax_unit4:
members: [person4]
adjusted_gross_income: 41_001
spm_units:
spm_unit1:
members: [person1]
spm_unit2:
members: [person2]
spm_unit3:
members: [person3]
spm_unit4:
members: [person4]
households:
household1:
members: [person1]
state_code: WA
county: KING_COUNTY_WA
household2:
members: [person2]
state_code: SD
county: MARSHALL_COUNTY_SD
household3:
members: [person3]
state_code: WA
county: UNKNOWN
household4:
members: [person4]
state_code: WA
county: UNKNOWN
output:
# household1: King 2024 T3 = $84,000; income at threshold -> eligible.
# household2: South Dakota; defined_for zeroes the result.
# household3: UNKNOWN county falls back to Adams 2024 T3 = $41,000;
# income at threshold -> eligible.
# household4: $41,001 > Adams T3 -> ineligible (King T3 would admit it).
wa_pte_income_eligible: [true, false, true, false]

- name: Case 13, Washington household with an Oregon county uses Adams County income eligibility.
period: 2027
input:
people:
person1:
age: 70
tax_units:
tax_unit:
members: [person1]
adjusted_gross_income: 40_000
filing_status: SINGLE
spm_units:
spm_unit:
members: [person1]
households:
household:
members: [person1]
state_code: WA
county: MULTNOMAH_COUNTY_OR
output:
# CDI = $40,000 - $7,500 = $32,500, below Adams Tier 3 ($56,000).
wa_pte_income_eligible: true
Original file line number Diff line number Diff line change
Expand Up @@ -317,3 +317,120 @@
# Completes the Tier 2 boundary triple together with Case 13 (T2-1) and
# Case 2 (at T2).
wa_pte_tier: 3

- name: Case 15, 2027 out-of-state and unknown-county households in one simulation with a King County household.
# defined_for masks the output but the formula still runs over every
# household in the simulation. Before the county guard, the South Dakota
# county and the UNKNOWN county reached the Washington county-keyed
# thresholds and raised ParameterNotFoundError.
period: 2027
input:
people:
person1:
age: 70
person2:
age: 70
person3:
age: 70
tax_units:
tax_unit1:
members: [person1]
adjusted_gross_income: 83_500
filing_status: SINGLE
tax_unit2:
members: [person2]
adjusted_gross_income: 83_500
filing_status: SINGLE
tax_unit3:
members: [person3]
adjusted_gross_income: 52_500
filing_status: SINGLE
spm_units:
spm_unit1:
members: [person1]
spm_unit2:
members: [person2]
spm_unit3:
members: [person3]
households:
household1:
members: [person1]
state_code: WA
county: KING_COUNTY_WA
household2:
members: [person2]
state_code: SD
county: MARSHALL_COUNTY_SD
household3:
members: [person3]
state_code: WA
county: UNKNOWN
output:
# 2027 CDI = AGI - max(0, $7,500 single standard deduction).
# household1: CDI = 83,500 - 7,500 = 76,000 = King 2027 T1 -> Tier 1.
# household2: South Dakota; defined_for zeroes the result.
# household3: CDI = 52,500 - 7,500 = 45,000. UNKNOWN county falls back
# to Adams 2027: T1 $42,000 < 45,000 <= T2 $49,000 -> Tier 2.
wa_pte_tier: [1, 0, 2]

- name: Case 16, Washington household with an Oregon county uses Adams County tiers.
period: 2027
input:
people:
person1:
age: 70
tax_units:
tax_unit:
members: [person1]
adjusted_gross_income: 40_000
filing_status: SINGLE
spm_units:
spm_unit:
members: [person1]
households:
household:
members: [person1]
state_code: WA
county: MULTNOMAH_COUNTY_OR
output:
# CDI = $40,000 - $7,500 = $32,500, below Adams Tier 1 ($42,000).
wa_pte_tier: 1

- name: Case 17, five tax units share one Washington household with an unknown county.
period: 2027
input:
people:
person1: {age: 70}
person2: {age: 70}
person3: {age: 70}
person4: {age: 70}
person5: {age: 70}
tax_units:
tax_unit1:
members: [person1]
wa_pte_combined_disposable_income: 42_000
tax_unit2:
members: [person2]
wa_pte_combined_disposable_income: 42_001
tax_unit3:
members: [person3]
wa_pte_combined_disposable_income: 49_000
tax_unit4:
members: [person4]
wa_pte_combined_disposable_income: 56_000
tax_unit5:
members: [person5]
wa_pte_combined_disposable_income: 56_001
spm_units:
spm_unit:
members: [person1, person2, person3, person4, person5]
households:
household:
members: [person1, person2, person3, person4, person5]
state_code: WA
county: UNKNOWN
output:
# Each tax unit uses Adams thresholds of $42,000, $49,000 and $56,000.
# $42,000 = T1; $42,001 and $49,000 fall in T2; $56,000 = T3;
# $56,001 > T3.
wa_pte_tier: [1, 2, 2, 3, 0]
Original file line number Diff line number Diff line change
Expand Up @@ -492,3 +492,183 @@
# exemption = tier_3_exempt_share * real_estate_taxes
# = 0.45 * 5,000 = 2,250
wa_senior_disabled_property_tax_exemption: 2_250

- name: Case 19, 2026 Washington and South Dakota households in one simulation.
# Reproduces the full-population crash: defined_for masks the output but
# the tier lookup still runs over the South Dakota household, whose county
# is not a key of the Washington county thresholds.
period: 2026
input:
people:
person1:
age: 70
real_estate_taxes: 6_000
assessed_property_value: 700_000
person2:
age: 70
real_estate_taxes: 6_000
assessed_property_value: 700_000
tax_units:
tax_unit1:
members: [person1]
adjusted_gross_income: 40_000
filing_status: SINGLE
tax_unit2:
members: [person2]
adjusted_gross_income: 40_000
filing_status: SINGLE
spm_units:
spm_unit1:
members: [person1]
spm_unit2:
members: [person2]
households:
household1:
members: [person1]
state_code: WA
county: KING_COUNTY_WA
household2:
members: [person2]
state_code: SD
county: MARSHALL_COUNTY_SD
output:
# household1 is Case 16's household: 4,320.
# household2 is in South Dakota: 0.
wa_senior_disabled_property_tax_exemption: [4_320, 0]

- name: Case 20, 2027 Washington and South Dakota households in one simulation.
period: 2027
input:
people:
person1:
age: 70
real_estate_taxes: 6_000
assessed_property_value: 700_000
person2:
age: 70
real_estate_taxes: 6_000
assessed_property_value: 700_000
tax_units:
tax_unit1:
members: [person1]
adjusted_gross_income: 40_000
filing_status: SINGLE
tax_unit2:
members: [person2]
adjusted_gross_income: 40_000
filing_status: SINGLE
spm_units:
spm_unit1:
members: [person1]
spm_unit2:
members: [person2]
households:
household1:
members: [person1]
state_code: WA
county: KING_COUNTY_WA
household2:
members: [person2]
state_code: SD
county: MARSHALL_COUNTY_SD
output:
# household1 is Case 17's household: 5,340.
# household2 is in South Dakota: 0.
wa_senior_disabled_property_tax_exemption: [5_340, 0]

- name: Case 21, unknown Washington county matches explicit Adams County.
period: 2027
input:
people:
person1:
age: 70
real_estate_taxes: 6_000
assessed_property_value: 700_000
person2:
age: 70
real_estate_taxes: 6_000
assessed_property_value: 700_000
tax_units:
tax_unit1:
members: [person1]
adjusted_gross_income: 40_000
filing_status: SINGLE
tax_unit2:
members: [person2]
adjusted_gross_income: 40_000
filing_status: SINGLE
spm_units:
spm_unit1:
members: [person1]
spm_unit2:
members: [person2]
households:
household1:
members: [person1]
state_code: WA
county: UNKNOWN
household2:
members: [person2]
state_code: WA
county: ADAMS_COUNTY_WA
output:
# CDI = $40,000 - $7,500 = $32,500 <= Adams Tier 1 ($42,000).
# Tier 1 exemption = $6,000 × (0.45 + 0.55 × 0.80) = $5,340.
wa_pte_combined_disposable_income: [32_500, 32_500]
wa_pte_tier: [1, 1]
wa_senior_disabled_property_tax_exemption: [5_340, 5_340]

- name: Case 22, a South Dakota household alone has no Washington exemption.
period: 2027
input:
people:
person1:
age: 70
real_estate_taxes: 6_000
assessed_property_value: 700_000
tax_units:
tax_unit:
members: [person1]
adjusted_gross_income: 40_000
filing_status: SINGLE
spm_units:
spm_unit:
members: [person1]
households:
household:
members: [person1]
state_code: SD
county: MARSHALL_COUNTY_SD
output:
# Zero Washington households means zero eligible tax units and $0 benefit.
wa_pte_income_eligible: false
wa_pte_tier: 0
wa_senior_disabled_property_tax_exemption: 0

- name: Case 23, an omitted Washington county defaults to Adams County.
period: 2027
input:
people:
person1:
age: 70
real_estate_taxes: 6_000
assessed_property_value: 700_000
tax_units:
tax_unit:
members: [person1]
adjusted_gross_income: 40_000
filing_status: SINGLE
spm_units:
spm_unit:
members: [person1]
households:
household:
members: [person1]
state_code: WA
output:
# CDI = $40,000 - $7,500 = $32,500 <= Adams Tier 1 ($42,000).
# Tier 1 exemption = $6,000 × (0.45 + 0.55 × 0.80) = $5,340.
county: ADAMS_COUNTY_WA
wa_pte_combined_disposable_income: 32_500
wa_pte_tier: 1
wa_senior_disabled_property_tax_exemption: 5_340
Loading
Loading