PolicyEngine / PolicyEngine/microcosm

Year-keyed support exclusions don't fence other vintages: ty2020 W-2 tips facts compiled the excluded tips family

Open
#411 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
0
Forks
4
Avg merge
1d 3h
Merged PRs (30d)
94

Description

Found during the Build K staging run (2026-07-13). Fail-closed catch #2 of 3.

What happened

A regenerated feed carrying irs_soi.ty2020.form_w2_social_security_tips.* rows (from the w2_statistics_2020 package) compiled the irs_soi.form_w2_social_security_tips family — which target_parity_manifest.json correctly holds as a reviewed_exclusion (structural-zero tip_income until the tip-imputation source stage is ported; us-data #220 fence). The parity assertion caught it (the manifest marks family(ies) a reviewed exclusion the registry now compiles).

The root cause: the operative support exclusion is keyed by full record id including vintage (irs_soi.ty2023.form_w2_social_security_tips.box_7_social_security_tips.return_count), so same-family facts at any other year walk straight past it.

Why it matters

The exclusion's intent is family-level ("the model cannot satisfy this target"), but its enforcement is vintage-level. Any feed regeneration or ledger package addition that shifts a fact's year silently re-arms an excluded target; the parity gate catches it today, but with a "promote to compiled" message that is the wrong remedy for this class.

Fix used

Dropped the family's rows from the staging feed.

Proposal

Match US_FISCAL_TARGET_SUPPORT_EXCLUSIONS (and the parity manifest's reviewed exclusions) on us_target_family_id rather than the full record id, or add a family-level exclusion tier — so a fence on "the model can't do tips yet" fences tips at every vintage.

🤖 Generated with Claude Code

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Trace US_FISCAL_TARGET_SUPPORT_EXCLUSIONS and the reviewed exclusions in target_parity_manifest.json, starting from the parity assertion and the staging-feed filtering path. Confirm how us_target_family_id is available for the affected records. Done means exclusions fence the family across vintages and the parity assertion no longer reports the excluded family as newly compiled.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.