Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
f68832e
Document Social Security benefit lever implementation plan
MaxGhenis Oct 23, 2026
ad80c62
Add audited Social Security COLA and bend-point histories
MaxGhenis Oct 23, 2026
6758e66
Audit stored Social Security scoring sources before applying levers
MaxGhenis Oct 23, 2026
1d17f32
Separate reported Social Security inputs and compose benefit levers
MaxGhenis Oct 23, 2026
2a81c22
Isolate and extend Social Security compatibility coverage
MaxGhenis Oct 23, 2026
ee98c1d
Preserve separate compatibility reports and reported-input uprating c…
MaxGhenis Oct 23, 2026
6101d97
Preserve overlapping Social Security sources and exact multi-year inputs
MaxGhenis Oct 23, 2026
b9c7191
Honor selected bases and zero rows for multi-year benefit sources
MaxGhenis Oct 23, 2026
89edc6c
Share identical COLA policy fixtures across exposure cases
MaxGhenis Oct 23, 2026
8401cd8
Treat Social Security benefit multipliers as dimensionless levels
MaxGhenis Oct 23, 2026
fa7ddfa
Run Social Security lever YAML serially on the existing CI runner
MaxGhenis Oct 23, 2026
561a664
Clarify the Core public retirement override fixture
MaxGhenis Oct 23, 2026
fbca48f
Verify original Social Security dataset columns extend once
MaxGhenis Oct 23, 2026
460f573
Preserve benefit metadata and explicit multi-year test weights
MaxGhenis Oct 23, 2026
4789c54
Check declared Social Security uprating metadata
MaxGhenis Oct 23, 2026
99d7384
Use raw calculation arrays inside multi-year benefit factors
MaxGhenis Oct 23, 2026
849ad59
Preserve legacy Social Security inputs across ingress and extraction
MaxGhenis Oct 23, 2026
1a7b912
Compare legacy benefit ingress against unmodified main
MaxGhenis Oct 23, 2026
43a07be
Retain automatic benefit source provenance across later writes
MaxGhenis Oct 23, 2026
d0187ab
Require an independent main reference and nonzero dataset evidence
MaxGhenis Oct 23, 2026
9bb01d8
Require compatible Core input provenance APIs
MaxGhenis Oct 23, 2026
4372e6b
Isolate extraction comparisons with the review reproducer
MaxGhenis Oct 23, 2026
dfd2e17
Compare every Core builder form with legacy main inputs
MaxGhenis Oct 23, 2026
1ed0b37
Fetch the independent main reference for CI comparisons
MaxGhenis Oct 23, 2026
90c64b5
Preserve every recorded benefit override in household extraction
MaxGhenis Oct 24, 2026
a8b1ec8
Preserve legacy Social Security inputs across Core write routes
MaxGhenis Oct 24, 2026
3db106d
Merge current main into Social Security benefit levers
MaxGhenis Oct 24, 2026
02b7415
Cover branch slots and direct Social Security input helpers
MaxGhenis Oct 24, 2026
5f4b175
Supply exact-period weights in compound Microsimulation fixtures
MaxGhenis Oct 24, 2026
01b60b2
Keep calendar-year factor checks for rolling compound inputs
MaxGhenis Oct 24, 2026
f164c21
Clear compound test caches before rechecking annual factors
MaxGhenis Oct 24, 2026
1f28500
Preserve Social Security sources across Core input routes
MaxGhenis Oct 25, 2026
cd6d298
Keep legacy dump fixtures compatible with removed empty holders
MaxGhenis Oct 25, 2026
6ff667b
Synchronize raw Social Security seeds during initial loading
MaxGhenis Oct 25, 2026
7dce1d6
Refresh automatic benefit sources during composed loading
MaxGhenis Oct 25, 2026
9f8c6c3
Reconcile successful benefit inputs when initial loading fails
MaxGhenis Oct 25, 2026
9f7db36
Search composed Social Security input routes with a state machine
MaxGhenis Oct 25, 2026
8396422
Resolve reported benefit sources at read time
MaxGhenis Oct 25, 2026
8c4640f
Preserve benefit sources through branch and cache cleanup
MaxGhenis Oct 25, 2026
b338d0a
Skip source routing before populations exist
MaxGhenis Oct 25, 2026
607106f
Supply group role metadata to the Core test backend
MaxGhenis Oct 25, 2026
ce2ad34
Refresh derived benefits after source writes
MaxGhenis Oct 25, 2026
ffb62a5
Check benefit readers against surviving source inputs
MaxGhenis Oct 25, 2026
5cff908
Load Core calendar metadata for reader tests
MaxGhenis Oct 26, 2026
25fde8a
Report all values on mismatching benefit routes
MaxGhenis Oct 26, 2026
f0cda5e
Verify benefit state machine under both Core versions
MaxGhenis Oct 26, 2026
70b4949
Remove unapproved Social Security CI job
MaxGhenis Oct 26, 2026
2ecebb1
Compare fresh benefit formulas and assert intended cache differences
MaxGhenis Oct 26, 2026
d91e28f
Exercise inherited sources across branch builder rewrites
MaxGhenis Oct 26, 2026
d52f0c0
Bound composed branch coverage per generated example
MaxGhenis Oct 26, 2026
5826256
Observe compound source refresh across Core versions
MaxGhenis Oct 26, 2026
2a289b5
Preserve Social Security helper precedence and bounded refreshes
MaxGhenis Oct 26, 2026
2e7cccd
Compare compound benefit helpers with pinned current law
MaxGhenis Oct 26, 2026
a439dae
Refresh rebuilt and exact source caches within dependency bounds
MaxGhenis Oct 26, 2026
82d52db
Exercise real Core bookkeeping in benefit input state machine
MaxGhenis Oct 26, 2026
57dc195
Isolate synthetic Social Security checks from microsimulation CI
MaxGhenis Oct 26, 2026
13216f9
Fix refresh of Social Security formula returns without holder storage
MaxGhenis Oct 27, 2026
fb4d238
Generate skipped-storage cache policies in Social Security input machine
MaxGhenis Oct 27, 2026
06092f1
Cover reported-source writes with fast-only benefit caches
MaxGhenis Oct 27, 2026
871ee0e
Date fast returns at memo insertion and preserve cache serialization
MaxGhenis Oct 27, 2026
d55a673
Keep restored memo dates ahead of subsequent Core stores
MaxGhenis Oct 27, 2026
5c0e93e
Preserve formula dates across duplicate memo assignments
MaxGhenis Oct 27, 2026
a7cf9ad
Merge main into ss-benefit-levers
MaxGhenis Oct 27, 2026
6498687
Preserve formula return dates across bulk cache deletion
MaxGhenis Oct 27, 2026
df0ec80
Generate bulk deletion and source-write state transitions
MaxGhenis Oct 27, 2026
a6dcc92
Retain shared benefit parameters in calculator reference
MaxGhenis Oct 27, 2026
a498bb4
Merge current benefit levers for the COLA means test stack
MaxGhenis Oct 27, 2026
a960ce6
Add configurable prior-year Social Security COLA means test
MaxGhenis Oct 27, 2026
ee08e2f
Preserve disabled COLA behavior and complete boundary coverage
MaxGhenis Oct 27, 2026
0f7917a
Test cohort proxies within each static scoring cross-section
MaxGhenis Oct 27, 2026
ce94d2f
Clarify when COLA income thresholds are required
MaxGhenis Oct 27, 2026
9d9cf5c
Bind the A9 preset modifier for shared systems
MaxGhenis Oct 27, 2026
481091a
Merge main after Social Security prerequisite merges
MaxGhenis Oct 27, 2026
4f336b7
Align calculated benefit fixture with complete payment base
MaxGhenis Oct 29, 2026
2c142b8
Preserve legacy COLA route when means test is disabled
MaxGhenis Oct 29, 2026
99d196b
Merge main into Social Security COLA means test
MaxGhenis Oct 30, 2026
ddd4266
Fix independent COLA decisions and preserve legacy calculator withhol…
MaxGhenis Oct 30, 2026
7f3724a
Merge main into ss-cola-means-test-e3
MaxGhenis Oct 31, 2026
b6a70f9
Isolate exact-year Social Security COLA override inputs
MaxGhenis Oct 31, 2026
53c03b7
Test COLA controls across default routes and dataset projection
MaxGhenis Oct 31, 2026
b33afe8
Date the Medicare regression fixture explicitly
MaxGhenis Oct 31, 2026
0a6dedd
Guard COLA override inventory for reform scoring
MaxGhenis Nov 1, 2026
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/ss-cola-means-test-e3.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add an opt-in Social Security COLA means test using prior-year MAGI excluding Social Security, configurable indexed thresholds and filing groups, cohort or all-beneficiary scope, statutory or chained CPI-U COLAs, income-history sensitivities, and an A9 preset. Apply each withholding decision jointly with other COLA changes in reported benefits and the household calculator, with independent per-person overrides while preserving current-law defaults and the legacy A5 withholding input channels. Exclude the new controls from Medicare IRMAA income-history inference and expire them in generated dataset years while preserving supplied decisions. Document the latest-authored-value CPI-U lookup used to index projected thresholds.
6 changes: 4 additions & 2 deletions docs/social-security-benefit-levers.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,10 @@ For each exposed payment event, statutory baseline rate c and configured
addition delta give adjusted rate max(0,c+delta), without a second rounding of
the policy addition. The joint multiplier is `(1+adjusted)/(1+c)` unless that
event is withheld, in which case it is `1/(1+c)`. Each component's
`_cola_withheld` term defaults false; a subsequent means-test implementation
supplies the rules. Switching a policy off later preserves its earlier effect
`_cola_withheld` term defaults false; the optional
[COLA means test](social-security-cola-means-test.md) supplies prior-year income
decisions when enabled. Explicit decisions remain available. Switching a policy
off later preserves its earlier effect
on the benefit level. Public reported-route benefits multiply this joint factor,
the PIA ratio factor, the across-the-board factor, and the payable factor once.

Expand Down
294 changes: 294 additions & 0 deletions docs/social-security-cola-means-test.md

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions docs/usage/social-security-calculator.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,23 +220,23 @@ Withholding sets that event's COLA to zero, jointly with any rate change; no
second COLA factor is applied. Payable shares must lie in [0,1], and rates must
not imply a negative benefit. A depletion-year midyear blend is supplied in the
annual payable-share path. E2 and E3 income/threshold computation belong to
their respective modules; their policies and jointly calculated tax-unit
outputs can consume this route once public wiring exists.
their respective modules. The [COLA means test](../social-security-cola-means-test.md)
now supplies these decisions from prior-tax-year MAGI and filing status.

## Public source-selector wiring

Source-selector PR #10400 was open when this route was built. Its canonical
COLA history and common lever parameter files are reused here. Historical bend
The source selectors reuse the canonical COLA history and common lever
parameter files. Historical bend
points remain in a separate table because copying its legacy scale backfill
would change existing pre-2015 `ss_pia` outputs with this route disabled. This change adds
no `_reported` twins and changes no public benefit formula. Once it merges,
map its supplied-AIME/PIA retirement modes to `ss_calculated_retirement` and its
restricted survivor mode to `ss_calculated_survivors`. Bypass population
PIA/COLA factors and any across/payable factors already applied in this ledger;
perform the earnings test once. Preserve explicit public final overrides.
For joint household tax calculations before that wiring, explicitly supply the
calculated annual checks to the existing public components in a separate
calculation; never write them into `_reported` as if they were original data.
would change existing pre-2015 `ss_pia` outputs with this route disabled.
Select `social_security_retirement_source` as `supplied_aime` or `supplied_pia`
with matching `ss_calculator_source` of `aime` or `pia`. For the restricted
survivor route, select `social_security_survivors_source` as
`supplied_ratio_survivor` with calculator source `survivor`. The public benefit
then reads the calculated checks, bypassing population PIA, COLA, across-the-board
and payable factors already applied in this ledger. The earnings test runs
once. Explicit public final overrides retain their precedence. Calculated
checks are never written into `_reported` as original data.

## Sources and validation

Expand Down
19 changes: 18 additions & 1 deletion policyengine_us/data/economic_assumptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@
"calibration.gov.cbo.income_by_source.adjusted_gross_income"
)

# These controls describe a decision for one supplied payment year, rather
# than a characteristic to project. Legacy COLA-withheld booleans retain
# their existing carry-forward behavior.
_EXACT_YEAR_COLA_OVERRIDES = (
"social_security_retirement_cola_override",
"social_security_disability_cola_override",
"social_security_survivors_cola_override",
"social_security_dependents_cola_override",
"ss_calculator_cola_override",
)

MICRODATA_UPRATING_OVERRIDES = {
"american_opportunity_credit": DEFAULT_MICRODATA_UPRATING,
"cdcc_relevant_expenses": DEFAULT_MICRODATA_UPRATING,
Expand Down Expand Up @@ -99,7 +110,10 @@ def extend_single_year_dataset(
If ``end_year`` is not provided, it defaults to the latest year
covered by the CPI-U parameter (gov.bls.cpi.cpi_u).

Variables without an uprating parameter are carried forward unchanged.
Variables without an uprating parameter are carried forward unchanged,
except the four component COLA overrides and ``ss_calculator_cola_override``.
Those exact-year decisions become automatic (``-1``) in generated rows;
the supplied base year and legacy COLA-withheld booleans are preserved.
"""
if system is None:
from policyengine_us.system import system as _system
Expand All @@ -122,6 +136,9 @@ def extend_single_year_dataset(
for year in range(start_year + 1, end_year + 1):
next_year = dataset.copy(deep=False)
next_year.time_period = str(year)
for name in _EXACT_YEAR_COLA_OVERRIDES:
if name in next_year.person:
next_year.person[name] = -1
datasets.append(next_year)

multi_year_dataset = USMultiYearDataset(datasets=datasets)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
description: "COLA index for income at or below the means-test threshold: 0 = statutory pays the full statutory COLA; 1 = chained_cpi_u uses gov.bls.cpi.c_cpi_u with statutory rounding, high-water and no-decrease rules. The A9 preset uses 1. Numeric codes provide compatibility with the parameter engine."
values:
0000-01-01: 0
metadata:
label: Social Security below-threshold COLA index
economy: false
reference:
- title: OACT provision A9, 2026 Trustees Report basis
href: https://www.ssa.gov/OACT/solvency/provisions/cola.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: First effective COLA calendar month for the contributed means test. The default December COLA first changes January payments in the following calendar year.
values:
0000-01-01: 12
metadata:
unit: month
label: Social Security COLA means-test effective month
economy: false
reference:
- title: OACT provision A9, 2026 Trustees Report basis
href: https://www.ssa.gov/OACT/solvency/provisions/cola.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: First effective COLA calendar year for the contributed means test. A December COLA first changes January payments in the following year. The A9 preset uses December 2028.
values:
0000-01-01: 2026
metadata:
unit: year
label: Social Security COLA means-test effective year
economy: false
reference:
- title: OACT provision A9, 2026 Trustees Report basis
href: https://www.ssa.gov/OACT/solvency/provisions/cola.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: Enable the contributed Social Security COLA means test. Positive single and joint income thresholds supplied by the scenario are required when a prior_year income decision is evaluated. The never_withheld and always_withheld sensitivities and pre-receipt index-only events do not read the thresholds.
values:
0000-01-01: false
metadata:
unit: bool
label: Social Security COLA means test enabled
economy: false
reference:
- title: OACT provision A9, 2026 Trustees Report basis
href: https://www.ssa.gov/OACT/solvency/provisions/cola.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
description: "Income threshold group for a head of household under the COLA means test: 0 = single; 1 = joint. OACT A9 uses 0; scenarios may supply another mapping."
values:
0000-01-01: 0
metadata:
label: Social Security COLA means-test head of household group
economy: false
reference:
- title: OACT provision A9, 2026 Trustees Report basis
href: https://www.ssa.gov/OACT/solvency/provisions/cola.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
description: "Income threshold group for joint filers under the COLA means test: 0 = single; 1 = joint. OACT A9 uses 1; scenarios may supply another mapping."
values:
0000-01-01: 1
metadata:
label: Social Security COLA means-test joint filer group
economy: false
reference:
- title: OACT provision A9, 2026 Trustees Report basis
href: https://www.ssa.gov/OACT/solvency/provisions/cola.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
description: "Income threshold group for married filing separately under the COLA means test: 0 = single; 1 = joint. OACT A9 uses 0; scenarios may supply another mapping."
values:
0000-01-01: 0
metadata:
label: Social Security COLA means-test separate filer group
economy: false
reference:
- title: OACT provision A9, 2026 Trustees Report basis
href: https://www.ssa.gov/OACT/solvency/provisions/cola.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
description: "Income threshold group for a single filer under the COLA means test: 0 = single; 1 = joint. OACT A9 uses 0; scenarios may supply another mapping."
values:
0000-01-01: 0
metadata:
label: Social Security COLA means-test single filer group
economy: false
reference:
- title: OACT provision A9, 2026 Trustees Report basis
href: https://www.ssa.gov/OACT/solvency/provisions/cola.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
description: "Income threshold group for a surviving spouse under the COLA means test: 0 = single; 1 = joint. OACT A9 does not name this filing status; the default 1 is an explicit modeling choice that scenarios may change."
values:
0000-01-01: 1
metadata:
label: Social Security COLA means-test surviving spouse group
economy: false
reference:
- title: OACT provision A9, 2026 Trustees Report basis
href: https://www.ssa.gov/OACT/solvency/provisions/cola.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: First eligibility cohort reached when the Social Security COLA means-test scope is first_eligible_cohorts. The 2026 boundary is a configurable scenario choice; the OACT A9 preset applies to all beneficiaries. This contributed reform is disabled by default.
values:
0000-01-01: 2026
metadata:
unit: year
label: Social Security COLA means-test first eligibility cohort
economy: false
reference:
- title: OACT provision A9, 2026 Trustees Report basis
href: https://www.ssa.gov/OACT/solvency/provisions/cola.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
description: "Income decision for the COLA means test: 0 = prior_year uses the preceding tax year's MAGI excluding Social Security; 1 = never_withheld and 2 = always_withheld provide the missing-history sensitivity envelope. Extended population data are static cross-sections, so the prior-year copy of a record is a proxy rather than an observed income history; supplied histories override that proxy. Numeric codes provide compatibility with the parameter engine."
values:
0000-01-01: 0
metadata:
label: Social Security COLA means-test income sensitivity
economy: false
reference:
- title: OACT provision A9, 2026 Trustees Report basis
href: https://www.ssa.gov/OACT/solvency/provisions/cola.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
description: "COLA index before benefit receipt: -1 = follow_below_threshold uses below_threshold_cola_index; 0 = statutory and 1 = chained_cpi_u override it. The default therefore follows the below-threshold policy. The A9 preset uses 1. Numeric codes provide compatibility with the parameter engine."
values:
0000-01-01: -1
metadata:
label: Social Security pre-receipt COLA index
economy: false
reference:
- title: OACT provision A9, 2026 Trustees Report basis
href: https://www.ssa.gov/OACT/solvency/provisions/cola.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
description: "COLA means-test scope: 0 = first_eligible_cohorts limits the reform to the configured first eligibility cohort and later; 1 = all_beneficiaries applies to every beneficiary. The A9 preset uses 1. Numeric codes provide compatibility with the parameter engine."
values:
0000-01-01: 0
metadata:
label: Social Security COLA means-test scope
economy: false
reference:
- title: OACT provision A9, 2026 Trustees Report basis
href: https://www.ssa.gov/OACT/solvency/provisions/cola.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: Dollar base year for supplied single and joint COLA means-test thresholds. Scenario values are supplied at scoring time; the A9 example is 85000 single and 170000 joint in 2018 dollars.
values:
0000-01-01: 2026
metadata:
unit: year
label: Social Security COLA means-test threshold dollar base year
economy: false
reference:
- title: OACT provision A9, 2026 Trustees Report basis
href: https://www.ssa.gov/OACT/solvency/provisions/cola.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: Years subtracted from a COLA payment year to select the December CPI-U threshold-index snapshot, relative to December of the dollar base year. The default uses the preceding December. This lag is a modeling convention; OACT A9 specifies CPI-U indexing without this snapshot rule.
values:
0000-01-01: 1
metadata:
unit: year
label: Social Security COLA means-test threshold CPI-U lag
economy: false
reference:
- title: OACT provision A9, 2026 Trustees Report basis
href: https://www.ssa.gov/OACT/solvency/provisions/cola.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: Joint-group COLA means-test income threshold in base-year dollars. Zero is an unset sentinel; a positive scenario value is required when a prior_year income decision is evaluated. The never_withheld and always_withheld sensitivities and pre-receipt index-only events do not read this threshold. The documented A9 example is 170000 in 2018 dollars, not a default package value.
values:
0000-01-01: 0
metadata:
unit: currency-USD
label: Social Security COLA means-test joint income threshold
economy: false
reference:
- title: OACT provision A9, 2026 Trustees Report basis
href: https://www.ssa.gov/OACT/solvency/provisions/cola.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: Dollar increment for half-up rounding of CPI-U-indexed COLA means-test thresholds. The example increment of 100 dollars is a modeling convention reflecting the precision of OACT A9's displayed estimates; it is configurable for scenarios.
values:
0000-01-01: 100
metadata:
unit: currency-USD
label: Social Security COLA means-test threshold rounding increment
economy: false
reference:
- title: OACT provision A9, 2026 Trustees Report basis
href: https://www.ssa.gov/OACT/solvency/provisions/cola.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: Single-group COLA means-test income threshold in base-year dollars. Zero is an unset sentinel; a positive scenario value is required when a prior_year income decision is evaluated. The never_withheld and always_withheld sensitivities and pre-receipt index-only events do not read this threshold. The documented A9 example is 85000 in 2018 dollars, not a default package value.
values:
0000-01-01: 0
metadata:
unit: currency-USD
label: Social Security COLA means-test single income threshold
economy: false
reference:
- title: OACT provision A9, 2026 Trustees Report basis
href: https://www.ssa.gov/OACT/solvency/provisions/cola.html
41 changes: 41 additions & 0 deletions policyengine_us/reforms/ssa/cola_means_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
"""Named OACT A9 mechanics; applying this preset opts into the contribution."""

from policyengine_core.reforms import Reform


class a9(Reform):
def apply(self):
# Shared systems call this unbound method with the system as self.
self.modify_parameters(a9.configure_parameters)

@staticmethod
def configure_parameters(parameters):
p = parameters.gov.contrib.ssa.benefit_levers.cola.means_test
values = {
"enabled": True,
"scope": 1,
"effective_year": 2028,
"effective_month": 12,
"below_threshold_cola_index": 1,
"pre_receipt_cola_index": 1,
"income_sensitivity": 0,
}
for name, value in values.items():
getattr(p, name).update(start="0001-01-01", value=value)
for name, value in {
"base_year": 2018,
"single": 85000,
"joint": 170000,
"index_lag": 1,
"rounding": 100,
}.items():
getattr(p.thresholds, name).update(start="0001-01-01", value=value)
for name, value in {
"SINGLE": 0,
"JOINT": 1,
"SEPARATE": 0,
"HEAD_OF_HOUSEHOLD": 0,
"SURVIVING_SPOUSE": 1,
}.items():
getattr(p.filing_groups, name).update(start="0001-01-01", value=value)
return parameters
6 changes: 4 additions & 2 deletions policyengine_us/tests/core/test_social_security_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1130,12 +1130,14 @@ def test_reported_twins_are_pure_and_original_dataset_names_keep_their_uprater()
@pytest.mark.parametrize(
"source", ["supplied_aime", "supplied_pia", "supplied_ratio_survivor", "history"]
)
def test_reserved_sources_fail_explicitly_instead_of_using_reported_fallback(source):
def test_unmatched_sources_fail_explicitly_instead_of_using_reported_fallback(source):
public = SOCIAL_SECURITY_COMPONENTS[0]
simulation = make_simulation(
inputs={f"{public}_source": {2024: source}, f"{public}_reported": {2024: 0}}
)
with pytest.raises(NotImplementedError, match="reserved"):
with pytest.raises(
ValueError, match="must match the supported ss_calculator_source"
):
simulation.calculate(public, 2024)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ def exposure_parameters(**overrides):
name: {"values": value if isinstance(value, dict) else {"0000-01-01": value}}
for name, value in values.items()
}
cola["means_test"] = {"enabled": {"values": {"0000-01-01": False}}}
params = ParameterNode(
data={
"gov": {
Expand Down
Loading
Loading