From eb37a663d38a2a724e122f9565352f452155a16c Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sun, 8 Nov 2026 11:47:00 -0500 Subject: [PATCH 1/2] Mark Maryland's capital gains surtax source conflict - md_net_capital_gain.py: the line that takes the 1222(11) amount now carries `# Source conflict us-md:capital-gains-surtax-short-term-gains`, and the prose above it no longer calls the conflict a candidate. - test_source_conflicts.py: the file's KNOWN_UNMARKED line goes, since the ratchet skips a file with a valid marker. - candidates.yaml: the conflict leaves the backlog once the register holds it. The register pin moves to the merge of TheAxiomFoundation/rulespec-us#2080 in a later commit; until then the guard rejects the marker. Co-Authored-By: Claude Opus 5.5 --- .../md-capital-gains-surtax-marker.changed.md | 1 + .../code_health/test_source_conflicts.py | 1 - .../capital_gains/md_net_capital_gain.py | 11 +++---- source_conflicts/candidates.yaml | 33 ------------------- 4 files changed, 6 insertions(+), 40 deletions(-) create mode 100644 changelog.d/md-capital-gains-surtax-marker.changed.md diff --git a/changelog.d/md-capital-gains-surtax-marker.changed.md b/changelog.d/md-capital-gains-surtax-marker.changed.md new file mode 100644 index 00000000000..eb41fe5d954 --- /dev/null +++ b/changelog.d/md-capital-gains-surtax-marker.changed.md @@ -0,0 +1 @@ +Mark the deciding line of Maryland's capital gains surtax source conflict, now in the register shared with Axiom, vendor the register at its newer rulespec-us commit, and drop the conflict from the candidates list. diff --git a/policyengine_us/tests/code_health/test_source_conflicts.py b/policyengine_us/tests/code_health/test_source_conflicts.py index 2bc5e9d4e84..9d70289b3e0 100644 --- a/policyengine_us/tests/code_health/test_source_conflicts.py +++ b/policyengine_us/tests/code_health/test_source_conflicts.py @@ -172,7 +172,6 @@ "policyengine_us/variables/gov/states/hi/tax/income/subtractions/hi_student_loan_interest_adjustment.py": 1, "policyengine_us/variables/gov/states/ks/tax/income/deductions/ks_itemized_deductions.py": 1, "policyengine_us/variables/gov/states/ky/dcbs/liheap/ky_liheap.py": 1, - "policyengine_us/variables/gov/states/md/tax/income/capital_gains/md_net_capital_gain.py": 1, "policyengine_us/variables/gov/states/mn/dcyf/mfip/income/earned/mn_mfip_dependent_care_deduction.py": 1, "policyengine_us/variables/gov/states/mn/tax/income/deductions/mn_itemized_deductions.py": 1, "policyengine_us/variables/gov/states/mo/dese/ccs/eligibility/mo_ccs_income_eligible.py": 1, diff --git a/policyengine_us/variables/gov/states/md/tax/income/capital_gains/md_net_capital_gain.py b/policyengine_us/variables/gov/states/md/tax/income/capital_gains/md_net_capital_gain.py index 62e78c488e9..8538a20b00e 100644 --- a/policyengine_us/variables/gov/states/md/tax/income/capital_gains/md_net_capital_gain.py +++ b/policyengine_us/variables/gov/states/md/tax/income/capital_gains/md_net_capital_gain.py @@ -66,10 +66,9 @@ def formula(tax_unit, period, parameters): # 1222(11): a net short-term capital loss reduces the net long-term # capital gain, and a net short-term capital gain does not add to it. # That is the smaller of Schedule D lines 15 and 16, as on line 7 of - # the Schedule D Tax Worksheet. - # Source conflict: the Form 502CG instructions use Form 502 line 1c, - # the Form 1040 line 7a gain, which also counts a net short-term - # capital gain; 10-105(a)(3) and Technical Bulletin 58 use the - # 1222(11) amount, which this follows (candidate - # us-md:capital-gains-surtax-short-term-gains). + # the Schedule D Tax Worksheet. The Form 502CG instructions take Form + # 502 line 1c, the Form 1040 line 7a gain, which also counts a net + # short-term capital gain; this follows 10-105(a)(3) and the 1222(11) + # definition that Technical Bulletin 58 section I restates. + # Source conflict us-md:capital-gains-surtax-short-term-gains return max_(0, min_(long_term, combined)) diff --git a/source_conflicts/candidates.yaml b/source_conflicts/candidates.yaml index 12772c7bdde..c293628c822 100644 --- a/source_conflicts/candidates.yaml +++ b/source_conflicts/candidates.yaml @@ -4601,39 +4601,6 @@ candidates: state: unreviewed note: PE-US follows the regulation; the October 2016-September 2024 span is approximate and needs contemporaneous-source verification. -- id: us-md:capital-gains-surtax-short-term-gains - program: income-tax - years: - from: 2025 - type: tax - question: Does Maryland's capital gains surtax base exclude a net short-term capital gain under the statute's IRC - definition, or include it through Form 502CG's transfer of the federal capital gain line? - sources: - - kind: statute - citation: Md. Code, Tax-General § 10-105(a)(3)(i), incorporating net capital gain under 26 U.S.C. 1222(11) - url: https://mgaleg.maryland.gov/mgawebsite/Laws/StatuteText?article=gtg§ion=10-105&enactments=false - - kind: guidance - citation: Maryland Comptroller Technical Bulletin No. 58 (Dec. 29, 2025), section I - url: https://www.marylandcomptroller.gov/content/dam/mdcomp/tax/legal-publications/technical-bulletins/tb-58.pdf#page=1 - - kind: instructions - citation: 2025 Form 502CG instructions, line 1, pointing to Form 502 line 1c (Form 1040 line 7a; resident booklet - p. 13) - url: https://www.marylandcomptroller.gov/content/dam/mdcomp/tax/forms/2025/502cg.pdf#page=2 - readings: - statute: The base is net long-term capital gain less any net short-term capital loss; a net short-term capital - gain adds nothing. - other: The base is the Form 1040 line 7a capital gain, which also counts a net short-term capital gain. - example: For an eligible filer, $100,000 of long-term and $50,000 of short-term gain give a $2,000 surtax under the - statute and $3,000 under the form; $80,000 of short-term gain alone gives $0 versus $1,600. - pe_us: - follows: statute - code: - - policyengine_us/variables/gov/states/md/tax/income/capital_gains/md_net_capital_gain.py - prs: - - https://github.com/PolicyEngine/policyengine-us/pull/9898 - state: ruled - note: PR 9898 computes the base as max(0, min(Schedule D line 15, line 16)) and pins both readings' witnesses in - md_capital_gains_surtax.yaml. Statute-first rule of 2026-10-19; register it once PR 9898 is on main. - id: us-md:ccs-copay-flat-schedule program: child-care-assistance years: From 630cb71ffff447f32baf175bfa2f424b15ad63ba Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Tue, 10 Nov 2026 22:10:09 -0500 Subject: [PATCH 2/2] Vendor the source-conflict register at rulespec-us b520e62b0466 TheAxiomFoundation/rulespec-us#2080 merged as b520e62b0466 and adds us-md:capital-gains-surtax-short-term-gains, the entry the marker in md_net_capital_gain.py cites. scripts/update_source_conflicts.py wrote both files. The register gains that one entry and changes no other. Co-Authored-By: Claude Fable 5.2 --- source_conflicts/known-source-conflicts.yaml | 85 ++++++++++++++++++++ source_conflicts/pin.yaml | 4 +- 2 files changed, 87 insertions(+), 2 deletions(-) diff --git a/source_conflicts/known-source-conflicts.yaml b/source_conflicts/known-source-conflicts.yaml index c9fe793d0d7..96fd18c928e 100644 --- a/source_conflicts/known-source-conflicts.yaml +++ b/source_conflicts/known-source-conflicts.yaml @@ -1070,6 +1070,91 @@ entries: name: A farm loss is netted against wages like other self-employment (2024) pins: - reading +- id: capital-gains-surtax-short-term-gains + jurisdiction: us-md + program: income-tax + question: Does Maryland's additional 2% tax on net capital gain under Tax-General 10-105(a)(3) leave out a net short-term capital gain, as the Internal + Revenue Code's definition does, or count it, as Form 502CG Line 1 does for residents by taking Form 502 Line 1c, the federal Form 1040 Line 7a + gain? + texts: + - corpus_citation_path: us-md/statute/gtg/10-105 + excerpt: includes any amount of net capital gain, as defined and determined under the Internal Revenue Code + - corpus_citation_path: us-md/statute/gtg/10-105 + excerpt: an additional 2% of the amount of net capital gain + - corpus_citation_path: us/statute/26/1222 + excerpt: (11) Net capital gain The term “net capital gain” means the excess of the net long-term capital gain for the taxable year over the net short-term + capital loss for such year. + pending_texts: + - citation: Maryland Comptroller Technical Bulletin No. 58 (Dec. 29, 2025), section I, PDF p. 1 + kind: guidance + url: https://www.marylandcomptroller.gov/content/dam/mdcomp/tax/legal-publications/technical-bulletins/tb-58.pdf#page=1 + excerpt: “Net capital gain” means the excess of the net long-term capital gain for the taxable year over the net short-term capital loss for such year. + snapshot: + repo: PolicyEngine/policyengine-us + commit: 3b2d580765153f77d9ea18d5940d05d6618903e7 + path: source_conflicts/sources/us-md/technical-bulletin-58-2025-p1.txt + sha256: 3f6af2f3f839a6d2f3cf0b8fb5f448511175c8e902210c0249536a1658314efe + - citation: 2025 Maryland Form 502CG instructions, Line 1, PDF p. 2 + kind: instructions + url: https://www.marylandcomptroller.gov/content/dam/mdcomp/tax/forms/2025/502cg.pdf#page=2 + excerpt: 'Line 1: Enter the amount of federal net capital gain income included in your Maryland adjusted gross income. Residents use Line 1c of Form 502.' + snapshot: + repo: PolicyEngine/policyengine-us + commit: 3b2d580765153f77d9ea18d5940d05d6618903e7 + path: source_conflicts/sources/us-md/form-502cg-instructions-2025-p2.txt + sha256: b4c6551f7ca94c6a855cbf275cad59109094a0eab62db48d223c3d46840730af + - citation: 2025 Maryland resident tax booklet, Line 1c instruction, PDF p. 13 + kind: instructions + url: https://www.marylandcomptroller.gov/content/dam/mdcomp/tax/instructions/2025/resident-booklet.pdf#page=13 + excerpt: Line 1c. Enter on Line 1c the amount of net capital gain or loss reported as taxable income on Line 7a of the federal Form 1040. + snapshot: + repo: PolicyEngine/policyengine-us + commit: 3b2d580765153f77d9ea18d5940d05d6618903e7 + path: source_conflicts/sources/us-md/resident-booklet-2025-p13.txt + sha256: e140bc6dcfbdf427675f4ac1dcf0ff9807becf5c36fd15c578c13c17493aeafe + reading: Tax the net capital gain that Internal Revenue Code section 1222(11) defines, the excess of net long-term capital gain over any net short-term + capital loss, so a net short-term capital gain adds nothing to the base. + alternatives: + - id: form-1040-line-7a-gain + reading: Tax the Form 1040 Line 7a capital gain, which Form 502 Line 1c carries and Form 502CG Line 1 takes. That gain combines the net short-term + and net long-term amounts, so a net short-term capital gain counts in the base. + effect: Before gains from excepted assets come off, the base also counts a net short-term capital gain, to the extent a net long-term capital loss + does not offset it. + basis: Tax-General 10-105(a)(3)(i) taxes net capital gain "as defined and determined under the Internal Revenue Code", and section 1222(11) leaves a net + short-term capital gain out of that definition. Technical Bulletin 58 restates that definition in section I, though its section III.A.2 example + reproduces Form 502CG, whose Line 1 points to Form 502 Line 1c. The form instructions take the broader line, but a form fills a gap only where the + statute is silent, and here it is not. + status: open + outcome: computed + years: + from: 2025 + type: tax + implementations: + - repo: PolicyEngine/policyengine-us + commit: e7bcd59c1e3bffe2fac8f8f26c72a99bacde1921 + path: policyengine_us/variables/gov/states/md/tax/income/capital_gains/md_net_capital_gain.py + follows: reading + adopts: reading + basis: PolicyEngine-US follows the statute when it conflicts with forms or their instructions. + ruling: + by: PolicyEngine + date: '2026-11-08' + record: https://github.com/PolicyEngine/policyengine-us/pull/9898 + principle: statute-first + cites_entry: true + tests: + - repo: PolicyEngine/policyengine-us + commit: e7bcd59c1e3bffe2fac8f8f26c72a99bacde1921 + path: policyengine_us/tests/policy/baseline/gov/states/md/tax/income/capital_gains/md_net_capital_gain.yaml + name: Spouses' short-term amounts net to a gain, which adds nothing + pins: + - reading + - repo: PolicyEngine/policyengine-us + commit: e7bcd59c1e3bffe2fac8f8f26c72a99bacde1921 + path: policyengine_us/tests/policy/baseline/gov/states/md/tax/income/capital_gains/md_capital_gains_surtax.yaml + name: A net short-term capital gain is not net capital gain + pins: + - reading - id: niit-magi-trust-code-h-adjustment jurisdiction: us program: income-tax diff --git a/source_conflicts/pin.yaml b/source_conflicts/pin.yaml index eb5d3de7fc8..0564f55e5f4 100644 --- a/source_conflicts/pin.yaml +++ b/source_conflicts/pin.yaml @@ -1,6 +1,6 @@ # The rulespec-us commit known-source-conflicts.yaml is vendored from. # Written by scripts/update_source_conflicts.py; do not edit by hand. repo: TheAxiomFoundation/rulespec-us -commit: ad03b32553749edc6e332b815487a9311ef9ed58 +commit: b520e62b04664d97eb488e4fad2276e2d2b22618 path: known-source-conflicts.yaml -sha256: fe5ef0f0cae7b9c8ed8caf87b6bdd6297ff9fe974cd50932857011df05ac6ffa +sha256: eba3ce93fb16912751aa428770b3839d41d9f059c5e13c337f98dd1e7a2b6cdc