Require head/spouse for SC CCAP activity eligibility#8071
Merged
MaxGhenis merged 1 commit intoPolicyEngine:mainfrom Apr 18, 2026
Merged
Require head/spouse for SC CCAP activity eligibility#8071MaxGhenis merged 1 commit intoPolicyEngine:mainfrom
MaxGhenis merged 1 commit intoPolicyEngine:mainfrom
Conversation
Follow-up to PolicyEngine#7935. sc_ccap_activity_eligible returned True whenever no head/spouse appeared in the SPM unit, because `spm_unit.sum(is_head_or_spouse & ~individually_eligible) == 0` is vacuously True for an empty set. An SPM unit composed only of dependents (e.g. a pair of unaccompanied minors) would therefore satisfy the activity test. Mirror the VA CCSP activity-eligibility pattern by requiring at least one head/spouse to be present in addition to every head or spouse meeting the individual activity requirement. The benefit-rate tests in sc_ccap_maximum_weekly_benefit.yaml previously tested a single-child SPM unit to isolate the rate schedule. Those are now realistic family scenarios with a working head, which keeps the rate assertions unchanged while matching the tightened activity test. A new sc_ccap_activity_eligible.yaml covers the head/spouse requirement directly, including the orphaned-minors regression case. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8071 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 18 1 -17
Lines 353 20 -333
Branches 4 0 -4
==========================================
- Hits 353 20 -333
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #7935.
sc_ccap_activity_eligiblereturnedTruewhenever an SPM unit contained no tax-unit head/spouse, becausespm_unit.sum(is_head_or_spouse & ~individually_eligible) == 0is vacuously satisfied over an empty set. An SPM unit with only dependents (e.g. two unaccompanied minors) would therefore pass the activity test.This mirrors the VA CCSP activity-eligibility pattern (
has_active_parent & all_covered) by also requiring at least one head/spouse to be present, while preserving the "every head/spouse must individually qualify" rule from the SC CCAP Policy Manual sec. 2.13.Changes
policyengine_us/variables/gov/states/sc/dss/ccap/eligibility/sc_ccap_activity_eligible.py: requirespm_unit.sum(is_head_or_spouse) >= 1.sc_ccap_activity_eligible.yamltest file covering head/spouse presence, disability exemption, student path, multi-parent, and the orphaned-minors regression case.sc_ccap_maximum_weekly_benefit.yamlcases 1-9 to use a realistic two-person unit (working head + child). The benefit-rate assertions are unchanged; the tests simply no longer rely on the vacuous activity-pass.Test plan
Case 6, SPM unit with only dependents) fails before the fix and passes after.policyengine_us/tests/policy/baseline/gov/states/sc/pass.