Skip to content

Fix Maryland CTC phaseout per qualifying child - #9591

Open
PavelMakarchuk wants to merge 2 commits into
mainfrom
codex/md-ctc-per-child
Open

PavelMakarchuk wants to merge 2 commits into
mainfrom
codex/md-ctc-per-child

Conversation

@PavelMakarchuk

@PavelMakarchuk PavelMakarchuk commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #9589.

Maryland's 2025 child tax credit phaseout was subtracted once per family, overstating credits for families with multiple qualifying children. Apply the reduction per eligible child: two children and $16,000 AGI now receive $900 instead of $950.

Maryland Worksheet 21C, lines 4–7 reduces the per-child credit before multiplying by qualifying children. Line 7 states: “Multiply Line 6 by the number of qualified children”. The existing two-child $18,000 test is corrected from $850 to $700; new tests cover $15,000/$15,001, $16,000/$16,001 and $24,000/$24,001. Also adds negative-AGI, 2024 cutoff, and credit-to-final-tax integration cases. Single-child and pre-2025 calculations are preserved.

Validation: make format and git diff --check passed. Isolated execution of the current formula against all 23 CTC YAML cases passed; the initial regression run demonstrated five failures against the original formula. Full local YAML execution was blocked before tests by the existing environment's missing spm_calculator.policyengine_adapter dependency; CI must validate full-model execution.

@codecov

codecov Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (909176a) to head (da8e351).
⚠️ Report is 37 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #9591   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         1    -3     
  Lines           76        30   -46     
  Branches         2         2           
=========================================
- Hits            76        30   -46     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@PavelMakarchuk

Copy link
Copy Markdown
Collaborator Author

Program Review

Source Documents

  • PDF: 2025 Maryland resident tax booklet, Worksheet 21C (60 pages; file page 27 / printed 19).
  • Corroboration: Enacted Chapter 604, §10-751 and effective-year provision.
  • Year: 2025 onward; historical regression checked.
  • Scope: Incremental test additions and prior unresolved A1/A2. Formula, parameters and references unchanged.
  • Reviewed head SHA: da8e351
  • Mode: incremental from 71ccc33
  • Integrity: Baseline ancestry verified; prior report preserved; PDF SHA256 17bc9f77e055c0570daee8840921e635b1b0952a39d54f28e33516699b9b6ba5 revalidated; all 60 existing 300 DPI screenshots present.

Critical (Must Fix)

None.

Should Address

None remaining.

  • [A1] RESOLVED — Refundable-credit integration: Added test calculates the $900 CTC from two eligible children and $16,000 AGI, asserts $900 refundable credits and −$800 final Maryland tax against $100 before refundable credits. All other registered refundable credits are explicitly zeroed. The CTC and aggregation are not overridden.
  • [A2] RESOLVED — Negative-AGI and 2024 regression: Added 2025 two-child negative-AGI credit of $1,000 and 2024 two-child AGI $16,000 credit of $0.

Suggestions

None.

PDF Audit Summary

Category Count
Confirmed correct comparisons, reused 8
Mismatches 0
Unmodeled items in changed scope 0
Added anchor verification, reused 1 correct

The prior complete audit's legal evidence remains applicable because no formula, parameter or reference changed. The worksheet supports per-child phaseout. No outstanding cross-reference, external-source request or numerical mismatch requires further verification; queue is NONE.

Validation Summary

Check Result
Regulatory accuracy / references Prior findings reused; no semantic change
Code patterns All ten incremental categories audited; no issue
Test coverage A1 and A2 resolved; 23 committed cases
Isolated formula execution 23/23 actual-formula/eligibility checks passed
Integration arithmetic Actual credit-list arithmetic independently confirmed $900 / −$800
Additional probes Prior 210 isolated checks remain applicable; formula unchanged
Current-head CI No checks reported yet when refreshed for this SHA

The isolated checks use actual formula ASTs, dated parameters and lightweight entity stubs. They are not full-framework tests. No local full-model test success is claimed: a missing dependency prevents that local runtime, and heavy installs/imports were avoided for RAM/disk constraints. Prior-head CI passed selective tests but cannot validate this new head.

Review Severity: APPROVE

No unresolved review findings. Request Ziming's review; wait for current-head CI before merging. This recommendation does not perform a merge or formal GitHub approval.

Run Metrics

Initial full review: 3 unique delegates, 60 pages rendered at 300 DPI, 0 cache hits, 6.9 minutes before initial consolidation. Incremental pass reuses the same delegate and 60 checksum-valid page renders (no new rendering). Exact incremental duration not recorded. Initial captured branch was 0 commits behind base.

Next Steps

Request Ziming's review and monitor current-head CI. No further fix identified.

@hua7450 hua7450 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The per-child phaseout fix is correct. I checked it against § 10-751 as amended by HB 352 and against the 2025 Worksheet 21C, and I worked out every new or changed expected value by hand; all of them match. I'm requesting changes only for the small cleanups below.

What I checked

  • Worksheet 21C, lines 4–7: line 6 subtracts the reduction from $500, and line 7 multiplies the result by the number of qualified children. The formula now does the same. Flooring the family total at $0 gives the same result as a per-child floor, because every qualified child gets the same $500, including a child with a disability.
  • § 10-751(c) as amended by HB 352 (Ch. 604): the credit drops by $50 for each $1,000 "or fraction thereof" of federal AGI over $15,000. The ceil step matches worksheet line 4 ("round up to the next whole number").
  • The 2024 hard cap of "$15,000 or less" (Ch. 604, struck text) and refundability under § 10-751(d) both match the new 2024 and integration tests.

Requested changes

  1. References: md_ctc.py cites casetext and Justia's 2022 edition of § 10-751. The 2022 edition only has the pre-2025 hard cap, not the phaseout. Please add the current official text: https://mgaleg.maryland.gov/mgawebsite/Laws/StatuteText?article=gtg&section=10-751&enactments=false. md_ctc_eligible.py has the same references and could get the same update.
  2. Number formatting in tests: the new cases write 15000, 24001 and so on. The rest of md_ctc.yaml uses underscore grouping (15_000). Please match it.
  3. Derivation comments in tests: the existing cases show their arithmetic; the new ones don't. One line per case would make the per-child math easy to check, for example # 2 × ($500 − ceil($1,001 / $1,000) × $50) = 2 × $400 = $800.
  4. Edited $18,000 case: the comment Phase-out reduction: ($3,000 / $1,000) * $50 = $150 should say "per child", now that the reduction applies to each child.

This branch has not been deployed

No deployments
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.

Maryland 2025 CTC phaseout must apply per qualifying child

2 participants