Repository navigation
Count each Social Security benefit once in Pennsylvania CCW countable income - #10408
PavelMakarchuk wants to merge 4 commits into
Conversation
social_security already adds the dependents, disability, retirement and survivors components, so listing social_security_disability and social_security_survivors next to it counted SSDI and survivor benefits twice. 55 Pa. Code ch. 3042 Appendix A Part I.E counts each SSA benefit once. Keep social_security, drop the two components, and add tests that set each component. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y-once # Conflicts: # policyengine_us/tests/policy/baseline/gov/states/pa/dhs/ccw/pa_ccw_countable_income.yaml
PR Review: Count each Social Security benefit once in Pennsylvania CCW countable incomePR #10408 (author: PavelMakarchuk), head Path prefixes:
SummaryWhat is right:
There are no critical and no should-address findings. There are four optional suggestions:
Status.
Critical (must fix)None. Should addressNone. SuggestionsG1. Consider a static guard so that no list names
G2. Out of scope: seven lists name the Social Security components but leave out
G3. Out of scope: PA CCW does not count
G4. Tidy the queued rulespec-us issue.
Verified correctRule (55 Pa. Code ch. 3042 Appendix A, official PDF):
Code:
Hand-checked expectations (all at 2025-01; annual inputs ÷ 12):
Axiom line assessment
CI status
Branch status
Verdict: APPROVE |
DTrim99
left a comment
There was a problem hiding this comment.
The fix is right: social_security already adds all four SSA components, so dropping the two duplicates counts each benefit once and drops nothing, per 55 Pa. Code 3042 App. A Part I.E. All 7 expectations hand-check (1,000 / 800 / 2,800, down from 2,000 / 1,600 / 3,900), rulespec-us#1737 is valid, and the #10317, #9558 and ratchet guards pass on the merged tree. Four suggestions, including a static guard against listing social_security with its parts. Full report in the comment above.
A parameter value block that lists social_security together with one of its dependents, disability, retirement or survivors components counts that benefit twice, as PA CCW did. The check reads YAML text only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR Review (round 2): Count each Social Security benefit once in Pennsylvania CCW countable incomeSummaryHead The new guard
CI and branch32/32 pass at Verdict: APPROVE |
DTrim99
left a comment
There was a problem hiding this comment.
Round 2: the new code-health guard (our G1) reads YAML text only. It flags a list naming social_security together with any of its components, skips comments and look-alike names, and self-tests each case. It passes on this head, and CI is 32/32 green. Approving again. Full note in the comment above.
What and why
Pennsylvania Child Care Works counted Social Security disability (SSDI) and survivor benefits twice.
pa_ccw_countable_incomeadds the variables inpa/dhs/ccw/income/countable_income/sources.yaml, and that list namedsocial_securitytogether withsocial_security_disabilityandsocial_security_survivors.social_securityalready adds the dependents, disability, retirement and survivors components, so the two extra entries counted those benefits a second time. For example, a parent with $12,000 a year of survivor benefits had $2,000 a month of countable income instead of $1,000.55 Pa. Code ch. 3042 Appendix A Part I.E (file page 59) includes "Social Security benefits, Supplemental Security Income, survivors' benefits and permanent disability insurance payments made by the Social Security Administration" in gross monthly income, and no Part III exclusion (file page 62) applies. Each SSA benefit counts once, so the list keeps
social_securityand drops the two components.Changes:
sources.yaml: dropsocial_security_disabilityandsocial_security_survivors, and add a comment thatsocial_securityincludes all four components. The reference title now says#page 59-60, because Part I runs from item A on file page 59 to item U on file page 60.tests/code_health/test_social_security_source_lists.py(new, from DTrim99's review suggestion G1): fails when a parameter value block listssocial_securitytogether with one of its four components. It reads YAML text only and imports no model. On the pre-fix PA CCW list it flags lines 7-9.pa_ccw_countable_income.yaml: new Cases 5 (survivor benefits), 6 (SSDI) and 7 (one member each with SSDI, dependents', survivor and retirement benefits). The header list now matches the parameter list.Reviewer DTrim99 found this double count (suggestion G5) on #10317 and it was left out of that PR's scope.
#10317 merged while this PR was open. This branch merges
main(latest merge 0e6e37d), so it keepsmilitary_retirement_incomefrom #10317 and listssocial_securityonce.Test plan
ssiis 0.make formatchangelog.d/Local runs on the tree merged with
main: PA CCW YAML folder (test_batched.py --mode per-subdir, 21 files) passes.test_social_security_source_lists.py,test_military_retirement_readers.py,test_unemployment_compensation_readers.py,test_source_conflicts.py,test_parameter_yaml_keys.pyandtest_rest_python_groups.pypass (202 tests). The new guard lands in theremainingRest Python group.axiom: TheAxiomFoundation/rulespec-us#1737 queued
rulespec-us#1737 is the queued
pe-parityissue for Appendix A, and it has no module yet. Its scope does not cover Part I.E. A companion comment asks to add Part I.E and the Case 5-7 expectations to its scope.🤖 Generated with Claude Code