Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

MA CCFA: dependent path subtracts a minor's earnings twice when parent-only counting is off

Open Beginner friendly
#9,759 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
74/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Start with ma_ccfa_countable_income_person and its dependent-income branch; reproduce the described 15-year-old scenario with minor earnings exclusion on and parent-only counting off. Correct the dependent-path result and add or run a focused regression test for that reform combination.

Written by the indexing model from the issue text.

Description

ma_ccfa_countable_income_person subtracts a minor's earnings twice on the dependent path when the minor earnings exclusion is on and parent-only counting is off.

gross = add(person, period, p.sources.earned + p.sources.unearned)
earned = add(person, period, p.sources.earned)
if p.exclusions.minor_earnings_in_effect:
    gross = gross - where(minor, earned, 0)       # gross now excludes a minor's earnings
...
dependent_income = where(dependent, max_(gross - earned, 0), 0)   # subtracts them again

For a dependent minor, dependent_income is max(unearned - earned, 0), not unearned. Executed on PolicyEngine/policyengine-us#9739 with a reform that counts self_employment_income as the only earned source and turns parent-only counting off: a 15-year-old dependent with -$100/month self-employment income and no unearned income gets countable income $100.

Baseline never reaches this combination: exclusions.minor_earnings_in_effect is true from 2026-01-01 and only_parent_income_in_effect from 2023-10-01, and the parent-only rule returns before the dependent path. It only matters under a reform that turns parent-only counting off from 2026.

Found while reviewing #9739, which does not change this behaviour.

Dominant language
Python
Stars
166
Forks
214
Avg merge
2d 12h
Merged PRs (30d)
294

Getting set up

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.

More from PolicyEngine/policyengine-us

All issues in PolicyEngine/policyengine-us

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.