Skip to content

Apply CT C4K activity test to tax-unit head/spouse only#8067

Merged
MaxGhenis merged 1 commit intoPolicyEngine:mainfrom
MaxGhenis:fix-ct-c4k-activity-test-head-filter
Apr 18, 2026
Merged

Apply CT C4K activity test to tax-unit head/spouse only#8067
MaxGhenis merged 1 commit intoPolicyEngine:mainfrom
MaxGhenis:fix-ct-c4k-activity-test-head-filter

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

Follow-up to #7778. The Connecticut Care 4 Kids activity test (RCSA 17b-749-04) requires the applicant or caretaker to be employed, self-employed, receiving TFA, or a teen parent in school. The initial implementation checked whether any SPM-unit member had employment or self-employment income, so a working dependent (for example, a teen with a part-time or summer job) would make the whole family appear to meet the activity test.

Gating the earnings check on is_tax_unit_head_or_spouse restricts the activity test to the applicant/spouse, matching the statute. TFA eligibility and the teen-parent-in-school branches already reference the correct person, so they are unchanged.

Regulatory authority

Regression tests

Added two cases to ct_c4k_meets_activity_test.yaml:

  • Case 7: working teen dependent (age 17, $8,000 earnings), head has only pension income -- now returns false.
  • Case 8: self-employed teen dependent (age 16), head has only pension income -- also returns false.

Both tests fail on main and pass after this change. All 135 CT C4K tests and all 456 CT-state tests pass.

Test plan

  • New regression cases fail without the fix
  • New regression cases pass with the fix
  • All CT C4K tests pass (135/135)
  • All CT state tests pass (456/456)

Follow-up to PolicyEngine#7778.

Connecticut Care 4 Kids (C4K) requires the applicant / caretaker to
meet an activity test: working, self-employed, receiving TFA, or a
teen parent in school (RCSA 17b-749-04). The initial implementation
in PolicyEngine#7778 checked whether *any* SPM-unit member had employment or
self-employment income, which incorrectly treated a working dependent
(e.g., a teen with a summer job) as satisfying the test for the whole
family.

This filters the earnings check by `is_tax_unit_head_or_spouse` so
only the applicant's / spouse's activity counts. TFA eligibility and
the teen-parent-in-school branches already reference the correct
person, so they are left unchanged.

Regression tests:
 * Case 7: working teen dependent (head has only pension income) now
   returns false.
 * Case 8: self-employed teen dependent also excluded.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (05d5d97) to head (84a2e08).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##              main     #8067    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           18         1    -17     
  Lines          353        17   -336     
  Branches         4         0     -4     
==========================================
- Hits           353        17   -336     
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 Sentry.
📢 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.

@MaxGhenis MaxGhenis merged commit c5d6733 into PolicyEngine:main Apr 18, 2026
15 checks passed
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