Repository navigation
Stamp the W-2 item facts with Tax Year 2020; the 2024 tips target moves from $28.28B to $34.29B - #1192
Open
MaxGhenis wants to merge 1 commit into
Open
Stamp the W-2 item facts with Tax Year 2020; the 2024 tips target moves from $28.28B to $34.29B#1192MaxGhenis wants to merge 1 commit into
MaxGhenis wants to merge 1 commit into
Conversation
…stamps them The pinned US Chronicle feed carried five cells of IRS SOI Table 4.B for Tax Year 2020 (20in04w2all.xlsx) with period 2023 and vintage tax_year_2023: the Box 7 tips amount, return count and taxpayer count, the Box 12 D 401(k) elective deferrals and the Box 12 AA designated Roth contributions. At Chronicle c5e5bf8 the soi-w2-statistics-2020 package pins artifact_year 2020 but rendered its labels from --year, and the scope built it at --year 2023. Tax Year 2020 is the latest Table 4.B IRS has published (checked 2026-10-10), so no TY2023 table exists. Latest-vintage selection took the ty2023 tips amount, so the 2024 target aged one year on the CBO wages ratio: $28,280,884,269. Read at its tax year it chains through SOI Table 1.4 wages from 2020: $34,287,530,779 (+21.2%). - Re-pin the feed to Chronicle f98acf4 (c5e5bf8 plus the W-2 package file as chronicle#292 left it, tag microcosm-us-feed-w2-ty2020-v1). Scope 586 to 585 pairs; feed 39,155 rows, a81cbcc5. Against the old feed 39,153 rows are byte-identical, the five ty2023 ids are gone and the 401(k) and Roth amounts return under their ty2020 ids. The builder's output is byte-identical to an independent splice of the old feed. - Regenerate the target-parity resources: 32 compiled families, 52 reviewed exclusions, 81 feed families, as before. - Key the #451 tips return-count exclusion to the ty2020 id. It still holds at every vintage (decision d179). - Add _check_w2_item_fact_tax_years to the compile and the exclusion receipt: a W-2 item fact must name exactly one tax year in its source table title, and that year must be its period and its tax_year vintage. - Restate the feed digest in tools/route_a/route_a.sh, with a test that fails if the driver falls behind the pin. Compiled as the release does, the registry keeps 32,842 targets and national_state 5,694 (d315c75804ef to 61a081ae55bb). The tips amount is the only target that changes; the other 32,841 keep name, value and metadata. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
force-pushed
the
us-w2-items-tax-year-2020
branch
from
October 10, 2026 20:40
301a977 to
51a3f99
Compare
This branch has not been 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.
Summary
The pinned US Chronicle feed stamped five cells of IRS SOI Table 4.B for Tax Year 2020 as ty2023. Target aging starts from a fact's period, so the 2024 W-2 Box 7 tips target aged one year where it needed four.
This PR re-pins the feed so those facts carry the year IRS published them for. The tips target moves from $28,280,884,269 to $34,287,530,779 (+21.2%). No other target changes.
Companion: PolicyEngine/chronicle#333 (tests at the source). The Chronicle package itself was already fixed on main by PolicyEngine/chronicle#292.
The finding, confirmed at the source
In the pinned feed (
consumer_facts_us_c5e5bf8.jsonl, sha256b8543739…f4839801) these facts hadperiod.value2023 andsource.vintagetax_year_2023, whilesource.source_fileis20in04w2all.xlsxandsource.source_tableis "Table 4.B. Summary of Items for Taxpayers with Form W-2, by Return and Earner Type, Tax Year 2020":irs_soi.ty2023.form_w2_social_security_tips…amountirs_soi.ty2023.form_w2_social_security_tips…return_countirs_soi.ty2023.form_w2_social_security_tips…taxpayer_countirs_soi.ty2023.form_w2_401k_elective_deferrals…amountirs_soi.ty2023.form_w2_designated_roth_401k_contributions…amountChecked on 10 October 2026:
21in04w2all.xlsxto24in04w2all.xlsxreturn 404. No TY2021, TY2022 or TY2023 Table 4.B exists. IRS's prior-releases page carries tax years 2008 to 2018 in one workbook (18inallw2.xls), so 2020 is the latest year published.20in04w2all.xlsxhas the sha256 Chronicle pins (1178d776…cfc442f). Cell A1 of sheet "Table 4.B" is the title above. Rows 13, 22 and 41 hold the five values (money amounts in thousands).So all five are Tax Year 2020 values. The three tips rows repeated the feed's correctly stamped
irs_soi.ty2020tips facts.Why the feed stamped them 2023
At Chronicle
c5e5bf8,soi-w2-statistics-2020setsartifact_year: 2020, so every build reads that one workbook, but it rendered period, record ids, vintage and legal vintage from--year.us/chronicle_feed_scope.jsonbuilt it at--year 2023for three record sets.Latest-vintage selection then took the ty2023 tips amount over its TY2020 twin. The ty2023 tips amount and return count arrived with the September re-pin (#955, merged 22 September). The July feed (
b3c08356…) already carried the ty2023 401(k), Roth and tips taxpayer-count rows, none of which compiles to a target.What changes
Feed pin
f98acf4(branchfeed/us-c5e5bf8-w2-2020, tagmicrocosm-us-feed-w2-ty2020-v1):c5e5bf8plus only the W-2 package file as chronicle#292 left it on main.consumer_facts_us_f98acf4.jsonl, 39,155 rows, sha256a81cbcc5…23df04c.tools/build_us_chronicle_feed.pybuilt it from the new scope (10 runs, 61 packages). An independent splice of the old feed with one run of the W-2 package gives the same bytes.~/PolicyEngine/_buildh-runtime/inputs/consumer_facts_us_f98acf4.jsonl, beside the earlier pins.tools/route_a/route_a.shandroute_a.env.examplerestate the new digest and file name. The driver refuses a build commit whose pin is not itsFEED_SHA.Why not Chronicle main. At main (
3dce46a6) seven more pairs of the pinned scope are no longer declared: the congressional-district file, the two IRA tables and the fourstate_2022US rows. Moving those changes the year every district dollar target ages from. That is #1030's change and needs its own decisions.Exclusion register (
us_runtime/fiscal_targets.py)US_FISCAL_TARGET_SUPPORT_EXCLUSIONSandUS_FISCAL_TARGET_ALL_VINTAGE_SUPPORT_EXCLUSIONS.A compile-time check
_check_w2_item_fact_tax_yearsruns at the start ofcompile_us_fiscal_target_registryandus_fiscal_target_exclusion_receipt.irs_soi.form_w2_itemlayout) it requires:tax_year_<year>vintage.Effect on targets
Compiled as the release does (target period 2024, district crosswalk, aging on, Medicaid substitutions). "Before" is
origin/main(7639ef8b0) compiling the old feed; "after" is this branch compiling the new one.national_statetargetsnational_stateregistryd315c75804ef61a081ae55bbirs_soi.ty2023.form_w2_social_security_tips.box_7_social_security_tips.amountirs_soi.ty2020.form_w2_social_security_tips.box_7_social_security_tips.amountinput_side), so they move no target. SOI and CBO wage targets bind grossemployment_income; the engine taxesirs_employment_income#1191 names the 401(k) amount as a candidate anchor: it is a Tax Year 2020 level.populace-us-2024-0fb05b6-4b57d15a287c-20260930T150401Zrecorded the $28.28B target (tests/fixtures/us_route_a_target_loss_weights.json). This PR builds no release.This agrees with #1030, which computed $34,287,530,779 for the same fact read at its data year.
Decisions checked
f98acf4has no Assign SNAP take-up from reported receipt and the FNS participation rate #294.Invariants
tax_yearvintage (property test over generated feeds, with the verdict restated independently in the test).Tests
Run locally at this branch. CI has no feed and skips the pinned-feed tests; the compile-time check and the synthetic tests are what CI enforces.
test_us_w2_item_tax_year.py(new): 30 tests. 28 run in CI; 2 need the feed.test_us_fiscal_targets.py,test_us_w2_item_tax_year.py,test_us_chronicle_feed.pyandtest_release_target_parity.py, with the new feed in place: 262 passed, none skipped.test_us_acs_local_release_tool.py,test_us_acs_local_sparse_cd.py,test_us_release_gate_preflight.pyandtest_us_fiscal_refresh_builder.pypass on the new feed withMICROCOSM_US_CHRONICLE_FACTSset, so the ACS-localstateandstate_cdsurface counts do not move.test_us_chronicle_feed.pygainstest_route_a_driver_restates_the_pin.python3 tools/ci_test_plan.py verify: ok.ruff checkandruff format --checkon the touched files: clean.Not changed here
state_2022, the two IRA tables): Read restamped Chronicle facts at their data year before aging #1030.legal_vintagelabels that chronicle#292 also corrected.51aa40f, for the TY2023 state AGI bands). Whichever lands second rebuilds on a base with both package changes;relabel_scope.pyhere is idempotent.axiom: n/a: calibration-target data correction; no policy rule changes.
🤖 Generated with Claude Code