Repository navigation
PolicyEngine-US bridge: depletion-cut offsets for illustrative households - #506
Merged
Merged
Conversation
ILLUSTRATIVE HOUSEHOLDS, NOT SURVEY DATA. A Social Security cut at trust fund depletion (the 2026 Trustees Report's OASI payable share, with the combined OASDI share as a sensitivity), applied to 2026 benefits under 2026 law through the PolicyEngine-US bridge of #496. - src/populace_dynamics/bridge/depletion_cut.py: reads the depletion year and payable share from the Highlights page's own sentences (and Table II.A1), applies the cut to each monthly benefit rounded down to a dollar (415(g)), and groups the decomposition's leaves by who pays the offset (federal, state, joint). - scripts/pe_us_depletion_cut_sample_households.py: #496's households A-C at #496's current-law benefit, a medium earner (D) and a one-earner couple (E, spouse's benefit from Track B G), each in CA, MT and FL. - The Highlights page and the fetch records, byte-pinned (.gitattributes). - Unit and Hypothesis tests; the module joins #496's bridge in the birth-evidence exclusions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The caveats now quote the Highlights page for the temporary senior deduction and for income taxation of benefits, and the script refuses a page without those phrases. The SNAP caveat states the statute's 6 percent and 5-15 percent terms, and the summary chart names E's pension. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every PNG and SVG has the ILLUSTRATIVE label and the 2026-law note as its title and description, so the label is findable in the bytes as well as drawn on the chart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three independent reviews (correctness, claims against source, benefit derivations) found no arithmetic or identity error; this fixes what they did find. - Claims: the across-the-board cut is stated as an assumption, quoting the Trustees Report (depletion means benefits "could not be paid in full on a timely basis"); the rounding text says 415(g) rounds once; the SS input-variable claim names Idaho's retirement deduction; California's supplement cites 1382e(a); the MSP basis names QI's 100 percent federal share; "hypothetical" and an unsupported "rationed" are cut; the design note's C-versus-D and differential-check wording is corrected. - Checks: each payer group is checked against the bridge's display categories (an independent reading, replacing checks that held by construction); a changed MSP value that is all federal (QI) is refused; the full report's quoted phrases and the law pages' status and size are checked; --docs-dir outside the repository is refused up front. - Output: the health text names the optional aged Medicaid pathway and its limit; the default tables drop the always-zero joint column and add the with-health offset and joint shares; chart ticks no longer overlap; exact Fraction arithmetic in the cut. - Tests: union tracing of a shared baseline, a write-path smoke test, the grouping and QI refusals, tick labels, Fraction exactness; the artifact test (unit tier) and the oracle test; tier counts 5,756 unit and 212 oracle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The artifact test reads the default variant's offsets where the script writes them (beside the decomposition), which failed 3 of its 24 tests. - When the cut starts SSI in a state where SSI receipt confers Medicaid in PolicyEngine-US (read from the release's ssi_recipient parameters; Montana is covered and section 1634), the health text names that route too. The described pattern is refused for a couple, whose household memo sums would double the limit. - The category cross-check is described as it is: category_for names Social Security, SSI, SNAP and the income taxes, and places state benefits, state refundable credits and health by position. - The no-joint-change-without-health check moves into check_invariants, before anything is written. - #496's SNAP caveat, which describes losing California's supplement, is replaced by the direction-free fact it rests on. - An unrecorded counterfactual is cut from the design note; the summary chart's legend no longer sits on the 100 percent line. - Tests for each; unit tier 5,762. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ILLUSTRATIVE HOUSEHOLDS, NOT SURVEY DATA; 2026 law and prices. A fresh run (90 cases, every changed leaf traced) from clean code at 27c9867 with policyengine-us 2.18.0 from PyPI (RECORD-verified): JSON with provenance, the Markdown tables, a waterfall per household and the offset-share summary chart, each labelled. The run and trace job hashes equal the two earlier runs', and so do the numbers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI installs the dev extra only; matplotlib is in the model extra. The write-path smoke test is split: the Markdown and JSON part always runs, and the chart part skips without matplotlib. Unit tier 5,763. Tests only; the committed outputs (generated at 27c9867) are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
marked this pull request as ready for review
October 1, 2026 12:15
Both PRs' bridge modules stay in the reducer exclusion lists, in the same order in the script and the test. Tier counts: unit 5,813 and oracle_policyengine 220 (master's plus this branch's 135 and 5). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Blocking items from the claims review, each verified first: - Montana Medicaid. policyengine-us 2.18.0 encodes an optional aged pathway for Montana at 75% of the poverty guideline (senior_or_disabled/income/limit/individual.yaml:80-81). Its cited KFF source leaves Montana unchecked for that pathway (2018 Appendix Table 1) and gives Montana's limit as the SSI benefit rate ($750, 74%, in 2018; $943, 75%, "1634 State" in June 2024). The health text now has two routes: SSI receipt (the 22% cut: SSI begins, Montana covers SSI recipients, medicaid_category.py checks SSI first) and an encoding artifact (the 17% cut: SSI stays zero, $2 a month over the rate, and only the encoded limit admits the household), labelled "ENCODING ARTIFACT, NOT STATE POLICY" in the JSON, the tables (marked ‡), the design note and the explanations. The Medicare Savings Program loss is split into premiums and the QMB cost-sharing proxy (20% of an "Estimated" $14,500). The KFF fetch record is committed. - The Trustees Report: the full shortfall sentence (Table IV.A1 note, printed page 46) replaces the out-of-context "not well-defined" quote. - The wrong-way check is described by the categories it covers. - The oracle zero-cut test runs a payable-share-1 case of its own; the artifact test rechecks more of the pre-write checks. - Visible chart titles start "Illustrative households:". - "Each OASI benefit", not every Social Security benefit. - CalWORKs counts both Social Security inputs; the differences are Idaho's deduction and eight states' child-care lists. Nonblocking: tax-sign and per-cell rounding notes; the OASDI transfer assumption and the declining payable share (first-year cuts); printed page numbers; the 415(g) scope; the :339 cite; household E's pension is the worker's; the unsourced CSFP and "rationed" clauses are cut; the guard counts uncaused changes and notes double-counted baselines; the joint-guard test is isolated; the artifact test checks all ten summary columns and ties the recorded commit to HEAD. Unit tier 5,824. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 1, 2026
…ules The encoding note now cites Montana's own sources instead of reading the limit off KFF alone. Montana covers aged, blind and disabled people who meet SSI's income standard without receiving SSI (State Plan Attachment 3.1-F, TN 24-0002, row 7, 42 CFR 435.210), at the SSI payment rate in dollars ($994 a month for one person in 2026; DPHHS manual ABD 008), and the same plan page marks the 1902(m) poverty-level group N/A. The 0.75 in policyengine-us matches KFF, which writes the SSI rate as a share of the poverty guideline. Reported upstream as PolicyEngine/policyengine-us#9733 (fix proposed in #9735). Household B in Montana under the 17 percent cut stays an encoding artifact: its SSI countable income is $2 a month above Montana's standard. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A fresh run from a clean clone at bf7dec1, executed on Modal (Linux, 8 cores, 32 GiB) because the Mac it had been running on was out of memory. The container reproduces the local paths and the package versions frozen from the local environments, with policyengine-us 2.18.0 from PyPI (17,551 files checked against the wheel's RECORD, none mismatched). The run took 842 seconds. Every number already in the committed JSON is unchanged. The differences are the round-1 review's text fixes, the Montana encoding note, the added memo fields behind the health explanations, the chart titles and the provenance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The summary footnote said the parameter's own cited source does not support the limit. Montana's own rules set the standard at the SSI payment rate in dollars, and KFF's 0.75 is that rate written as a share of the poverty guideline; the footnote now says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A fresh run from a clean clone at d0c6933 on Modal (615 seconds), with the same container as the bf7dec1 run. Against the committed JSON, the only changed field is the recorded commit; the Markdown changes only in the summary footnote. The artifact tests pass (27). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The generated caveat called the 78 percent payable share "the cut"; the OASI cut is 22 percent. Calculations are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Household D's four-line subtitle ran into the state headings, and the summary chart's title ran past the right edge. Titles now wrap to the figure width, and the header grows with the title and subtitle lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Run on Modal at the exact commit with the frozen package versions. Only the recorded commit, the corrected caveat and the chart bytes change; no numeric JSON field changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 2, 2026
Resolves the only conflicts, in tests/tier_counts.json and tests/README-tiers.md, by recounting the merged suite with pytest --collect-only -m <tier>: unit 5,828, artifact 3,331, integration_psid 1,341, reproduction_legacy 520, oracle_policyengine 220 (total 11,240). No analysis code or output changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Merge record:
|
MaxGhenis
added a commit
that referenced
this pull request
Oct 3, 2026
Tier counts are master's plus this branch's additions (unit +122, oracle +12). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
added a commit
that referenced
this pull request
Oct 3, 2026
Refusal 4 again covers only what the specification registers; the no-local-path check (refusal 7) is settled before any child runs and now catches embedded paths and path-valued keys; repeated probes are compared bit for bit; the child refuses the real frame unless a validated registration record is set; a frame that stored a calculated variable is refused before any outcome is computed; undefined unscored totals carry a reason; the chart marks small cells; a registered run needs its context snapshot. PR #506's identity test now follows the artifact's import closure instead of a recorded module list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
added a commit
that referenced
this pull request
Oct 6, 2026
…lation branch Takes master's version of PR #506's artifact test (#514 narrowed its pin to the generator's own code). Tier counts are master's plus this branch's additions: unit 6,166; artifact 3,536; integration_psid 1,341; reproduction_legacy 520; oracle_policyengine 232 (11,795). The registered commit 3ba0d02 (tag registration-19-sa1) is unchanged; this merge only brings the branch up to date for PR #511. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
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.
ILLUSTRATIVE HOUSEHOLDS, NOT SURVEY DATA. Applied to 2026 law and prices: the cut would not happen in 2026, and this is not a projection.
This PR shows what an across-the-board Social Security cut at trust fund depletion does to a household once federal and state taxes and benefits respond, and who pays the part that other programs offset. It is the second use of the PolicyEngine-US bridge from #496. Five illustrative households are each run in California, Montana and Florida through PolicyEngine-US 2.18.0 for 2026, installed from PyPI and checked against the wheel's RECORD.
The cut: 2026 Trustees Report
Source. The 2026 Annual Report of the Board of Trustees of the Federal Old-Age and Survivors Insurance and Federal Disability Insurance Trust Funds, section II.A (Highlights), intermediate assumptions.
8447f9cae65e561cb84239350e6a037f9b2572d18bf457212130d682c0003551.docs/analysis/pe_us_depletion_cut_20261001/sources/, byte-pinned in.gitattributes.Both quotes are on printed page 5 of the full report.
tr2026.pdf, is not committed; its SHA-256 isfb4e1556a00d925efa03e6355f64f911656a2626eaaceeb16062687008feb683.Households
All five households share #496's common facts: $800 monthly rent, $1,500 in the bank, and housing take-up off.
worker_benefits()unchanged; cross-checked against #496's committed JSONhistory_piagives AIME $3,873 and PIA $1,735.80; statutory COLAs carry it to $2,351.50Headline: the 22% (OASI) cut, 2026 law, annual dollars
Sensitivity: the 17% (OASDI) cut
‡ ENCODING ARTIFACT, NOT STATE POLICY. See household B in Montana below.
Each dollar cell is rounded on its own, so a row can miss its own sum by a dollar.
What the table shows.
Household B in Montana, health coverage counted.
Under the 22 percent cut:
is_ssi_recipient_for_medicaid.py:20-34, checked before any other category inmedicaid_category.py:44-47). Medicaid, valued at average cost, adds $10,799.Under the 17 percent cut, the +3,940 is an encoding artifact, not state policy:
senior_or_disabled/income/limit/individual.yaml:80-81), and B's countable income is $18 under it.Outputs. In
docs/analysis/pe_us_depletion_cut_20261001/:offset_share_summary, the offset share by household and state.Every artifact carries the ILLUSTRATIVE label and the 2026-law note. Each chart's visible title starts "Illustrative households:", and its file metadata carries the label. The design note is
docs/design/pe_us_depletion_cut.md.Who pays the offset
depletion_cut.LEAF_LEVELSassigns each reviewed leaf of the bridge's decomposition to a payer group. Every statute phrase quoted below is checked against the saved Legal Information Institute page and its SHA-256.The script refuses a run in which any unreviewed leaf or any market-income leaf changes.
Invariants
Hypothesis properties in
tests/bridge/test_depletion_cut.py:Before writing, the script also checks every comparison (raising, never asserting):
Artifact test.
tests/bridge/test_pe_us_depletion_cut_artifact.pyrechecks on the committed JSON:It also checks:
src/andscripts/.Oracle-tier tests, run live:
Caveats
Review, run and tests
Review rounds.
The run.
Targeted tests, Python 3.14:
tests/bridge/test_depletion_cut.pyandtests/bridge/test_pe_us_depletion_cut_script.py: 119 passed. In CI the chart smoke test skips: matplotlib is in themodelextra, and CI installs onlydev.tests/bridge/test_pe_us_depletion_cut_artifact.py: 27 passed against the committed outputs.tests/bridge/test_pe_us_depletion_cut_oracle.py: 5 passed live against policyengine-us 2.18.0.tests/estimates/test_birth_evidence_artifact.py) were re-run at 9001436 in the same Modal container: 164 passed, none skipped. Re-run at 363d9e8 on the host, the oracle live against policyengine-us 2.18.0: 164 passed.POST_REVIEW_SOURCE_EXCLUSIONSand inbridge_modules, next to Bridge to PolicyEngine-US: federal and state tax-benefit effect of the minimum benefit on sample households #496's bridge.tests/tier_counts.jsonandtests/README-tiers.md.black -l 79 and ruff pass on all changed Python.
🤖 Generated with Claude Code