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.rs says "the live 273.2(j) categorical path is the JDM snap-eligibility ruleset".

  • What the orchestrator sends. It hardcodes is_categorically_eligible: false (services/canopy-eligibility/src/orchestrator.rs, in assemble_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.json has a s-standard-ce switch statement and an expr-standard-ce arm 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_household reads the newest per program. canopy-tanf stores each determination’s assistance unit (#3048) and serves it through POST /v1/determinations/family-composition:batchGet (canopy_contracts_tanf::paths::BATCH_FAMILY_COMPOSITION, system callers only). That endpoint gives per member FamilyMember.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 members needs_solq_for selects (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.adoc records 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 on as_of and its assistance unit) and SSI fact (SOLQ). These go on the program-agnostic context as MemberContext.receives_tanf_cash and receives_ssi. A fact canopy cannot determine is None.

  • canopy-snap. The count of counted members (after the work-sanction exclusion) with either fact Some(true), as input.members_receiving_pa_or_ssi. It is frozen in the snapshot’s program_input for replay.

  • Decisions. All four packs' snap-eligibility.json route a household whose count equals household_size to the existing standard-CE arm, ahead of BBCE.

  • Operator signal. When a fact is None for 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.

  1. Take the household’s newest tanf row from store::list_latest_determinations_by_household. It is in force when:

    • status is approved;

    • effective_date ⇐ as_of;

    • expiration_date is null or > as_of.

    No row in force gives Some(false) for every member.

  2. Otherwise call canopy-tanf’s BATCH_FAMILY_COMPOSITION with [determination_id] and as_of's month. Reuse the system-bearer client the orchestrator already holds for canopy-tanf, and the read deadline assignments::LOOKUP_DEADLINE.

  3. Each member in the response with receives_assistance: true gets Some(true). Every other household member gets Some(false).

  4. An absent composition (a determination recorded before #3048), a transport error, a non-2xx or a deadline gives None for every member.

  5. 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 only MemberContext (age and disability_status), and income lives on ApplicationContext.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 type ssi naming that member’s person_id. That record only triggers the lookup; receives_ssi comes from SOLQ alone, never from the self-reported record (U1 pins this: a member with an ssi income record and a SOLQ record saying ssi_active: false gets Some(false)).

  • receives_ssi comes from the fetched record:

    • Some(record.ssi_active) when a record exists;

    • None when the member was not selected or the fetch failed (fetch_ssa_solq already returns None).

  • 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, and security.adoc gets 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.members whose receives_tanf_cash == Some(true) or receives_ssi == Some(true).

  • Who is left out: a member the work-sanction exclusion counts out (WorkSanctionExclusion::excluded()'s person ids, the same exclusion that reduces household_size, #3219). Members' facts are therefore compared over the same counted set as household_size.

  • Aggregation only, no eligibility logic (#1160). The new key joins snap_eligibility_input_keys() (the input-sync test) and the snapshot program_input.

  • Replay. ApplicationContext carries no such count, and the member facts are not frozen in MemberLeaf, so a recompute cannot re-derive it. The count is frozen as its own program_input field and carried the way the work-sanction exclusion is: context_assembly gains frozen.members_receiving_pa_or_ssi: Option<u32> beside FrozenExclusion, build_recompute_context reads it from the stored input, and build_rules_input takes 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_figure rule (7 CFR 273.10(e)(2)(ii)©).

  • No failure code is added, so the_snap_rulesets_agree_on_the_failure_codes is unaffected.

  • Each decision’s version is bumped and its _comment notes 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 whose receives_tanf_cash and receives_ssi are both None while neither is Some(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 no metrics.rs today; 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 a OnceLock).

  • The signal reaches the worker in the signed envelope (corrected 2026-11-09, maintainer direction; U3 had not started). canopy-snap's POST /v1/determine answers 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_if empty, so every envelope without one keeps its RFC 8785 bytes and its signature. DeterminationAdvisory has 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 advisories column on program_determinations) and carries it on ProgramResult.advisories and 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.

  1. 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.

  2. 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.

  3. 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 ssi income 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 None, so a household that is in fact all-TANF or all-SSI is scored on the regular tests and may be denied though eligible.

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 snap_ce_facts_unknown_total, and warns the worker to re-run. Tests:

* U1: a canopy-tanf 503 or a deadline gives None for every member, and the determination still dispatches. * U3: a denied household with an unknown member records it and increments the counter; an approved one records nothing.

A stale prior TANF determination: canopy-tanf has closed the case, but canopy-eligibility’s newest tanf row is still approved with an open window.

silent

A closure is itself a signed TANF determination (a new program_determinations row), so "newest" is the closed one. The window check excludes an expired row. Residual: a closure decided but not yet recorded. Tests (U1):

* the newest row denied gives Some(false); * an approved row with expiration_date ⇐ as_of gives Some(false); * two rows, older approved and newer closed, give Some(false).

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 household_size is the counted size. The work-sanction exclusion is applied in the same filter. Test (U2): a household of 3 with one sanctioned member and two SSI members counts 2 of 2 and is standard CE; the same household with one SSI member counts 1 of 2 and is not. The future alien exclusion (#801) is named at the seam and in Out of scope.

A member’s TANF fact reads true from a unit whose determination covers another household’s members (a person in two households).

silent

The facts are joined by person_id to this request’s members only; a unit member not in the request is ignored. Test (U1): a unit naming an extra person sets no fact for anyone outside the request.

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 _comment.

A replay recomputes the count from today’s facts and diverges from the signed verdict.

fail-closed

The count is frozen in program_input, and the recompute reads it back. Test (U2), mirroring a_recompute_replays_the_recorded_exclusion: the replay context carries the recorded count and scores the original verdict.

More SSA SOLQ traffic (Pub 1075 §5.5.1) on SNAP-only runs.

silent

Bounded by needs_solq_for (age 65+, disability, or an ssi income record). security.adoc names the purpose. Test (U1): a SNAP-only request fetches SOLQ for a selected member and none for an unselected one.

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 before assemble_application_context)

  • services/canopy-eligibility/src/store/mod.rs (reuse list_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_for selects on an ssi income record naming the member, and not on one naming another member;

    • an ssi income record with a SOLQ record saying ssi_active: false gives receives_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 marked receives_tanf_cash: true. A canopy-tanf mock returning 503 still dispatches, with None.

  • 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.rs does:

    • 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_input and build_recompute_context.

  • Gates: the_snap_rulesets_agree_on_the_failure_codes stays 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::build call (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_unknown in program_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 None fact;

    • 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/ (the advisories column)

  • 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

  1. cargo xtask test: the unit and integration lanes pass (see Testing).

  2. cargo xtask dev reload, then cargo xtask e2e.

  3. 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.

  4. cargo xtask rules check, cargo xtask policy audit, the ADR-011 ruleset lint and the neutrality lint are clean, and cargo xtask quality-budgets holds.

  5. 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: the snap-eligibility input members_receiving_pa_or_ssi and the standard-CE condition, beside [#snap-bbce].

  • api/canopy-eligibility.adoc and data-models where MemberContext is described; api/canopy-snap.adoc (U3’s ce_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 s-bbce-pack and bbce_tests.rs, which only !2010 (#3303) brings. Fixed: the Prerequisite paragraph (U2 waits on !2010).

2

google

gemini-4-argon

FLAGS (P2): the same prerequisite; needs_solq_for sees no income; replay had no carrier for the count; canopy-web never loads program_input. Fixed: needs_solq_for takes the income records, the count is frozen like the work-sanction exclusion, and the signal travels as a typed ProgramResult.advisories entry (U3 now w3).

Edit this page · default