Repository navigation
Allow US calculations in 2036 #3926
Description
Goal
Let the US engine and app calculate 2036. CBO's February 2026 baseline runs through 2036, and its 10-year budget window is now 2027–2036. Today the API and app stop at 2035. This is US only; the UK stays at 2024–2030.
Why this is more than the 2035 change
When 2035 was added (#2315, April 2025), it took two lines in policyengine_api/country.py. Today the binding limit is the canonical SPM forecast. It covers 2022–2035, and every layer reads its years from it:
- spm-calculator,
rolling_forecast_2026_09_09.json; - policyengine-us, through
spm.py; - the policyengine.py bundle, which pins the forecast's
content_sha256; - the simulation worker's year boundary.
A 2036 request fails with SPM_YEAR_UNAVAILABLE. Everything else already handles 2036:
- policyengine-us parameters run to 2100;
- the US data release is one 2024-base dataset, uprated per year;
- budget windows allow end years up to 2099.
Steps, in release order
Phase 1 (independent):
- spm-calculator: extend the forecast horizon to 2036 (build scripts, inputs and artifacts), then release 1.1.0. CBO's 2036 prices are already in
cbo_calendar_2026_02.csv. - policyengine-us: load CBO's February 2026 projections for 2036 into the CPI-W, SSA, HHS and SNAP upraters and into the payroll cap and wage index. Move the last-projected-year settings to 2036.
- policyengine-api: add 2036 to the US
time_periodlist and the v2 catalog year range; update the docs and the tests that use 2036 as the unavailable year. Merge only together with the bundle bump below. - policyengine-app-v2: move the metadata fallback
maxDateto 2036. Everything else readseconomy_options.time_period.
Phase 2:
- policyengine-us: widen the
spm-calculatorpin to 1.1.x and update the forecast-years test. - policyengine.py: certify a bundle with spm-calculator 1.1.0, the new forecast hash and a policyengine-us release that includes the pin. Update the docs and tests: 2022–2036 supported, 2037 the unavailable example.
Phase 3 (rollout):
- policyengine-api: the bundle bump plus the 2036 PR, in one release.
- policyengine-sim-api: the bundle bump, and move the unavailable-year test examples from 2036 to 2037. Deploy the worker before or with the API.
Phase 4 (follow-up):
- microcosm: set the annual static aging
end_yearto 2036, for when policyengine.py Update PolicyEngine US to 0.345.11 #524 activates annual US datasets.
Release-order risk
Shipping the country.py change before a bundle with the 2036 forecast would show 2036 in the year picker while every 2036 run fails. The API PR stays a draft until the bundle PR is ready.
Verification on staging
GET /us/metadatalists 2036.- A national 2036 economy run completes, and its SPM receipt includes
"2036". budget_window:2027:10completes all ten years.- 2037 still returns
SPM_YEAR_UNAVAILABLE. - In the app, the year picker shows 2036 and a 2027–2036 window renders.
PRs and issues will be linked here as they open.
🤖 Generated with Claude Code
Activity
DTrim99 commentedon Oct 14, 2026
Linked so far:
maxDateto 2036-12-31. The fallback applies only until metadata loads, so it can merge any time.Next: the spm-calculator horizon PR. Its CE and ACS components need a rebuild from the raw microdata caches retained from the 9/9 build, so that PR will ask @MaxGhenis to run the two component builds.
DTrim99 commentedon Oct 14, 2026
spm-calculator (critical path):
scripts/verify_horizon_extension.py, which requires every 2022–2035 value to stay byte-identical and runs the full household grid against the current artifact.Next: the policyengine-us CBO February 2026 refresh, stacked on PolicyEngine/policyengine-us#10225.
DTrim99 commentedon Oct 14, 2026
Later phases, filed now so the owners can see them:
populace_us_2024needs recertifying, since the bundle certifies policyengine-us 2.2.1.end_yearto 2036, for when policyengine.py#524 activates annual US datasets.Still to come:
spm-calculator>=1.1.0,<1.2pin PR, once 1.1.0 is on PyPI.DTrim99 commentedon Oct 14, 2026
policyengine-us CBO refresh: PolicyEngine/policyengine-us#10227 (draft) is stacked on PolicyEngine/policyengine-us#10225; I'll retarget it to
mainafter #10225 merges.