Skip to content

Mark nine source conflicts now in the shared register - #10441

Merged
MaxGhenis merged 2 commits into
mainfrom
source-conflict-register-markers
Oct 24, 2026
Merged

MaxGhenis merged 2 commits into
mainfrom
source-conflict-register-markers

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

This vendors the register PolicyEngine-US shares with Axiom (known-source-conflicts.yaml) at rulespec-us 3fefe74b, the merge of TheAxiomFoundation/rulespec-us#1871. Nine conflicts in the register at that commit name a PolicyEngine-US file as the implementation, and this marks each of them in that file. It also takes the newly registered conflicts out of the backlog. It changes no formula, parameter value or policy-test expectation: in the model, every change is a comment line. The guard's own KNOWN_UNMARKED baseline also loses two entries, as explained below.

What changes

  • The vendored register moves from rulespec-us 5796861e to 3fefe74b, the merge commit of Register seven PolicyEngine-US rulings and Colorado's OAP implementation TheAxiomFoundation/rulespec-us#1871. scripts/update_source_conflicts.py wrote both source_conflicts/known-source-conflicts.yaml and pin.yaml. The copy is byte-identical to the file at 3fefe74b. The register goes from 8 entries to 20, and all 12 new ones are US entries.

  • Nine markers. Nine of the new entries list a PolicyEngine-US file as the implementation. Each of those files now has # Source conflict <id> on its own comment line, just above the comment block or statement that makes the choice:

    Entry File Above
    us-co:oap-interest-and-dividends parameters/gov/states/co/ssa/oap/income/sources/unearned.yaml the comment explaining why interest and dividends are not in the list
    us-md:poverty-credit-earned-income-losses variables/gov/states/md/tax/income/credits/poverty_line/md_poverty_line_credit_potential.py the § 32(c)(2) and Worksheet 18B comment before eitc_earned_income
    us:niit-magi-trust-code-h-adjustment variables/gov/irs/tax/federal_income/niit_magi.py estate_magi_adjustment = ...
    us:qbid-net-capital-gain-investment-election variables/gov/irs/income/taxable_income/deductions/qualified_business_income_deduction/section_199a_net_capital_gain.py the Treas. Reg. 1.199A-1(b)(3) comment
    us:dependent-care-exclusion-separate-filer-income variables/gov/irs/credits/cdcc/min_head_spouse_earned.py return where(is_joint, joint_earnings, head_earnings)
    us-hi:care-credit-claimable-unclaimed-filer variables/gov/states/hi/tax/income/credits/cdcc/hi_cdcc_eligible.py the HRS § 235-55.6(a)(1) comment
    us-ny:dependent-standard-deduction-filing-status variables/gov/states/ny/tax/income/taxable_income/deductions/ny_standard_deduction.py return where(single & dependent_elsewhere, ...)
    us-wv:senior-disability-modification-income-base variables/gov/states/wv/tax/income/subtractions/senior_citizen_disability/wv_senior_citizen_disability_deduction_person.py the Box (c) comment before the excluded amounts
    us-mn:msa-guardian-fee-cap variables/gov/states/mn/dhs/msa/payment/mn_msa_guardian_fee.py the Minn. Stat. § 256D.44 subd. 5(d) comment

    Eight of the nine files are unchanged since the PolicyEngine-US commit the register pins them to: 7bb70aa, or 79249f0 for the Maryland file. The ninth, mn_msa_guardian_fee.py, changed after its pin when Exclude county agency staff from Minnesota MSA guardian fees #10315 merged. Exclude county agency staff from Minnesota MSA guardian fees #10315 added a county-staff exclusion and a note on Minnesota's stated practice. It kept the statute's 5% cap with a $100 maximum, which is the register's reading. The marker sits above that statute comment block, and Exclude county agency staff from Minnesota MSA guardian fees #10315's note follows it.

  • No marker for the three claim-of-right entries (us-ar:claim-of-right-deduction-floor, us-hi:claim-of-right-deduction-floor, us-oh:claim-of-right-federal-claim-condition). The register lists their PolicyEngine-US code only as proposed, not as an implementation, so the guard would reject a marker for them.

  • candidates.yaml: all 12 new entries were backlog candidates. The guard rejects a candidate whose id is in the register, so they come out here, as the file's header asks. That leaves 218 of 230. A YAML parse confirms that only those 12 left and nothing else changed.

  • KNOWN_UNMARKED: a file with a valid marker is exempt from the ratchet, so two entries come out. section_199a_net_capital_gain.py had a count of 2. mn_msa_guardian_fee.py had a count of 1, which Exclude county agency staff from Minnesota MSA guardian fees #10315 added for its practice note. None of the other seven files was listed.

Overlap with #10315, #10350, #10351 and #10352

#10315 merged after this PR opened. Its changes conflicted only in candidates.yaml, where it pointed us-mn:msa-guardian-fee-cap at its code. Main is merged in (c3e7f9b). The registered candidate stays deleted, and candidates.yaml equals main's file minus exactly the twelve registered candidates.

#10350, #10351 and #10352 refresh candidates.yaml to point at code on main.

Invariants

These hold on every run of policyengine_us/tests/code_health/test_source_conflicts.py:

  • the vendored register matches its pin;
  • every marker is well-formed and names an entry that lists its file;
  • every implementation with cites_entry: true carries its marker;
  • the conflict-comment ratchet does not grow;
  • the backlog shares no id with the register.

This PR also meets the next step's condition. The register still records cites_entry: false for these nine, because its pinned commit predates the markers. Even so, every PolicyEngine-US implementation in the vendored register already carries its marker. So once rulespec-us repins them to this PR's merge with cites_entry: true, the "carry their marker" check passes unchanged.

Verification

  • test_source_conflicts.py: 103 passed, run without the package conftest, since the guard reads files only. It found exactly 9 markers and no malformed ones. A direct check confirmed that each of the nine (entry, file) pairs in the vendored register has its marker.
  • ruff format --check and ruff check (0.15.5, the locked version) pass on the nine changed Python files.
  • The vendored copy is byte-identical to known-source-conflicts.yaml at rulespec-us 3fefe74b.

After this merges

  • rulespec-us: a register PR repins these nine implementations to this PR's merge commit, with cites_entry: true, so verify checks the markers.
  • The next register bump: once that register PR lands, a PolicyEngine-US PR vendors it. That makes the guard enforce these nine markers through cites_entry: true. The bump also brings in rulespec-us#1907 (merged as 31f5643c), which adds two OASDI entries and updates another, none naming PolicyEngine-US code, so it needs no marker.

axiom: n/a: comments, the vendored register and the conflict backlog only; no policy change.

🤖 Generated with Claude Code

Vendor known-source-conflicts.yaml at rulespec-us 3fefe74b (the merge of
rulespec-us#1871), which registers twelve new conflicts. Nine of them name a
PolicyEngine-US file as the implementation, so each of those files now carries
`# Source conflict <id>` on its own comment line just above the line that
makes the choice. The other three, the claim-of-right entries, name PolicyEngine-US
code only as proposed, so they get no marker yet.

All twelve were backlog candidates, so they leave candidates.yaml, as the
guard requires. section_199a_net_capital_gain.py leaves KNOWN_UNMARKED,
since a marked file is exempt from the ratchet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis marked this pull request as ready for review October 24, 2026 14:28
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Hand-off to the US hub, at head 0116ad2.

#10315 pointed the us-mn:msa-guardian-fee-cap candidate at its code and
baselined mn_msa_guardian_fee.py in KNOWN_UNMARKED. The candidate is
registered now, so its block stays deleted, and the file's marker exempts it
from the ratchet, so its baseline entry comes out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Updated hand-off to the US hub, at head c3e7f9b. This replaces the hand-off above, which named 0116ad2.

  • What changed: c3e7f9b merges main (c0b360d) into 0116ad2 to resolve the conflict Exclude county agency staff from Minnesota MSA guardian fees #10315 created.

    • The registered us-mn:msa-guardian-fee-cap candidate stays deleted.
    • mn_msa_guardian_fee.py leaves KNOWN_UNMARKED, because its marker exempts it.
    • Against main, each of the nine marked files differs by exactly its marker line.
  • Review: an independent review of the merge approved it. It confirmed:

    • the MN marker still sits above the 5% cap with a $100 maximum;
    • candidates.yaml equals main's file minus exactly the twelve registered candidates;
    • exactly two KNOWN_UNMARKED lines are removed.

    Its four nits were wording, and they are fixed: three in the description, plus this comment. The review of 0116ad2 had already approved the rest, once its four description fixes were made.

  • CI: all 33 checks pass at c3e7f9b (run 40102813335). The PR is mergeable. Merging is blocked only by the required approving review.

  • Locally: the guard passed (103 tests, 9 markers, none malformed), and ruff 0.15.5 format --check and check passed.

  • Merge order: Point the federal and AK-HI source-conflict candidates at their code on main #10350 and Point the NM-WY source-conflict candidates at their code on main #10352 edit seven of the twelve deleted candidates. Whichever of them merges after this PR deletes those blocks.

  • Follow-ups owed after merge:

    • a rulespec-us PR repinning the nine PolicyEngine-US implementations to this merge with cites_entry: true;
    • then a PolicyEngine-US pin bump that vendors it, picking up rulespec-us#1907 too.

@MaxGhenis
MaxGhenis merged commit eeaf809 into main Oct 24, 2026
33 checks passed
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

US + core hub merge audit, us#10441 at c3e7f9bde4524229d78c45af8a03863f6ffc518d (squash): Mark nine source conflicts now in the shared register.

  • Review: GPT-6.1 Sol (gpt-6.1-sol served) review APPROVE_WITH_NITS at 0116ad2 (source-conflicts/pe-markers/review-r1.md), then Opus 5.5 (claude-opus-5-5 served; Codex lanes rate-limited) review APPROVE_WITH_NITS of the main merge at c3e7f9b (review-r2.md); every nit was PR-body or hand-off wording and is fixed (hub checked the body).
  • Gates checked live at merge:
    • gh pr checks exits 0;
    • the latest Pull request run at the head concluded success;
    • MERGEABLE;
    • not a draft;
    • no reviewer's latest review requests changes;
    • the semantic-overlap guard;
    • head pinned.
  • Impact: None: the hub read the diff; each of the nine model files gains exactly one comment line (a source-conflict marker), and the rest is the vendored register, the conflict backlog and the guard's KNOWN_UNMARKED list. No formula, parameter value or test expectation changes.
  • Order: Point the federal and AK-HI source-conflict candidates at their code on main #10350 and Point the NM-WY source-conflict candidates at their code on main #10352 edit seven of the twelve backlog candidates this PR deletes; whichever lands after it must delete those blocks.
  • Axiom: n/a: comments, the vendored register and the conflict backlog only; no policy change.

@MaxGhenis
MaxGhenis deleted the source-conflict-register-markers branch October 24, 2026 15:53
MaxGhenis added a commit that referenced this pull request Oct 24, 2026
Main's #10441 moved some of the edited candidates into the shared register,
so their blocks go and the edits to them are dropped; #10299 rewrote the
three SNAP timing candidates, so main's text stands for those.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Oct 24, 2026
Main's #10441 moved some of the edited candidates into the shared register,
so their blocks go and the edits to them are dropped; #10299 rewrote the
three SNAP timing candidates, so main's text stands for those.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Oct 24, 2026
Main's #10441 moved some of the edited candidates into the shared register,
so their blocks go and the edits to them are dropped; #10299 rewrote the
three SNAP timing candidates, so main's text stands for those.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Oct 24, 2026
Pin the register to TheAxiomFoundation/rulespec-us@ad03b32,
which merges rulespec-us#1907 and #1908.

- #1908 repins the nine PolicyEngine-US implementations marked in #10441
  to eeaf809 and sets cites_entry: true on each. The guard's
  test_registered_implementations_carry_their_marker now requires those
  nine markers. Removing the niit_magi.py marker makes it fail.
- #1907 adds two Social Security entries,
  oasdi-dual-entitlement-zero-after-age-reduction and
  oasdi-parent-entitlement-count-interval, and gives
  oasdi-family-maximum-saving-clause an implementation, four tests and a
  money case. All three are implemented only in
  microcosm-dynamics, so no PolicyEngine-US marker or candidate changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Oct 24, 2026
Pin the register to TheAxiomFoundation/rulespec-us@ad03b32,
the merge commit of rulespec-us#1908, which also includes #1907.

- #1908 repins the nine PolicyEngine-US implementations marked in #10441
  to eeaf809 and sets cites_entry: true on each. The guard's
  test_registered_implementations_carry_their_marker now requires those
  nine markers. Removing the niit_magi.py marker makes it fail.
- #1907 adds two Social Security entries,
  oasdi-dual-entitlement-zero-after-age-reduction and
  oasdi-parent-entitlement-count-interval, and gives
  oasdi-family-maximum-saving-clause an implementation, four tests and a
  money case. All three are implemented only in
  microcosm-dynamics, so no PolicyEngine-US marker or candidate changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ayu00168 pushed a commit to Ayu00168/rulespec-us that referenced this pull request Oct 25, 2026
PolicyEngine/policyengine-us#10441 (merge eeaf8096) put a
`# Source conflict <id>` marker in each of the nine PolicyEngine-US files
this register lists as an implementation. Pin those implementations to
eeaf8096 and set cites_entry: true, so verify checks that each file still
names its entry. The pinned tests keep their own commits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Oct 25, 2026
Pin the register to TheAxiomFoundation/rulespec-us@ad03b32,
the merge commit of rulespec-us#1908, which also includes #1907.

- #1908 repins the nine PolicyEngine-US implementations marked in #10441
  to eeaf809 and sets cites_entry: true on each. The guard's
  test_registered_implementations_carry_their_marker now requires those
  nine markers. Removing the niit_magi.py marker makes it fail.
- #1907 adds two Social Security entries,
  oasdi-dual-entitlement-zero-after-age-reduction and
  oasdi-parent-entitlement-count-interval, and gives
  oasdi-family-maximum-saving-clause an implementation, four tests and a
  money case. All three are implemented only in
  microcosm-dynamics, so no PolicyEngine-US marker or candidate changes.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Oct 26, 2026
Main now has #10301 squashed (81056c4) at #10301's final head cc1af12, which this branch already contains.
Five files conflicted:

- ca_premium_subsidy.yaml, ca_premium_subsidy_applicable_percentage.yaml,
  test_ca_premium_subsidy_applicable_percentage.py and
  ca_premium_subsidy_applicable_percentage.py: main's versions equal cc1af12's
  exactly, so this branch's side already includes them; took this branch's side.
- source_conflicts/candidates.yaml: one hunk, this branch's new
  us-ca:premium-subsidy-200-fpl-limit candidate against nothing on main; kept it.
  Main's other candidate edits (#10315's Minnesota entry, #10350-#10352, #10441,
  #10444) auto-merged unchanged.

Against main, the merged tree differs only in this PR's files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant