Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
22ea523
Read restamped Chronicle facts at their data year before aging
MaxGhenis Sep 25, 2026
251a48e
Classify source_vintage.py as a non-population US runtime module
MaxGhenis Sep 25, 2026
e70831f
Merge remote-tracking branch 'origin/main' into us-w2-source-vintage-…
MaxGhenis Sep 26, 2026
c429ab5
Detect restamps by file digest and refuse the readings that still see…
MaxGhenis Sep 27, 2026
94f055a
Close the round-2 review's test gaps and tighten the shadow guard
MaxGhenis Sep 27, 2026
0f34324
Choose the capital-gains rebase control by concept and period, not fe…
MaxGhenis Sep 27, 2026
6ebfcf7
Refuse any ambiguous capital-gains control; qualify two claims (#1036…
MaxGhenis Sep 27, 2026
2c811ab
Merge remote-tracking branch 'origin/main' into us-cg-returns-control…
MaxGhenis Sep 27, 2026
011a63b
Rebase congressional-district capital gains onto Table 1.4; drop misl…
MaxGhenis Sep 27, 2026
a17db0f
Exclude the CD interest-paid column and fail closed on missing column…
MaxGhenis Oct 12, 2026
648320e
Merge remote-tracking branch 'origin/main' into us-cg-returns-control…
MaxGhenis Oct 12, 2026
9ef7631
Merge branch 'us-cg-returns-control-concept' into us-cd-capital-gains…
MaxGhenis Oct 12, 2026
4e86ec3
Re-pin #1036 on the 51aa40f feed after merging main
MaxGhenis Oct 12, 2026
2785354
Drop congressional-district SALT and PTC facts read from the wrong IR…
MaxGhenis Oct 12, 2026
d1614b2
Address the #1040 review; re-pin on the 51aa40f feed; align the colum…
MaxGhenis Oct 12, 2026
21a638d
Merge branch 'us-cg-returns-control-concept' into us-cd-capital-gains…
MaxGhenis Oct 12, 2026
a4e24cd
Pin the ACS-local totals and full SOI counts after the column exclusion
MaxGhenis Oct 12, 2026
90ad595
Pin the ACS-local SOI counts; record state_cd's capital-gains factors…
MaxGhenis Oct 12, 2026
030ed43
Merge origin/main into us-w2-source-vintage-aging
MaxGhenis Oct 12, 2026
bab55cb
Admit a rebased restamp only as a share of its own package's restampe…
MaxGhenis Oct 12, 2026
9ab6781
Re-pin #1030 on the 51aa40f feed; make the rebase-control test order-…
MaxGhenis Oct 12, 2026
f87844f
Make the source-vintage property reach admitted shares at volume
MaxGhenis Oct 12, 2026
6031a1c
Prove an admitted share ages exactly as its truthfully stamped twin
MaxGhenis Oct 12, 2026
b6adb8f
Let the source-vintage property catch a share total of another data year
MaxGhenis Oct 12, 2026
5f273b4
Draw near-miss share totals directly in the source-vintage property
MaxGhenis Oct 12, 2026
c54d744
Let the pinned CD period check hold under #1040's aged shares
MaxGhenis Oct 12, 2026
2755e75
Note which feed case the control-correction unit test models
MaxGhenis Oct 12, 2026
c04a81e
Build each property share's total explicitly in the well-formed and n…
MaxGhenis Oct 12, 2026
ca040d7
Name the share reading period's stamp key in the restamp docs
MaxGhenis Oct 12, 2026
d3a6253
Run the column exclusion before the district crosswalk; address the #…
MaxGhenis Oct 12, 2026
4bcf9cc
Give the property's near misses a bad reading period too
MaxGhenis Oct 12, 2026
03ceca6
Compare state AGI bands per state and measure in the restamp shadow g…
MaxGhenis Oct 12, 2026
47b590f
Run the column exclusion before the district crosswalk merges source …
MaxGhenis Oct 12, 2026
c7b5ff9
Merge #1224: drop congressional-district SALT and PTC facts read from…
juaristi22 Nov 25, 2026
c134ca0
Merge #1036: choose the capital-gains rebase control by concept and p…
juaristi22 Nov 25, 2026
2c92f2d
Merge #1040: rebase congressional-district capital gains onto Table 1.4
juaristi22 Nov 25, 2026
b4157ef
Merge #1030: read restamped Chronicle facts at their data year before…
juaristi22 Nov 25, 2026
a86a7af
Align the merged PRs with main's #1244 district guards
juaristi22 Nov 25, 2026
79a3c3e
Re-pin the SOI corrections on the 41b2fb2 feed
juaristi22 Nov 25, 2026
00b4f60
Merge main into the SOI corrections branch
juaristi22 Nov 25, 2026
006afbe
List source_vintage among the modules the gate bindings reach
juaristi22 Nov 25, 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/1035-capital-gains-control-concept.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rebase Historic Table 2 capital-gains rows only onto the Table 1.4 Schedule D taxable-net-gain control, the concept `capital_gains_gross` measures. Feed order no longer picks the control: congressional-district and Historic Table 2 rows (Form 1040 line 7, gain or loss) never qualify, a tie between matched records refuses the compile, and a line-7 row with no usable control is dropped instead of shipping as a level. On the pinned feed the 51 `national_state` state return-count targets move from 29,599,604 (2.39x the national target) to 12,289,836 (microcosm#1035).
1 change: 1 addition & 0 deletions changelog.d/1038-cd-capital-gains-shares.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
On the `full` target surface, congressional-district capital-gains rows now enter as shares of the district file's own US row scaled to the Table 1.4 Schedule D control, as Historic Table 2 rows do; the file's US row retires, and every capital-gains share row names its denominator in `soi_share_total_source_record_id`. On the pinned feed the district file's states and districts each move from 29,845,710 returns (2.41x the national target) and $1,522.2B (1.198x) to 12,392,020 and $1,270.9B, and no congressional-district family sums past its national target on `full` (microcosm#1038).
1 change: 1 addition & 0 deletions changelog.d/1038-cd-source-column-exclusions.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The US fiscal-target compiler drops congressional-district SOI facts read from an IRS column their measure id does not mean, through a new reviewed register keyed by (measure id, IRS column), `US_FISCAL_TARGET_SOURCE_COLUMN_EXCLUSIONS`: N18425/A18425 (state and local income taxes, Schedule A line 5a) published as the limited SALT deduction, and N85530/A85530 (additional Medicare tax, Form 8959 line 24) published as the premium tax credit. It replaces the hard-coded congressional-district PTC-amount check, refuses a listed district fact that names no column, and appears in the exclusion receipt and the release coverage report. On the pinned feed the full surface loses the 976 district SALT specs, which summed to 1.98x the national target, and the 488 district PTC-return specs (microcosm#1038).
1 change: 1 addition & 0 deletions changelog.d/us-restamped-source-vintage-aging.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Read restamped Chronicle facts at their data year. The pinned US feed stamps five packages' pinned files as ty2023: 26,893 facts from the TY2020 W-2 table and the TY2022 congressional-district (PolicyEngine/chronicle#117), state and IRA tables. The compile detects a restamp either by its registered file digest or by a `raw_r2_key` year earlier than its period. It refuses the compile unless a reviewed `US_RESTAMPED_SOURCE_PACKAGES` entry matches. If one matches, aging starts from the data year. It also refuses where a restamp would outrank newer truthful data in latest-vintage selection, or would sit in an aging growth index. A rebased restamp is admitted only as a share of a restamped total of the same package, stamp and data year (`soi_share_total_source_record_id`): its share is read at the data year and its aging still starts at the control's period. On the pinned feed (`51aa40f`) the `national_state` W-2 Box 7 tips amount target moves from $28.28B, aged from 2023, to $34.29B, chained from TY2020. The surface keeps 6,102 targets, and its registry moves from `e1f9906bf0e0` to `61f5cac06310`. On the full surface, 13,176 congressional-district-file dollar targets age from TY2022 under the current series policy: the measures on the AGI series move +3.05% and net capital gains -23.9%.
56 changes: 43 additions & 13 deletions docs/us-acs-local-soi-target-surface.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,24 @@ their role is `soi_fiscal_distribution`, so `totals` is unchanged:
| **Admin specs** | **4,380** | **760** | **31,474** |

With the 487 population marginals `state` now calibrates to 4,867 targets.

**Since microcosm#1038** the compiler drops the district file's facts read
from the wrong IRS column (`US_FISCAL_TARGET_SOURCE_COLUMN_EXCLUSIONS` in
`us_runtime/fiscal_targets.py`): the SALT rows read from N18425/A18425
(state and local income taxes) and the premium-tax-credit rows read from
N85530/A85530 (additional Medicare tax). `state` and `state_cd` keep their
counts. `totals` loses the 487 district-file premium-tax-credit return rows,
and `full` loses those and the 974 district-file SALT rows. Both also lose
the Historic Table 2 rows of those measures that the crosswalk had copied to
the nine at-large districts (18 in `totals`, 36 in `full`): the crosswalk
copies a state row to an at-large district only for a measure that the
district file carries. Measured on the `41b2fb2` feed on 25 November 2026:

| Family | `state` | `totals` | `full` |
|---|---:|---:|---:|
| `irs_soi` | 4,227 | 102 | 29,824 |
| **Admin specs** | **4,380** | **255** | **29,977** |

The rest of this section describes the 2026-09-22 measurement.

The 487 population marginals (51 states and 436 congressional districts) are
Expand All @@ -104,8 +122,12 @@ congressional-district file. The feed-gated test

### What `totals` contains, and what it does not

All 607 SOI specs that `totals` keeps are ACA premium tax credit measures (547
returns, 60 amounts), 454 of them at congressional-district geography.
All 607 SOI specs that `totals` kept on 2026-09-22 are ACA premium tax credit
measures (547 returns, 60 amounts), 454 of them at congressional-district
geography. Since microcosm#1038 it keeps 120 (60 returns and 60 amounts,
all Historic Table 2: the 51 states and the 9 at-large district copies), 18
of them at district geography: the 487 district-file return rows read
N85530, additional Medicare tax, not the premium tax credit.
`_soi_target_role` in `us_runtime/fiscal_targets.py` gives named roles only to
country-level all-income-range facts, the all-income-range PTC measures and
the W-2 tip items; every other SOI fact gets `soi_fiscal_distribution`,
Expand Down Expand Up @@ -199,8 +221,11 @@ district rows, are mostly 1.00 to 1.10.
chained SOI and CBO series (about 1.120). The smallest amount factor,
1.03, is that aging ratio alone. Correcting the district file's stamp
(#1030) would remove the aging part only.
- **Two factors reflect known level differences:** taxable interest (2.35 to
2.70, the Table 4.3 rebase) and capital-gains amounts (0.77 to 1.00).
- **Taxable interest reflects a known level difference** (2.35 to 2.70, the
Table 4.3 rebase). Capital-gains factors sit near 1: since microcosm#1038
(#1040) both files' capital-gains rows are shares of the same Table 1.4
control (amounts 0.93 to 1.20, median 0.98; before, 0.77 to 1.00; returns
0.98 to 1.00).
- **The largest single-state factors** were on qualified and ordinary
dividends (Hawaii, 2.68 and 2.17), tax-exempt interest (Utah, 1.43) and
rental income (New York, 0.72), where the two tables disagree about one
Expand Down Expand Up @@ -292,21 +317,23 @@ bridged state row records its sibling and bridge factor.

| Rows | Specs on the pinned feed | Why |
|---|---:|---|
| District-file `limited_state_local_taxes_*`, both geographies | 974 | Column A18425/N18425 is state and local income taxes, not the limited SALT deduction (microcosm#1038) |
| District-file `premium_tax_credit_returns`, both geographies | 487 | Column N85530 is the additional Medicare tax, not the premium tax credit (microcosm#1038) |
| District-file `limited_state_local_taxes_*`, both geographies | 974 | Column A18425/N18425 is state and local income taxes, not the limited SALT deduction (microcosm#1038). Since #1038 the compiler drops them first; `STATE_CD_DEFECTIVE_CD_FILE_MEASURES` stays as a second fence |
| District-file `premium_tax_credit_returns`, both geographies | 487 | Column N85530 is the additional Medicare tax, not the premium tax credit (microcosm#1038); dropped first by the compiler, as above |
| District `tax_filer_individual_count` | 436 | No state parent in either vintage, so it could not nest in a bound state target |
| District rows of states with one district on the 117th plan (AK, DE, DC, MT, ND, SD, VT, WY) | 459 | The SOI file has no sub-state rows there. These rows are the state total copied, or for Montana split by population, so they carry no district information |
| Historic Table 2 rows copied to at-large districts | 360 | The same copies from the other vintage |
| District-file state rows for concepts Historic Table 2 carries | 2,295 | Second vintage of a state concept |
| District rows of the four out-of-band rebase blocks | 34 | The factor band (above) |
| Bridged state rows whose sibling ratio is out of band | 4 | The factor band (above) |

PR #1040 (awaiting a ruling) excludes the same SALT and PTC columns in the
compiler and rescales the district file's capital-gains rows by one national
factor. `state_cd` already takes district capital gains as within-state
shares of Historic Table 2, which a national factor does not move, so their
level changes only when Historic Table 2's own capital-gains rows do
(#1036).
Since microcosm#1038 the compiler excludes the same SALT and PTC columns
(`US_FISCAL_TARGET_SOURCE_COLUMN_EXCLUSIONS`, #1224) and rescales the
district file's capital-gains rows by one national factor per measure
(#1040). `state_cd` takes district capital gains as within-state shares of
Historic Table 2, which a national factor does not move, so their level
changes only when Historic Table 2's own capital-gains rows do (#1036). Its
capital-gains rebase factors move by the reciprocal of that factor, and no
factor-band verdict or contract count changes.

North Carolina's district rows are bound. Before #1043 the packaged
117th→119th crosswalk was built from NC's 2016 plan rather than the 2019 plan
Expand Down Expand Up @@ -558,7 +585,10 @@ record one of the four modes, before any release directory exists.
calibrate stage's peak is the artifact write.
- A checkpoint written before the sparse matrix (measures as dense H5
columns) is refused by `--stage calibrate`; re-run `--stage materialize`.
- To reproduce the 2026-09-22 hours rebuild (#974), pass `--soi-mode totals`.
- To reproduce the 2026-09-22 hours rebuild (#974), pass `--soi-mode totals`
on a compiler from before microcosm#1038; after it, `totals` no longer
carries the 487 district-file premium-tax-credit return rows that run
calibrated to.
To reproduce a build that ran as `full` after `b7922b089`, pass
`--soi-mode full`.
- A checkpoint materialized under an earlier default records its own mode and
Expand Down
Loading
Loading