Plan: Standard categorical eligibility for SNAP — the SSI and TANF-cash facts reach the decision (#3310)
Status: Done (2026-11-09) — U1–U3 shipped; SNAP counts standard categorical eligibility from each member's TANF-cash and SSI facts, and a denial an unknown fact could have turned tells the worker
Epic: none
Issues: #3310 (parent) · #3322 U1 (w3) · #3323 U2 (w3) · #3324 U3 (w5, two MRs; U3b closes it); each unit’s MR Closes its issue, U3 closes the parent. Out of scope, filed: #3317 re-determine SNAP when TANF approves, #3309 the (j)(2)(vii) bars
Branches: feat/snap-ce-member-facts, fix/snap-standard-ce-decision, feat/snap-ce-unknown-signal, feat/snap-ce-advisory-worker
This is a Design + Scope plan: GitLab owns tracking, the child issues carry the implementer brief, and the plan freezes when U1 starts. Researched and drafted by the canopy-config-federal agent (its notes/3310-standard-ce.adoc).
Prerequisite. The plan is read against the head of !2013 (e97e02771), which stacks on !2010 (#3303, the pack’s BBCE election). U2 edits the decision #3303 reshapes (s-bbce-pack, context.thresholds.bbce_*) and follows its in-process test pattern (services/canopy-snap/src/determine/bbce_tests.rs). Until !2010 merges, those names are not on main: U1 may start, U2 may not.
Erratum (2026-11-07): receives_ssi is Some(false), not None, for a member needs_solq_for does not select, since SSI requires age 65 or over, blindness or disability (20 CFR 416.202) and an unselected member cannot be a recipient; None means only that a lookup was attempted and failed.
Erratum (2026-11-07): U3 records a counted member in ce_facts_unknown when neither fact is Some(true) and at least one is None, and only when the household would be standard CE had every such member been Some(true); snap_ce_facts_unknown_total increments once per None fact.
Erratum (2026-11-07): the replay carrier is each counted member's two facts, not the count: program_input freezes them per person_id, build_recompute_context restores them onto ApplicationMember, and build_rules_input recounts identically, so ApplicationContext gains no field.
Erratum (2026-11-09), U1: the facts live in a new services/canopy-eligibility/src/member_facts.rs (with member_facts_tests.rs), not in orchestrator.rs. Reading the grant needed canopy-eligibility as a system caller of canopy-tanf's POST /v1/determinations/family-composition:batchGet (canopy-tanf's system-caller table and the call graph's onward delegation), which the Files list omitted, and the two new MemberContext fields regenerate the canopy-snap and canopy-tanf OpenAPI snapshots.
Erratum (2026-11-09), U2: the count lives in a new services/canopy-snap/src/standard_ce.rs. evaluate_verdict and dry_run_determine take the work-sanction exclusion (CountedMembers) in place of an all-sanctioned flag, so the live verdict, each priced back-dated month and the dry-run count over the same members; a replay excludes no one by id, since the frozen facts already leave the excluded members out.
Erratum (2026-11-09), U3: the two MRs ship in the other order. U3a carries the envelope field and canopy-eligibility's storage, verifier-tolerant first, so no emitted advisory meets a verifier that refuses it; U3b carries canopy-snap's emission and metric, the relay on ProgramResult and the determination list, and canopy-web's warning. DeterminationAdvisory lives in canopy_common::advisory (re-exported by canopy-signing), since the contract crates do not depend on canopy-signing. The warning names the members, from a persons batch read, instead of counting them.
Context
The rule. A household is categorically eligible for SNAP when all of its members receive, or are authorized to receive, TANF or MOE cash, SSI, or a mix of the two. The citations are 7 CFR 273.2(j)(2)(i)(A) and (E), as read in the eCFR on 2026-11-05. Such a household does not meet the gross or net income standards (273.9(a)) or the resource limit (273.8). Three clarifications from the regulation:
-
Authorized to receive means determined eligible and notified, even if the benefit is not yet paid, is suspended or recouped, or is below the minimum j)(2)(iv.
-
Excluded people are not members. A person the household excludes is not a member for this test j)(2)(ix: an ineligible alien, an ineligible student, an SSI cash-out recipient, a person in a nonexempt institution, or a person ineligible under 273.7’s work rules.
-
Bars. Under no circumstances is a household categorically eligible when a (j)(2)(vii) bar applies (#3309).
Today nothing sets it.
-
The field nobody fills.
ApplicationContext.categorical_eligibility_type(crates/canopy-contracts-snap/src/determine.rs) is documented as set by "canopy-snap’s categorical module". #1160 deleted that module:services/canopy-snap/src/categorical.rssays "the live 273.2(j) categorical path is the JDMsnap-eligibilityruleset". -
What the orchestrator sends. It hardcodes
is_categorically_eligible: false(services/canopy-eligibility/src/orchestrator.rs, inassemble_application_context, line 740), and canopy-snap’s#[serde(default = "default_ce_type")]gives"none"on every dispatch. -
The arm that never runs. Every pack’s
snap-eligibility.jsonhas as-standard-ceswitch statement and anexpr-standard-cearm that bypass the three tests, and neither ever runs. An all-SSI or all-TANF household is held to limits it is exempt from.
Where the facts already are.
-
canopy-enrollment does not hold them. It holds SNAP enrollments only:
LiveEnrollmentView { enrollment: Option<SnapEnrollment> }. -
TANF cash. canopy-eligibility records every signed TANF determination in
program_determinations;store::list_latest_determinations_by_householdreads the newest per program. canopy-tanf stores each determination’s assistance unit (#3048) and serves it throughPOST /v1/determinations/family-composition:batchGet(canopy_contracts_tanf::paths::BATCH_FAMILY_COMPOSITION, system callers only). That endpoint gives per memberFamilyMember.receives_assistance: included in the grant. -
SSI. canopy-eligibility fetches an SSA SOLQ record per member (
fetch_ssa_solq,SolqRecord.ssi_active). It does so only when a Medicaid or CHIP program is requested, and only for membersneeds_solq_forselects (age 65 or over, or a recorded disability).
Related.
-
#3303 added the pack’s BBCE election to the same decision:
s-bbce-pack,context.thresholds.bbce_*. -
The design note
canopy-config-federal/notes/3310-standard-ce.adocrecords the sourcing analysis.
Scope
In scope:
-
Producer, canopy-eligibility. For a request naming
snap, each member’s TANF-cash fact (the household’s TANF determination in force onas_ofand its assistance unit) and SSI fact (SOLQ). These go on the program-agnostic context asMemberContext.receives_tanf_cashandreceives_ssi. A fact canopy cannot determine isNone. -
canopy-snap. The count of counted members (after the work-sanction exclusion) with either fact
Some(true), asinput.members_receiving_pa_or_ssi. It is frozen in the snapshot’sprogram_inputfor replay. -
Decisions. All four packs'
snap-eligibility.jsonroute a household whose count equalshousehold_sizeto the existing standard-CE arm, ahead of BBCE. -
Operator signal. When a fact is
Nonefor a member who might confer standard CE, the determination records why, a metric counts it, the result carries a typed advisory through canopy-eligibility to the application’s program row, and the case view flags it.
Out of scope (issues filed at approval):
-
Same-run TANF approval: re-determining SNAP when TANF approves, and holding a would-be denial as a 273.2(j)(1)(iv) postponement. That is #3317; see Alternatives considered.
-
The (j)(2)(vii) bars: #3309. Until it lands, a barred household with all members on TANF or SSI is routed to standard CE, the same gap BBCE has today.
-
GA. canopy has no GA program and Georgia operates none. A pack with a qualifying 273.2(j)(4) GA program would add a third member fact.
-
Whole-household institutionalization ((j)(2)(i) preamble). canopy has no SNAP institution model.
-
A TANF program not funded by IV-A or MOE. A pack election if a State runs one; Georgia’s TANF is IV-A.
-
Ineligible-alien exclusion. Once #3306 fills alien inputs and #801 excludes ineligible members, the count must skip them too (U2 names the seam).
Design
The producer contract (U1)
MemberContext (crates/canopy-contracts-eligibility/src/determine.rs) and its SNAP mirror canopy_common::household::ApplicationMember gain two fields, both #[serde(default, skip_serializing_if = "Option::is_none")]:
/// Whether the member receives or is authorized to receive TANF (IV-A / MOE) cash on the
/// determination's `as_of` (7 CFR 273.2(j)(2)(i)(A), (iv)): included in the grant of the
/// household's approved TANF determination in force that day. `Some(false)`: no TANF
/// determination is in force, or the member is not in its grant. `None`: canopy could not
/// tell (a failed read).
pub receives_tanf_cash: Option<bool>,
/// Whether SSA's SOLQ shows the member's SSI active on lookup (273.2(j)(2)(i)(E)).
/// `Some(false)`: a SOLQ record says not active. `None`: no SOLQ was fetched for the member,
/// or the lookup failed.
pub receives_ssi: Option<bool>,
canopy_common::household::ApplicationMember is what canopy-snap deserializes context.members into. Mirroring the two fields there keeps canopy-snap typed.
TANF read (services/canopy-eligibility/src/orchestrator.rs, new fn tanf_cash_members). It runs only when the request names snap, beside the SOLQ fan-out.
-
Take the household’s newest
tanfrow fromstore::list_latest_determinations_by_household. It is in force when:-
statusisapproved; -
effective_date ⇐ as_of; -
expiration_dateis null or> as_of.
No row in force gives
Some(false)for every member. -
-
Otherwise call canopy-tanf’s
BATCH_FAMILY_COMPOSITIONwith[determination_id]andas_of's month. Reuse the system-bearer client the orchestrator already holds for canopy-tanf, and the read deadlineassignments::LOOKUP_DEADLINE. -
Each member in the response with
receives_assistance: truegetsSome(true). Every other household member getsSome(false). -
An absent composition (a determination recorded before #3048), a transport error, a non-2xx or a deadline gives
Nonefor every member. -
A failed read never refuses the determination. It is advisory, unlike the D3 enrollment reads. The household is then scored without standard CE (see Risks).
SSI read.
-
The SOLQ fan-out also runs when the request names
snap, not only Medicaid or CHIP. -
needs_solq_for(member)reads onlyMemberContext(age anddisability_status), and income lives onApplicationContext.income, not on the member. It gains a second argument, the application’s income records, and also selects a member who has an income record of typessinaming that member’sperson_id. That record only triggers the lookup;receives_ssicomes from SOLQ alone, never from the self-reported record (U1 pins this: a member with anssiincome record and a SOLQ record sayingssi_active: falsegetsSome(false)). -
receives_ssicomes from the fetched record:-
Some(record.ssi_active)when a record exists; -
Nonewhen the member was not selected or the fetch failed (fetch_ssa_solqalready returnsNone).
-
-
The SOLQ map stays on the context as today, so canopy-medicaid is unaffected.
-
Pub 1075 note. This adds SSA traffic for SNAP-only runs. It is bounded by
needs_solq_for, andsecurity.adocgets a line naming the new purpose.
Determinism. Both facts are set in assemble_application_context's caller before the context is cloned per program. The dry-run path (assemble_application_context is shared) takes the same inputs, from the stored snapshot on replay (U2).
The count and the decision (U2)
canopy-snap (services/canopy-snap/src/determine.rs build_rules_input) adds:
"members_receiving_pa_or_ssi": <count>
-
What is counted:
context.memberswhosereceives_tanf_cash == Some(true)orreceives_ssi == Some(true). -
Who is left out: a member the work-sanction exclusion counts out (
WorkSanctionExclusion::excluded()'s person ids, the same exclusion that reduceshousehold_size, #3219). Members' facts are therefore compared over the same counted set ashousehold_size. -
Aggregation only, no eligibility logic (#1160). The new key joins
snap_eligibility_input_keys()(the input-sync test) and the snapshotprogram_input. -
Replay.
ApplicationContextcarries no such count, and the member facts are not frozen inMemberLeaf, so a recompute cannot re-derive it. The count is frozen as its ownprogram_inputfield and carried the way the work-sanction exclusion is:context_assemblygainsfrozen.members_receiving_pa_or_ssi: Option<u32>besideFrozenExclusion,build_recompute_contextreads it from the stored input, andbuild_rules_inputtakes the count from the frozen value when one is present and from the members otherwise. A stored input without the field (recorded before U2) replays with the count absent, which the decision reads as 0, so an old verdict replays as it was scored. -
Seam for #801. A future alien exclusion skips its members in the same filter.
Decisions (all four packs: rulesets/georgia, fixtures/config/{default,test-max,test-min}, snap-eligibility.json). The first switch statement becomes:
{"id": "s-standard-ce", "condition": "input.categorical_eligibility_type == 'standard' or (input.household_size > 0 and input.members_receiving_pa_or_ssi == input.household_size)"}
-
It stays first, so it is tested before #3303’s
s-bbce-pack. Standard CE is the more complete exemption, and a household meeting both takes it. -
The arm is unchanged: no gross, asset or net test.
-
The benefit is still computed from net income: the 1–2 person minimum applies, and a 3+ household computed at $0 is an eligible $0 under canopy’s existing
month_figurerule (7 CFR 273.10(e)(2)(ii)©). -
No failure code is added, so
the_snap_rulesets_agree_on_the_failure_codesis unaffected. -
Each decision’s
versionis bumped and its_commentnotes the condition. -
The edit is federal, so all four packs take it (unlike #3303’s BBCE switch, which only georgia and default carry).
The operator signal (U3)
A None fact makes the household lose a possible exemption without anyone being told. U3 makes that visible:
-
canopy-snap records, beside the count in
program_input,ce_facts_unknown: [person_id…]: the counted members whosereceives_tanf_cashandreceives_ssiare bothNonewhile neither isSome(true). It records this only when the household is not standard CE and is denied. That is exactly the case where an unknown could have changed the verdict. -
canopy-snap also exposes a counter,
snap_ce_facts_unknown_total{fact="tanf"|"ssi"}, incremented per member per affected determination. canopy-snap has nometrics.rstoday; U3 adds one on canopy-eligibility’s pattern (services/canopy-eligibility/src/metrics.rs: instruments built once off the global OTEL meter and cached in aOnceLock). -
The signal reaches the worker in the signed envelope (corrected 2026-11-09, maintainer direction; U3 had not started). canopy-snap's
POST /v1/determineanswers with the shared signed envelope,canopy_signing::SignableDetermination, not a SNAP response type, and the worker's determination tab reads canopy-eligibility's determination list, not canopy-applications' program row. So:-
The envelope gains
advisories: Vec<DeterminationAdvisory>,skip_serializing_ifempty, so every envelope without one keeps its RFC 8785 bytes and its signature.DeterminationAdvisoryhas one typed variant,CeFactsUnknown { person_ids }. canopy-snap sets it before signing, so the signature covers it. -
canopy-eligibility persists it with the determination (a nullable
advisoriescolumn onprogram_determinations) and carries it onProgramResult.advisoriesand on its determination list (GET /v1/eligibility/determinations). -
canopy-applications does not persist it: nothing reads it there.
-
-
canopy-web's determination tab shows a warning on a SNAP determination carrying the advisory: "Categorical eligibility could not be checked for N member(s): the TANF or SSI record was unavailable. Re-run the determination."
Alternatives considered
How SNAP learns of a TANF approval in the same request. canopy-eligibility dispatches a request’s programs concurrently (buffer_unordered), so on a joint application SNAP’s context exists before TANF’s verdict.
-
Order the dispatch: TANF first, then assemble SNAP’s context. Rejected for now. Every joint request’s latency would wait on TANF, and the order ledger’s per-program retry and settle matrix (
settle_matrix.rs) assume independent dispatch. -
Re-determine SNAP when TANF approves, holding a would-be denial as a 273.2(j)(1)(iv) postponement. This is the regulation’s own shape: postpone denying a potentially CE household to day 30, and pay from the original application date. It needs the cross-program trigger machinery (#776) and a held-verdict state. Filed as #3317, not in this plan.
-
Score on the prior TANF determination in force: the design. It is correct for an ongoing TANF household, which is the common CE case, and needs no orchestration change. A new joint applicant is scored without CE until #3317.
Where the facts come from.
-
canopy-enrollment was considered and rejected: it holds SNAP enrollments only.
-
A self-reported
ssiincome record was rejected as the SSI fact: (j)(2)(v) deems the eligibility factors for verified recipients. It triggers the SOLQ lookup instead.
Where the rule lives. A Rust classifier setting categorical_eligibility_type was rejected, per #1160. canopy-snap counts, and the decision decides.
Risks
| Risk | Class | Mitigation and the test that pins it |
|---|---|---|
A failed TANF or SSI read yields |
fail-closed |
The read failing never approves anyone wrongly. The operator signal (U3) names the members and the fact in the stored program input, counts it in * U1: a canopy-tanf 503 or a deadline gives |
A stale prior TANF determination: canopy-tanf has closed the case, but canopy-eligibility’s newest |
silent |
A closure is itself a signed TANF determination (a new * the newest row |
A member the household excludes j)(2)(ix is counted toward "all members", either making a household CE that is not, or failing one that is. |
silent |
The count runs over the counted members only, and |
A member’s TANF fact reads |
silent |
The facts are joined by |
A barred household j)(2)(vii is routed to standard CE. |
silent |
Known gap, #3309; the same gap BBCE has. It is recorded in Out of scope and in the decision’s |
A replay recomputes the count from today’s facts and diverges from the signed verdict. |
fail-closed |
The count is frozen in |
More SSA SOLQ traffic (Pub 1075 §5.5.1) on SNAP-only runs. |
silent |
Bounded by |
Units (weights by complexity) — U1 → U2 → U3
Weights: 1 trivial · 2 small · 3 medium · 5 large · 8 very large. One unit = one independently shippable MR = one child issue.
U1 (w3) — The member facts: TANF cash and SSI on the context
Files:
-
crates/canopy-contracts-eligibility/src/determine.rs(MemberContext) -
crates/canopy-common/src/household.rs(ApplicationMember) -
services/canopy-eligibility/src/orchestrator.rs(tanf_cash_members,needs_solq_for, the SOLQ fan-out’s condition, setting both fields beforeassemble_application_context) -
services/canopy-eligibility/src/store/mod.rs(reuselist_latest_determinations_by_household) -
crates/canopy-contracts-eligibility/tests/roundtrip.rs -
docs/modules/ROOT/pages/security.adoc
Change: as Design › The producer contract. canopy-snap ignores the fields until U2, so the unit ships alone.
Tests.
-
Unit (orchestrator):
-
each case of the TANF read: in force with a unit; newest denied; expired; no row; absent composition; canopy-tanf 503; deadline;
-
a unit member outside the request is ignored;
-
needs_solq_forselects on anssiincome record naming the member, and not on one naming another member; -
an
ssiincome record with a SOLQ record sayingssi_active: falsegivesreceives_ssi: Some(false)(the record triggers, never decides).
-
-
Integration (
services/canopy-eligibility/tests/): a SNAP request for a household with an approved TANF determination dispatches members markedreceives_tanf_cash: true. A canopy-tanf mock returning 503 still dispatches, withNone. -
Contract: roundtrip proptest over the two optional fields; an older body without them deserializes.
U2 (w3) — The count and the decision
Files:
-
services/canopy-snap/src/determine.rs(build_rules_input,snap_eligibility_input_keys,snap_program_input) -
services/canopy-snap/src/context_assembly.rs(the frozen count on replay) -
rulesets/georgia/snap-eligibility.json -
fixtures/config/default/snap-eligibility.json -
fixtures/config/test-max/snap-eligibility.json -
fixtures/config/test-min/snap-eligibility.json -
a new
services/canopy-snap/src/determine/standard_ce_tests.rs
Change: as Design › The count and the decision.
Tests.
-
In process, evaluating georgia’s table as
bbce_tests.rsdoes:-
an all-SSI household of 2 over the 130 % gross limit is approved through standard CE (basis
bypassed_standard_categorical_eligibility); -
one SSI and one non-recipient member: not CE, so the regular tests apply;
-
a household meeting both standard CE and BBCE takes standard CE;
-
the sanctioned-member counts in the Risks table.
-
-
Replay: the recorded count round-trips through
program_inputandbuild_recompute_context. -
Gates:
the_snap_rulesets_agree_on_the_failure_codesstays green; the input-sync test covers the new key.
U3 — The operator signal for unknown facts (corrected 2026-11-09: two MRs on #3324)
U3a — the signal in canopy-snap and in the envelope.
Files:
-
crates/canopy-signing/src/envelope.rs(SignableDetermination.advisories,DeterminationAdvisory, the builder field) -
every program service's
SignableDetermination::buildcall (the new field, empty) -
services/canopy-snap/src/standard_ce.rs(the unknown members, per the 2026-11-07 erratum) -
services/canopy-snap/src/determine.rs(ce_facts_unknowninprogram_input; the advisory on the envelope) -
services/canopy-snap/src/metrics.rs(new, on canopy-eligibility's pattern) -
docs/modules/ROOT/pages/api/canopy-snap.adoc
Tests.
-
Unit:
-
a denied household that would be standard CE had its unknown members been recipients records them and counts once per
Nonefact; -
an approved household, one with a
Some(false)member, and one that would still not be CE record nothing.
-
-
Contract:
-
an envelope without advisories serializes to the canonical bytes it had before, and its signature verifies;
-
one with an advisory round-trips and verifies.
-
U3b — persisted by canopy-eligibility and shown to the worker.
Files:
-
services/canopy-eligibility/migrations/(theadvisoriescolumn) -
services/canopy-eligibility/src/store/mod.rs,src/orchestrator.rs(persist;ProgramResult.advisories) -
crates/canopy-contracts-eligibility/src/determine.rs -
canopy-eligibility's determination list response
-
services/canopy-web/src/determination_view.rs,templates/cases/tab_determination.html -
docs/modules/ROOT/pages/api/canopy-eligibility.adoc,data-models/canopy-eligibility.adoc
Tests.
-
Integration: a SNAP determination with the advisory is persisted, and is listed with it.
-
canopy-web view test: the warning renders with the member count, and is absent without the advisory.
Verification
-
cargo xtask test: the unit and integration lanes pass (see Testing). -
cargo xtask dev reload, thencargo xtask e2e. -
A devstack walkthrough:
-
a household whose two members are SOLQ-mocked as SSI recipients, at 150 % of the poverty line, is SNAP-approved through standard CE;
-
the same household with the SOLQ mock failing is denied, and the case view shows the warning.
-
-
cargo xtask rules check,cargo xtask policy audit, the ADR-011 ruleset lint and the neutrality lint are clean, andcargo xtask quality-budgetsholds. -
The merge train's pipeline is green.
Documentation Updates
-
federal-requirements.adoc: the 7 CFR 273.2(j) row names the facts, their sources and the count. -
rulesets.adoc: thesnap-eligibilityinputmembers_receiving_pa_or_ssiand the standard-CE condition, beside[#snap-bbce]. -
api/canopy-eligibility.adocanddata-modelswhereMemberContextis described;api/canopy-snap.adoc(U3’sce_facts_unknown). -
security.adoc: SOLQ’s new purpose (U1). -
CHANGELOG.adoc: one entry per unit under== Unreleased.
Review log
| round | vendor | resolved model | verdict |
|---|---|---|---|
1 |
anthropic |
claude-fable-5-1 |
FLAGS (P2): U2 named |
2 |
gemini-4-argon |
FLAGS (P2): the same prerequisite; |