Conversation
The pinned US Chronicle feed (c5e5bf8) stamps five packages' pinned files as ty2023: the TY2020 W-2 table and the TY2022 congressional-district, state and IRA tables, 26,893 facts (PolicyEngine/chronicle#117). Target aging started from the stamp, so the route-A W-2 Box 7 tips amount aged 2023->2024 on the direct CBO ratio ($28.28B) instead of 2020->2024 on the chained SOI wages bridge ($34.29B), and the full-surface congressional-district dollar targets aged one link short. source_vintage detects an observation fact whose raw_r2_key artifact year precedes its period, requires a reviewed US_RESTAMPED_SOURCE_PACKAGES entry for it (the compile refuses otherwise), and moves source_period, and uprating_to_period for specs rebased onto a restamped control, to the data year before aging. Values, names and vintage selection are unchanged. On the pinned feed national_state keeps 5,695 targets (registry 386fac439e77 -> a3547c5322da) and only the tips amount moves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…aging # Conflicts: # packages/microcosm-build/tests/test_us_fiscal_targets.py
… the stamp Round-1 review of #1030 (correctness and claims lenses): - Detect a registered restamp by its file sha256 as well as by the raw_r2_key year, so a storage-key layout change cannot hide it, and add a reviewed exemption register for truthful later observations (a multi-year release keyed by its publication year). - Refuse a restamp that would outrank a truthful fact dated after its data year in latest-vintage selection, and one that sits in an aging growth index; both still read the stamp. - Fail closed where the correction cannot vouch for a spec: a comparable period that differs from the stamp, a multi-fact spec with a restamped member. - Re-pin after merging #1029: national_state keeps 5,694 targets and moves from d315c75804ef to 884bc45ef335; only the tips amount value moves. - Correct the docs and changelog: #117 covers the CD file only, most restamps predate the 2026-09-18 re-pin, and the full-surface moves are relative to data-year aging under the current series policy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Pin that the CD-crosswalk-translated specs carry the correction (23,980 translated, 11,772 of them chained dollar targets; 26,791 direct and 60 rebased corrections on the pinned feed). - Test the compile's aging-index check (it runs only when aging), the CBO projection branch, an exemption's period bound, and the shadow guard's stamp-year bound. - The shadow guard now reads each candidate's own period key and considers only candidates eligible at the target period, so it cannot refuse a compile over facts selection would drop anyway. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Sep 27, 2026
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 (
c5e5bf8) stamps five source packages' pinned files as ty2023: 26,893 facts from the TY2020 W-2 table and the TY2022 congressional-district, state and IRA tables. Target aging starts from the stamp.On the route-A
national_statesurface this puts the W-2 Box 7 tips amount target at $28.28B. Aged from its data year, the same fact gives $34.29B; the stamp makes it 17.5% lower.This PR reads restamped facts at their data year for aging and the period contract. The source-side fix is PolicyEngine/chronicle#292, and this PR stays correct after it lands and the feed is re-pinned.
The restamp
Mechanism (Chronicle
source_package.pyatc5e5bf8):artifact_yearpins which manifest file a package reads.{year}label (period, record ids, vintage, legal vintage) renders from--year.us/chronicle_feed_scope.jsonbuilds these five packages with--year 2023.soi-congressional-district-202222incd.csvsoi-w2-statistics-202020in04w2all.xlsxsoi-state-202222in54us.xlsxsoi-ira-roth-contributions-202222in06ira.xlsxsoi-ira-traditional-contributions-202222in05ira.xlsxEvidence for the data years:
amount,return_countandtaxpayer_countequal their ty2020 twins cell for cell, with the same sha256 and values.Chronicle#117 reported the CD case in July; the other four came out of this investigation. As of 2026-09-25, IRS has published no W-2 table newer than TY2020 and no CD file newer than TY2022.
When it started. The previous pin already carried 26,891 of these facts. The 2026-09-18 re-pin added the ty2023 tips amount and return count. Before that, the only tips amount was the ty2020 row, which the code would have aged on the chained SOI wages bridge. The previous pin cannot compile on main, so that is read from the code, not observed. The restamped row won latest-vintage selection and aged on the direct 2023 CBO ratio instead.
Which layer owns it
Chronicle. Chronicle "records every fact's publisher reference period" (Chronicle
AGENTS.md). PolicyEngine/chronicle#292:--yearchanges labels but not what is read;Microcosm. It is pinned to
c5e5bf8until a re-pin, and a re-pin on #292 needs two decisions first (see "Not changed here"). This PR is the consumer-side correction for the feed microcosm uses today.What changes
us_runtime/source_vintage.py(new).Detection (
detect_restamped_facts). Either rule flags a fact:source.source_sha256is a registered file and its period is after that file's data year;source.raw_r2_keyyear is earlier than its period.Publisher projections are exempt.
US_LATER_PERIOD_OBSERVATION_EXEMPTIONS(empty) admits truthful later observations. An example would be a multi-year release keyed by its publication year: BEA's 2024-keyedSAINC.ziphas a 2025 column.Register (
US_RESTAMPED_SOURCE_PACKAGES). One entry per package: data year, stamped periods, file, sha256 and evidence.source_vintage_correctionsrefuses any detected restamp without a matching entry (UnreviewedRestampError).Guards on the readings that still see the stamp:
RestampShadowsNewerVintageError).RestampedAgingIndexError).Correction (
apply_source_vintage_corrections). For specs backed by a restamped fact,source_periodbecomes the data year. For specs rebased onto a restamped control, so doesuprating_to_period. The stamp is kept insource_vintage_stamped_period. Values are never changed.Compile.
compile_us_fiscal_target_registrycomputes the corrections once, checks the aging indexes, passes the corrections to selection, and applies them after the target profile, before aging and the period contract.Docs. Comments in
fiscal_targets.pyandtarget_aging.py; a new "Restamped packages" section indocs/us-chronicle-feed-repin.md; a changelog fragment.Effect on the pinned feed
The release compile:
target_period=2024,age_targets=True, the packaged CD crosswalk, then Medicaid substitution. Before and after, on main as of #1029:national_statetargetsnational_stateregistryd315c75804ef884bc45ef335national_state)national_state: one value moves (the tips amount, +21.2%), and no spec enters or leaves the surface. 53 specs change metadata only:state_2022counts. Counts do not age.Full surface: 13,176 CD-file dollar targets age from TY2022. The moves are relative to aging from the data year under the current series policy:
13,614 count specs, and 9 CD-classified rebased counts, change metadata only.
Differential checks:
_projection_factorat the true year (max relative difference 4e-15). That replay agreed with a counterfactual compile of a re-stamped feed to 1e-9.Not changed here
national_statetargets would fall 58.5%. Today those 51 state counts sum to 2.39× the national Table 1.4 target of the same compiled variable. This needs a concept ruling before any re-pin on Add county-crosswalked FNS SNAP data as a second congressional-district benchmark #292; it is split into its own task.SOI_CONGRESSIONAL_DISTRICT_RECORD_SET_IDnames thety2023record set, so it must change at that re-pin.bea_regional.state_wages_salariesis a deferred parity family; activating it before Add county-crosswalked FNS SNAP data as a second congressional-district benchmark #292 would calibrate 2024 wages as cy2023.Invariants
Tests
Run locally on the pinned feed at
c429ab59cand again at94f055a6dfor the round-3 tests. CI has no feed and skips the pinned-feed tests.test_us_fiscal_targets.py,test_us_source_vintage.pyandtest_us_spine_blindness.pyall pass (pytest exit 0), pinned-feed tests included. Peak RSS 3.0 GB.test_release_target_parity.py,test_us_chronicle_feed.py,test_us_congressional_district_vintage.py,test_us_congressional_district_geography.py,test_us_release_gate_preflight.py(withMICROCOSM_US_CHRONICLE_FACTSset) andtest_us_ssi_take_up.py, and all passed. Round 2 touches none of their paths except through the compile, which the pinned replay covers.national_statestays at 5,694 targets at884bc45ef335.ruff checkandruff format: clean on the touched files.Review
Round 1 (independent Opus 5.5 agents; correctness and claims lenses): no P0 or P1. Round 2 addresses their P2 findings:
Round 2 (independent Opus 5.5 on a Subfleet lane; tests and mutation, plus correctness of the round-2 guards): APPROVE WITH NITS, with no P0 or P1. The lane was read-only, so its 30-mutant table is a static trace, not an execution. It predicted six mutants survive CI.
94f055a6dcloses them:The pinned-feed tests pass on the round-2 code, so there are no false refusals.
🤖 Generated with Claude Code