Skip to content

Require head/spouse for NJ CCAP activity eligibility#8073

Merged
MaxGhenis merged 1 commit intoPolicyEngine:mainfrom
MaxGhenis:fix-nj-ccap-activity-vacuous-pass
Apr 18, 2026
Merged

Require head/spouse for NJ CCAP activity eligibility#8073
MaxGhenis merged 1 commit intoPolicyEngine:mainfrom
MaxGhenis:fix-nj-ccap-activity-vacuous-pass

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

Follow-up to #7811. nj_ccap_activity_eligible treated an SPM unit with zero heads/spouses as satisfying the activity test: n_qualifying (0) >= n_parents (0) evaluates to True. A unit composed only of dependents would vacuously pass.

This adds n_parents >= 1 to the head/spouse qualification rule from N.J.A.C. 10:15-5.2, matching the fix applied to SC CCAP activity eligibility.

Changes

  • policyengine_us/variables/gov/states/nj/njdhs/ccap/eligibility/nj_ccap_activity_eligible.py: require n_parents >= 1 alongside n_qualifying >= n_parents.
  • New nj_ccap_activity_eligible.yaml test suite covering work hours, student exemption, multi-parent gating, and the orphaned-minors regression case.

Test plan

  • New regression case (Case 5, SPM unit with only dependents) fails before the fix and passes after.
  • All 455 tests under policyengine_us/tests/policy/baseline/gov/states/nj/ pass.

Follow-up to PolicyEngine#7811.

nj_ccap_activity_eligible treated an SPM unit with zero
heads/spouses as satisfying the activity test: n_qualifying (0)
>= n_parents (0) evaluates to True. A unit composed only of
dependents would therefore vacuously pass.

Require at least one head/spouse to be present (n_parents >= 1)
alongside the existing "every head/spouse must independently
qualify" rule from N.J.A.C. 10:15-5.2.

Adds a dedicated nj_ccap_activity_eligible.yaml test suite,
including a regression case with only dependents.

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 (44ea973).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##              main     #8073    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           18         1    -17     
  Lines          353        23   -330     
  Branches         4         0     -4     
==========================================
- Hits           353        23   -330     
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 95fa995 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