Skip to content

Add Santa Clara County General Assistance Program#8358

Draft
hua7450 wants to merge 4 commits into
PolicyEngine:mainfrom
hua7450:santa-clara-ga
Draft

Add Santa Clara County General Assistance Program#8358
hua7450 wants to merge 4 commits into
PolicyEngine:mainfrom
hua7450:santa-clara-ga

Conversation

@hua7450
Copy link
Copy Markdown
Collaborator

@hua7450 hua7450 commented May 20, 2026

Summary

Implements Santa Clara County General Assistance (GA), a 100% county-funded cash aid program for indigent adults without dependent children. The program is mandated by Cal. W&I Code § 17000 and operationally codified in the Santa Clara County GA Handbook (GA 100-289). Mirrors the existing Alameda County GA implementation 1-for-1 with two scoped additions: shared-housing MAP reductions (GA 282) and an expanded countable-income source list to match the SCC handbook.

Closes #8357

Regulatory Authority

Program Overview

  • Administration: Santa Clara County Social Services Agency (SSA), Department of Employment & Benefit Services (DEBS)
  • Funding: 100% county-funded
  • Variable prefix: ca_scc_general_assistance
  • Variable scope: SPMUnit-level benefit + income aggregation; Person-level eligibility — mirrors Alameda County GA structure
  • Directories:
    • Parameters: policyengine_us/parameters/gov/local/ca/scc/general_assistance/
    • Variables: policyengine_us/variables/gov/local/ca/scc/
    • Tests: policyengine_us/tests/policy/baseline/gov/local/ca/scc/ga/

Eligibility Requirements

Requirement Source How Modeled
Age 18+ GA 112 ca_scc_general_assistance_age_eligible.py via age_threshold parameter
Santa Clara County resident GA 140 in_scc.py (county_str == "SANTA_CLARA_COUNTY_CA")
US citizen or qualified non-citizen (6 statuses) GA 141 ca_scc_general_assistance_immigration_status_eligible.py reading qualified_immigration_status.yaml
Personal property ≤ $500 GA 180 ca_scc_general_assistance_personal_property_eligible.py
Not receiving SSI / federal cash aid GA 202 ca_scc_general_assistance_eligible_person.py (ssi == 0)
Tax-unit head or spouse GA 200 framework ca_scc_general_assistance_eligible_person.py via is_tax_unit_head_or_spouse
Countable income < MAP GA 200 ca_scc_general_assistance_income_eligible.py (strict <)

Benefit Amounts (Need Standards Chart, GA 280; corroborated by GA-62)

Household Type Monthly MAP
Single (1 person, unshared) $343
Married couple (unshared) $460

Effective date: 2016-04-01 (frozen since). AB 161's 0.3% MAP increase applies to CalWORKs only, not General Assistance.

Shared-Housing Reductions (GA 282) — extension beyond Alameda

Shared-housing tier MAP reduction
Not shared 0%
Shared with 1 other 15%
Shared with 2 others 20%
Shared with 3+ others 25%

Implemented via a new Enum input variable ca_scc_general_assistance_shared_housing_status and the shared_housing/reduction.yaml parameter (breakdown keyed by the enum). Default is NOT_SHARED, so unconfigured households see no reduction. The reduction is applied inside ca_scc_general_assistance_base_amount.py as unshared * (1 - reduction[shared_status]).

Countable Income — extension beyond Alameda

Expanded from Alameda's 6 sources to 17 PolicyEngine variables to match the SCC handbook's Types-of-Income chapter:

employment_income, self_employment_income, sstb_self_employment_income, social_security, unemployment_compensation, veterans_benefits, workers_compensation, taxable_pension_income, tax_exempt_pension_income, taxable_interest_income, tax_exempt_interest_income, qualified_dividend_income, non_qualified_dividend_income, alimony_income, child_support_received, strike_benefits, rental_income.

All source variables were verified to exist in the codebase. Split sub-variables (taxable/tax-exempt, qualified/non-qualified) were preferred over parent aggregators so each line item appears explicitly.

Benefit Formula

Fill-the-gap:

GA = base − max(countable_income, 0)   (when eligible)
   = 0                                  (otherwise, via defined_for)

The inner max_(countable, 0) floors countable income at 0 to prevent negative-income inflation above the MAP (caught by edge-case tests at $-1M SE income — see Implementation Notes).

Requirements Coverage

16 in-scope requirements, 100% covered. See /tmp/santa-clara-ga-coverage-report.md for the full mapping (parameter file × variable file × test case per REQ).

Not Modeled

What Source Why Excluded
15-day continuous-presence residency GA 140 Modeled only as a county boolean
Real-property deemed income (6% GMV/year) GA 170 Not modeled in Alameda either
Self-employed categorical ineligibility Types_Income SE income still counted as countable
Sponsor-deeming for sponsored non-citizens GA 114, 161-162 Not modeled
Public Works / job-search work requirements GA 213, 215-219 Behavioral requirement
Sanction periods GA 229 Behavioral
RCH / room-and-board / medical-institution MAP variants Need Standards Uses 1-person/married standard rates
Special needs payments (diet, transportation, in-home care) GA 289 Not modeled
Lump-sum income disqualification GA 203 Not modeled
IAR / Director's Exception / motor-vehicle exemption GA-62, GA 113, GA 181 Edge cases not modeled

Files Added (28)

changelog.d/added/8358.md

policyengine_us/parameters/gov/local/ca/scc/general_assistance/
├── age_threshold.yaml
├── amount/
│   ├── married.yaml
│   └── single.yaml
├── countable_income/
│   └── sources.yaml
├── personal_property/
│   └── limit.yaml
├── qualified_immigration_status.yaml
└── shared_housing/
    └── reduction.yaml

policyengine_us/variables/gov/local/ca/scc/
├── in_scc.py
└── ga/
    ├── ca_scc_general_assistance.py
    ├── ca_scc_general_assistance_base_amount.py
    ├── ca_scc_general_assistance_shared_housing_status.py
    ├── eligibility/
    │   ├── ca_scc_general_assistance_age_eligible.py
    │   ├── ca_scc_general_assistance_eligible_person.py
    │   ├── ca_scc_general_assistance_immigration_status_eligible.py
    │   ├── ca_scc_general_assistance_income_eligible.py
    │   └── ca_scc_general_assistance_personal_property_eligible.py
    └── income/
        ├── ca_scc_general_assistance_countable_income.py
        └── ca_scc_general_assistance_countable_income_person.py

policyengine_us/tests/policy/baseline/gov/local/ca/scc/ga/
├── ca_scc_general_assistance.yaml
├── ca_scc_general_assistance_age_eligible.yaml
├── ca_scc_general_assistance_base_amount.yaml
├── ca_scc_general_assistance_countable_income.yaml
├── ca_scc_general_assistance_countable_income_person.yaml
├── ca_scc_general_assistance_eligible_person.yaml
├── ca_scc_general_assistance_immigration_status_eligible.yaml
├── ca_scc_general_assistance_income_eligible.yaml
├── ca_scc_general_assistance_personal_property_eligible.yaml
└── integration.yaml

Test Plan

  • All 77 baseline tests pass locally: policyengine-core test policyengine_us/tests/policy/baseline/gov/local/ca/scc/ -c policyengine_us
  • make format clean
  • CI passes
  • User review

Implementation Notes

  • County abbreviation: scc (parallel to ala for Alameda; follows the 3-letter county-code convention).
  • Reference implementation: policyengine_us/{variables,parameters}/gov/local/ca/ala/ (Alameda County GA).
  • Bug avoided in in_scc.py: Alameda's in_ala.py checks county_str == "Alameda_COUNTY_CA" (mixed case), but county_str.decode_to_str() returns the ALL-UPPERCASE enum member name. Alameda's tests bypass this latent bug by setting in_ala: true directly. SCC's in_scc.py correctly uses "SANTA_CLARA_COUNTY_CA" (all uppercase), matching the working convention in Riverside (riv) and LA (la).
  • Negative-income fix in ca_scc_general_assistance.py: The top-level variable uses an explicit formula(spm_unit, period, parameters) returning base - max_(countable, 0) rather than the typical adds/subtracts pattern. With adds=base and subtracts=countable, a negative countable income (e.g., self-employment losses) would compute base - (-N) = base + N, inflating the benefit far above the MAP. Edge-case tests with $-12K and $-1M SE income caught this; the fix floors countable income at 0 inside the subtraction, capping the benefit at the MAP.

hua7450 and others added 3 commits May 20, 2026 17:03
Starting implementation of Santa Clara County General Assistance.
Documentation and parallel development will follow.

Refs PolicyEngine#8357
Mirrors Alameda County GA structure with SCC-specific values:
- MAP: $343 single, $460 married (effective 2016-04-01, frozen)
- Personal property limit: $500
- 6 qualified immigration statuses

Adds two deviations from the Alameda mirror:
- Shared-housing tiers (15/20/25% reductions per GA 282)
- Expanded countable income to 17 PE sources (Alameda has 6)

Closes PolicyEngine#8357

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

codecov Bot commented May 20, 2026

Codecov Report

❌ Patch coverage is 98.54015% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.54%. Comparing base (289712f) to head (ff78f67).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
...licyengine_us/variables/gov/local/ca/scc/in_scc.py 77.77% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #8358       +/-   ##
===========================================
+ Coverage   70.38%   98.54%   +28.15%     
===========================================
  Files        4791       11     -4780     
  Lines       69837      137    -69700     
  Branches      345        0      -345     
===========================================
- Hits        49153      135    -49018     
+ Misses      20684        2    -20682     
Flag Coverage Δ
unittests 98.54% <98.54%> (+28.15%) ⬆️

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.

- personal_property/limit.yaml: period month -> year (asset stock not flow);
  cleaner template description
- age_threshold.yaml: add Cal. Family Code § 6500 reference (statutory source
  for age-of-majority "18")
- shared_housing/reduction.yaml: add GA-62 PDF as corroborating reference for
  derived percentage tiers
- Currency unit tests: add absolute_error_margin: 0.1 to base_amount,
  countable_income, countable_income_person

All 77 tests still pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

Implement Santa Clara County General Assistance

1 participant