Add Marin County, CA General Relief program#8583
Open
hua7450 wants to merge 11 commits into
Open
Conversation
Scaffolds the branch for implementing Marin County, CA General Relief (General Assistance) under California Welfare and Institutions Code 17000. Closes PolicyEngine#8582 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Post-2025-07-01 version: flat two-tier grant ($387 single / $636 couple) minus net countable income, with liquid-asset, personal-property, age, immigration, and SSI-ineligibility eligibility tests. Local program under gov/local/ca/marin/general_relief, un-wired (matches LA/Riverside). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8583 +/- ##
============================================
+ Coverage 77.77% 100.00% +22.22%
============================================
Files 1 13 +12
Lines 9 169 +160
============================================
+ Hits 7 169 +162
+ Misses 2 0 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
- Add non-Marin $0 end-to-end test (exercises defined_for=in_marin), plus couple over-asset and personal-property-fail integration cases. - Document couple-grant assumption (max_grant) and net-income applicant/ recipient simplification (income_eligible). No logic changes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Apply the July 1, 2025 liquid-asset limit increase by month: the limit and eligibility variables are now month-defined, so $400/$800 takes effect from that month instead of being masked by the January value of a year-defined parameter lookup (the $200/$400 -> $400/$800 transition). - Restrict the immigration-status check to the applicant (tax-unit head or spouse) per Standards Section II.E, so a dependent's qualifying status no longer makes the unit eligible. - Use spm_unit_is_married for couple detection in the grant and resource limits. - Cite Standards of Aid Section II.H for the liquid-asset parameters. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…into ca-marin-gr
…-income conversion - personal_property_limit/_eligible: definition_period YEAR -> MONTH, reading the year-defined is_married flag and personal_property stock via period.this_year (consistent with the liquid-asset pair and the rest of the eligibility chain); dedicated tests moved to period 2026-01. - base_amount/income_eligible: read net_income at the monthly period so the engine auto-divides the annual figure, instead of period.this_year / MONTHS_IN_YEAR. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…into ca-marin-gr
Families with minor children are served by CalWORKs, not General Relief. The Standards exclude them not via a demographic gate but through the program-of- last-resort mechanism: applicants must pursue all potentially available income (Sec II.B / II.Q), and CalWORKs recipients with children on the cash allowance are barred (Sec II.L). Model this by counting CalWORKs (ca_tanf) as unit-level unearned income in ca_marin_general_relief_net_income, so a family receiving CalWORKs above the grant is income-ineligible. A family not receiving CalWORKs cash can still qualify, matching Sec II.L (no hard no-dependents gate). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Collapse the base_amount pass-through into ca_marin_general_relief and the immigration any() wrapper into ca_marin_general_relief_eligible (inlined), removing two single-purpose variables and their tests. - Document the single-rate assumption for mixed-status couples in max_grant (Standards are silent; eligible spouse aided at the single rate, ineligible spouse's income still counted) and note that GR+CAPI overlap is already prevented by the immigration eligibility check. - Rewrite integration tests so SSI and CalWORKs (ca_tanf) are computed by the model and asserted as outputs (a real aged SSI recipient; a real CalWORKs family) rather than stubbed as inputs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The CalWORKs-as-income approach only excluded families on CalWORKs, missing dependent households that are CalWORKs-ineligible for non-income reasons (e.g. a vehicle over the CalWORKs limit, which leaves ca_tanf = 0 yet still pays GR). Replace it with an explicit no-dependents gate: a unit containing a dependent child (a tax-unit dependent under 18) is ineligible, per Marin HHS's adults-without-dependent-children rule. Tax-dependency approximates the >=50% custody rule. Remove the now-redundant ca_tanf term from net income (any CalWORKs recipient has a dependent child and is caught by the gate). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
Implements California Marin County General Relief (GR) in PolicyEngine — a county-funded and county-administered cash-aid (loan) program of last resort, mandated statewide by CA Welfare & Institutions Code §17000 et seq. and operated by the Marin County Department of Health & Human Services under Board-approved Program Policies and Standards.
This models the post-July-1-2025 version of the program. The July 1, 2025 reform raised liquid-asset limits and eliminated Income-in-Kind reductions and work-requirement sanctions; all parameters are effective
2025-07-01(single era).The program is implemented as a local program at
gov/local/ca/marin/general_reliefand is intentionally left un-wired into household-level benefit aggregators, matching the existing LA County and Riverside County General Relief implementations (both of which exist as standalone SPMUnit variables and are not wired into any household aggregator).Closes #8582
Regulatory Authority
Program Overview
Eligibility Tests
in_marin=county_str == "MARIN_COUNTY_CA"; all GR variables chaindefined_for = "in_marin"age_head >= 18(parametereligibility/age_threshold.yaml). Married/emancipated-under-18 exception not modeled (rare).immigration_status(qualified-status list parameter) checked only for the tax-unit head or spouse (the applicant); the unit is eligible if ≥ 1 such applicant qualifies. PRUCOL approximated (see Not Modeled).spm_unit_cash_assets <= where(married, $800, $400); the limit is evaluated monthly so the 2025-07-01 increase applies mid-yearadd(spm_unit, period, ["personal_property"]) <= where(married, $1,200, $600)<=monthly max grant. The brochure phrases the limit as "not higher than," so the at-or-below boundary is inclusive (<=).ssi > 0is_tax_unit_dependent & is_child). Tax-dependency approximates ≥50% custody; the married/emancipated-under-18 exception is not modeled.The top-level
ca_marin_general_relief_eligible(SPMUnit, MONTH) ANDs all of the above sub-tests.Income
ca_marin_general_relief_gross_income, Person) sums anincome_sourceslist parameter — earned income, self-employment income, unemployment compensation, state disability insurance, veterans' benefits, and Social Security. SSI is excluded from the list because SSI recipients are categorically ineligible (including it would be moot and could mask the categorical bar).ca_marin_general_relief_net_income, SPMUnit) =max(gross income − mandatory withholdings, 0), usingspm_unit_paycheck_withholdings(FICA = Social Security + Medicare, plus federal and state income tax). The Standards allow mandatory deductions only — there is no general earned-income disregard.ca_tanf) to net income to exclude families with children, but that only caught families on CalWORKs and missed dependent households CalWORKs-ineligible for non-income reasons (e.g. an over-limit vehicle leavesca_tanf = 0). Families with children are now excluded directly by the no-dependent-children eligibility gate (see Eligibility), so CalWORKs is not added to income.ssi > 0); CalWORKs recipients have dependent children and are excluded by the no-dependents gate; CAPI (California's SSI-equivalent for immigrants) needs no separate check — CAPI recipients are non-qualified noncitizens who fail the GR citizenship requirement, so the immigration test already prevents any GR+CAPI overlap.spm_unit_paycheck_withholdingsdoes not include the employee SDI/UI contributions, which the Standards also list as mandatory deductions. We don't subtract SDI/UI at the moment (matches the LA County GR proxy). The net-income floor at 0 is applied insideca_marin_general_relief_net_income; the income test and benefit subtraction read net income at the monthly period, so PolicyEngine auto-divides the annual figure by 12 (no explicit ÷ 12 in the formula).<=— a household with net income exactly equal to the grant is income-eligible (and receives a $0 partial grant).Benefit Calculation
defined_forhalf-benefit trap).max(max grant − monthly net countable income, 0), computed directly in the top-levelca_marin_general_relief(MONTH).Requirements Coverage
in_marinin_marin.yamlca_marin_general_relief_eligibleeligibility/ca_marin_general_relief_eligible.yaml(7 cases)eligibility/age_threshold.yaml(18)ca_marin_general_relief_age_eligibleeligibility/ca_marin_general_relief_age_eligible.yamlqualified_immigration_status.yaml..._immigration_status_eligible_person..._immigration_status_eligible_person.yaml(8 cases)any()in..._eligibleeligibility/limit/liquid_assets/{single,married}.yaml..._liquid_asset_limit,..._liquid_asset_eligible..._liquid_asset_limit.yaml,..._liquid_asset_eligible.yamleligibility/limit/personal_property/{single,married}.yaml..._personal_property_limit,..._personal_property_eligible..._personal_property_limit.yaml,..._personal_property_eligible.yamlincome_sources.yaml..._gross_income..._net_incomeincome/ca_marin_general_relief_net_income.yaml(5 cases incl. floor)<=)..._income_eligibleeligibility/ca_marin_general_relief_income_eligible.yaml(6 cases incl. boundary)..._eligible:~(ssi > 0))..._eligible.yaml+ integration Case 6amount/{single,married}.yaml(387 / 636)ca_marin_general_relief,..._max_grant..._max_grant.yaml(3),integration.yaml(22 cases)qualified_immigration_status.yaml..._immigration_status_eligible_person..._immigration_status_eligible_person.yamlis_tax_unit_dependent & is_child) in..._eligible..._eligible.yaml(dependent-child case) + integration Case 2215 in-scope requirements (REQ-001..014 + REQ-019). Coverage is ~100% of in-scope requirements.
Not Modeled (by design)
spm_unit_paycheck_withholdingscovers FICA + income tax but not SDI/UI; we don't subtract SDI/UI at the moment (matches LA County GR)Files Added
9 parameters, 13 variables, 12 test files (74 YAML tests passing), plus the changelog fragment.
Test plan
policyengine-core test policyengine_us/tests/policy/baseline/gov/local/ca/marin/ -c policyengine_us)Microsimulation()and a synthetic mixed population with no exceptions (verifies vectorized county-string comparison, immigration-listnp.isin, and YEAR/MONTH period mixing)ca_tanf) from the model and assert them as outputs (no stubbed benefit inputs)make formatclean