PolicyEngine / PolicyEngine/policyengine-us
ctc_qualifying_children counts children whose filer fails the identification requirement
- Dominant language
- Python
- Stars
- 162
- Forks
- 212
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 97
Description
## Observation
`ctc_qualifying_children` counts a child as qualifying even when the tax unit fails `filer_meets_child_ctc_identification_requirements`; the filer test is applied later, in `ctc_child_individual_maximum`, which zeroes the amount. So the count and the amount disagree about who qualifies.
26 USC 24(h)(7) makes the taxpayer identification number requirement part of whether a child is taken into account at all, so a strict reading excludes those children from the count.
## Evidence
Comparing PE against the RuleSpec encoding of 24(h) (`TheAxiomFoundation/rulespec-us`, `us/statutes/26/24/h.yaml`) over `populace_us_2024` for 2026: 299 of 87,519 tax units differ in the count (by 1 or 2), and all 299 are units where `filer_meets_child_ctc_identification_requirements` is false. `ctc_maximum` agrees on every unit, because PE zeroes the amount through the filer flag.
## Question
Is the count meant to follow the statute (exclude when the filer fails the requirement), or is it deliberately a demographic count used elsewhere? If the former, moving the filer test into `ctc_qualifying_child` aligns the count with the amount. If the latter, a note on the variable would help downstream consumers.
Contributor guide
Research direction
Start by reading ctc_qualifying_children, ctc_qualifying_child, ctc_child_individual_maximum, and filer_meets_child_ctc_identification_requirements, then compare their behavior with the 26 USC 24(h)(7) RuleSpec entry at us/statutes/26/24/h.yaml. Done means the intended count semantics are decided and either the count matches the amount or the variable documents its demographic-count purpose.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100