Repository navigation
Conversation
…S column (#1038) Chronicle's congressional_district_2022 package reads limited_state_local_taxes_* from N18425/A18425 (state and local income taxes, Schedule A line 5a) and premium_tax_credit_* from N85530/A85530 (additional Medicare tax, Form 8959 line 24); Historic Table 2 reads N18460/A18460 and N85770/A85770. A reviewed register keyed by (measure id, IRS column), US_FISCAL_TARGET_SOURCE_COLUMN_EXCLUSIONS, drops those facts at every geography and vintage, refuses a listed district fact that names no column, and is listed in the exclusion receipt and the release coverage report. It replaces the hard-coded district PTC-amount check. On the pinned 51aa40f feed: 1,464 district specs leave the full surface (976 SALT, which summed to 1.98x the national target, and 488 PTC returns); national_state is byte-identical (e1f9906bf0e0); full f5bd921d6b21 -> f38dbd749180. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
added a commit
that referenced
this pull request
Oct 12, 2026
…n exclusions with #1224 Review (review-1040.md) follow-ups: - Interest paid stays out of US_FISCAL_TARGET_SOURCE_COLUMN_EXCLUSIONS: N19300 (line 8a mortgage interest) is a component of the line 10 deduction, not another concept, and it feeds state_cd's itemized bridge; its share-or-drop decision is a separate chip. The register comment, docs and claims now say 50 of the package's 56 measures have a Historic Table 2 twin. - A share row with no national row of its own family is dropped, as the established rule and test_stale_soi_capital_gains_without_source_total_is_dropped require; the pinned invariant is now two-sided (every compared district family keeps its state and district rows and sits in (0.85, 1] of its national target), so a vanished or partial family fails. - The CD-vs-HT2 tilt (0.8% returns, 2.1% amounts) is stated plainly; the amount agreement is reported on the demeaned comparison with the worst states named. - The Hypothesis property draws Historic Table 2 rows alongside and checks each family divides by, and names, its own US row; comments on CD boundary vintages sharing a family and on a corrected PTC package. The SALT/PTC column exclusions are now #1224 (a bug fix that lands on its own); this branch carries them byte-identical until it merges. Pins on the 51aa40f feed: 31,784 compiled (full 6e1ac91262bc), national_state 6,102 at 84504a7afd57. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Measured with state_admin_specs on the pinned 51aa40f feed: --soi-mode totals keeps 120 SOI specs (the Historic Table 2 premium-tax-credit rows only) and full 29,860, as docs/us-acs-local-soi-target-surface.md states. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
added a commit
that referenced
this pull request
Oct 12, 2026
… under the share rebase The ACS-local contract test pins totals at 120 SOI specs and full at 29,860 (identical to #1224). With the district file's capital-gains rows as shares of the Table 1.4 control, state_cd's capital-gains amount rebase factors move from 0.77-1.00 to 0.93-1.20 (median 0.98); its counts and factor-band verdicts are unchanged (measured on the pinned 51aa40f feed). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 12, 2026
…districts (#1224 review) The congressional-district vintage crosswalk sums several source districts into one current district under the first contributor's layout, so a check after translation could see an excluded contribution under a corrected column, or a missing column hidden behind a present one. The source-column exclusion and the missing-column refusal now run on each fact as the feed carries it, before translation, in the compile and in the receipt, which therefore lists source ids (4 x 480 on the pinned feed). Tests cover mixed-column merges in both orders and every missing-column order (the old post-crosswalk check fails four of the six), and a corrected A85770 PTC amount, which must compile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
added a commit
that referenced
this pull request
Oct 12, 2026
…1040 re-review nits From the #1224 review (P2/P3), carried here byte-identical: the congressional-district crosswalk sums source districts under the first contributor's layout, so US_FISCAL_TARGET_SOURCE_COLUMN_EXCLUSIONS and the missing-column refusal now run on each source fact before translation, in the compile and the receipt (which therefore lists 4 x 480 source ids); tests cover mixed-column merges in both orders, every missing-column order, and a corrected A85770 PTC amount. From the #1040 re-review (APPROVE WITH NITS): the doc says the return counts agree among the tightest pairs (ninth of 45 by median gap) and that the CD-over-HT2 tilt holds in aggregate (Montana's amount is 0.73x); the congressional-district parity-manifest note names the capital-gains shares, the retired US row and the column exclusions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Part of #1038. Split out of #1040 so this bug fix can land on its own; #1040 keeps the congressional-district capital-gains share change, which needs Max's ruling.
Summary
Chronicle's
congressional_district_2022package (22incd.csv) reads two measure pairs from IRS columns that mean something else. The IRS documentation guide (22incddocguide.docx) is the reference.limited_state_local_taxes_returns/_amountsalt_deductionmeasurespremium_tax_credit_returns/_amountassigned_aca_ptcmeasuresTY2022 US values in the file itself:
On the default
fulltarget surface:Of the package's 56 measures, 50 have a twin in a Historic Table 2 package, and these four are the only ones that read a different column from their twin.
What changes
US_FISCAL_TARGET_SOURCE_COLUMN_EXCLUSIONS(fiscal_targets.py): a reviewed register keyed by (measure id,layout.source_column_id). It drops every SOI fact read from a listed column, at every geography and vintage, before selection.MissingSoiSourceColumnError), so a feed schema change cannot quietly lift the exclusion.us_fiscal_target_exclusion_receiptgains asource_column_concept_exclusionrule, which the release'sus_source_coverage.jsoncarries. The coverage report also lists the register (fiscal_target_source_column_exclusions)._is_soi_cd_premium_tax_credit_amount_conflict, now covered by the register with the right reason.state_cd. ItsSTATE_CD_DEFECTIVE_CD_FILE_MEASURESstays as a second fence; the comment now says the compiler drops these first.docs/us-fact-to-target.md: when to use the column register, and when a component column needs a share-or-drop decision instead.docs/us-acs-local-soi-target-surface.md: the ACS-local mode counts.Not in the register: interest paid.
interest_paid_deduction_*in the same package reads N19300/A19300, line 8a mortgage interest. That is a component of the line-10 deduction the measure id means, not another concept, so it needs a share-or-drop decision of its own; a chip is filed. It also feedsstate_cd's itemized bridge.Effect on the pinned feed
Release compile on
51aa40f: target period 2024, aging, packaged CD crosswalk, Medicaid substitution.main(123927679)fullf5bd921d6b21)f38dbd749180)national_statee1f9906bf0e0)e1f9906bf0e0), byte-identicalfullfull:ACS local release:
stateandstate_cdare unchanged. (state_cdalready dropped these rows itself.)--soi-mode totalsgoes from 607 to 120 SOI specs, losing the 487 district PTC-return rows.--soi-mode fullgoes from 31,321 to 29,860.Invariants
national_stateis byte-identical (e1f9906bf0e0).Tests
These runs were local, on the pinned
51aa40ffeed, run sequentially with peak RSS 3.3 GB. CI has no feed and skips the pinned-feed tests.engine_free/us/test_us_fiscal_targets.py: 172 passed, none skipped. That includes three pinned-feed tests: the exclusion receipt (4 × 488 ids), the fences (31,786 /f38dbd749180/e1f9906bf0e0) and the new "no district target reads an excluded column".state_cdsparse surface (its feed-gated contract test included), source coverage, release target parity, the Chronicle feed and the fiscal refresh builder, run withMICROCOSM_US_CHRONICLE_FACTSset: 495 passed, none skipped.totalsat 120 SOI specs (Historic Table 2 PTC only) andfullat 29,860. These were measured withstate_admin_specson the pinned feed.tools/ci_test_plan.py verifypasses.ruff checkandruff format --checkare clean on the touched files.New tests:
axiom: n/a: microsim target compilation, no policy rule changes.
🤖 Generated with Claude Code