Skip to content

Taxable-interest rebase: per-row control choice and per-pair bridge retirement can disagree #1236

Open

Description

@MaxGhenis

Follow-up from the #1229 review (executed repros: ~/PolicyEngine/_reviews/cd-taxable-interest-20261012/inhouse/rebase-logic/, scenarios s5, s6b/s6c, s6f, s9).

_rebase_stale_soi_taxable_interest_distributions picks the control for each row. Bridge retirement is decided per (measure, status). The two rules can disagree, so a rebased row can name a control whose national row was retired, or a share family can keep a second national target. Neither corner occurs on the pinned 51aa40f feed: it has no Table 1.4 interest fact, and its district file is stamped no later than Table 4.3.

Corner 1: retired bridge used as a control

The setup:

  • An exact all-returns control (Table 1.4) exists at an older period than a row.
  • The row skips it for the eligible bridged Table 4.3 control. test_stale_soi_taxable_interest_skips_ineligible_control_for_eligible_bridge, from sol finding 5, pins this.
  • retired_bridge_owners meanwhile retires the Table 4.3 national row, because an all-returns control exists at some period.

The row then lands on a level that no compiled target carries. Its uprating_index_source_record_id names a spec that is not in the registry.

Cases:

  • On main: Historic Table 2 rows do this when Table 1.4 interest is present only at an older year than HT2 (s6f).
  • On Rebase congressional-district taxable interest onto Table 4.3 as shares of the district file's US row #1229: with Table 1.4 at TY2022, Table 4.3 at TY2023, HT2 at TY2022 and the district file stamped ty2023, the district rows land on the retired Table 4.3 level. Its states sum to 2.17x the only national target, Table 1.4 aged (s6b/s6c). On main the same feed gives 0.87x plus the district US row as a second national target.

Corner 2: stamp after every control

If a share family's period stamp is later than every control, control is None keeps its rows as levels and its national all-AGI row as a second national target. One case is the next district file under the same +1 stamp error as 22incd.csv (Chronicle#117).

This happens on main and on #1229 alike. The stamp correction (#1030) prevents it for files it restamps.

Design question

What should own the national concept when an exact control and a bridged control are live at different periods?

  • Option A: one owner per (measure, status) for every share family, chosen once (for example, the latest control in any universe), with each row's period gate applied to that owner.
  • Option B: retire a bridge surrogate only when no share row rebases onto it.

Either reverses part of #518's lattice: "exact universe outranks the bridge at any period" against "an ineligible exact control must not shadow an eligible bridge". So it needs an adjudication of the #489 control lattice, not a drive-by.

Acceptance:

Activity

  1. MaxGhenis commented on Oct 13, 2026

    @MaxGhenis
    ContributorAuthor

    Two notes from the #1250 review (~/PolicyEngine/_reviews/cd-soi-national-controls-20261012/review-opus.md, findings F5 and F6). #1250 rebases the congressional-district rows of the 11 Table 1.x-controlled columns from #1247 as shares, using the same pattern as #1229 and #1040.

    Corner 2 also covers #1250's families, and #1030 does not change the rebase's period test. apply_source_vintage_corrections runs after the rebase passes; #1030's own comment says "Selection and the rebase controls above still saw the stamp". A new restamped package (for example 23incd.csv stamped ty2024) first refuses until it has a US_RESTAMPED_SOURCE_PACKAGES entry. Once registered, every district pass still compares the stamp with the control, so the file's rows keep their levels and its US row stays a second national target. A fix belongs in the rebase eligibility, for example reading a registered restamp's data year there. One fix should cover all three district passes.

    No denominator means a silent drop in all three district passes. With an eligible control but no nonzero district US row, #1229, #1040 and #1250 each drop the family's rows with no record. 22incd.csv always publishes a US row, so its absence after a re-pin would be a packaging defect, and about 487 targets per measure would leave full. The only check that notices is a pinned count test, and pinned tests skip in CI. Refusing the compile, or recording the drops in the exclusion receipt, would make this visible.

    🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions