Plan: the SNAP demand letter carries what 7 CFR 273.18(e)(3)(iv) requires (#2228)
Status: Done (2026-11-25) — the letter, its inputs and the pack key delivered in three units
Closes: #2228 (by U3)
Issues: #2228 (parent) · U1 #3566 · U2 #3567 · U3 #3568 · relates to #930, #795, #936, #2242
This is a Design + Scope plan: GitLab owns tracking, the unit issues carry the implementer brief, and the plan freezes when U1 starts.
Problem
snap.overpayment_claimed routes to the pack’s notices/snap/overpayment.typ, the claim’s first demand letter and, under 273.18(e)(3)(iii), its one-time notice of adverse action. The letter prints the amount, the basis tag, a claim reference and the hearing right. OverpaymentClaimedEvent (crates/canopy-contracts-snap/src/recompute.rs) carries nothing else, so the letter cannot print the rest of 273.18(e)(3)(iv):
-
(B) the liable adults, (D) the period, (E) the calculation, (N) a due date: no data reaches the letter.
-
(G), (H), (J), (K), (L), (M): fixed statements the template does not make.
-
Only a recompute claim records a period (
overpayment_recomputes.covered_period_*). The manualPOST /v1/overpayments, the claim anipv.not_establishedevent opens and the claim anappeal.overpayment_assessedevent opens reach canopy-snap with none.
Decisions (maintainer)
-
2026-11-14: liable adults' names are resolved the way other letters resolve recipients (canopy-notices reads canopy-persons at render time; no name rides the bus).
-
2026-11-14: (E) prints "not itemized" for a claim with no itemized sizing.
-
2026-11-24: (N) is printed on every letter. (O) and (P) are printed only when the claim says an allotment reduction is imposed; nothing says so until #930 delivers the reduction.
-
2026-11-24: every SNAP claim carries a period. The manual POST and the IPV referral require it from the worker; canopy-appeals sends the assessment’s window; the letter refuses to render without one.
Federal law (read from the eCFR, title 7 as of 2026-11-20)
-
273.18(a)(4)(i): "Each person who was an adult member of the household when the overpayment or trafficking occurred" is responsible for paying a claim.
-
273.18(e)(3)(iv)(A)-(P): the sixteen statements; (I) gives 90 days to request a hearing; (O) and (P) begin "If allotment reduction is to be imposed".
-
273.18(e)(3)(v): the due date "must be not later than 30 days after the date of the initial written notification or demand letter".
-
273.18(e)(6)(i): a claim awaiting a fair hearing decision is not delinquent.
-
273.18(e)(7)(i): a State may compromise a claim it reasonably determines will not be paid in three years.
Design
The claim’s period
canopy_overpayments::CreateClaimRequest gains period: Option<ClaimPeriod> (first_month, last_month, each a first-of-month date, first_month ⇐ last_month), stored in two nullable columns on overpayment_claims by a new canonical migration stamped into canopy-snap, canopy-tanf and canopy-medicaid (the parity tests in crates/canopy-overpayments/src/lib.rs hold the three copies). TANF and Medicaid pass None: their letters are not this plan’s. Each SNAP path supplies it:
-
Recompute (
recompute_persist.rs):RowBase.startto the month beforeRowBase.end(the window’s end is exclusive). -
Manual POST (
api/overpayments_handler.rs):SnapCreateClaimRequestgains requiredperiod_first_monthandperiod_last_month; a missing or inverted period is a 422. Every caller the compiler and a search find is updated (canopy_test_lib::clients::snap, the e2e helpers, canopy-cli and canopy-web if they call it). -
IPV referral (canopy-appeals):
CreateIpvReferralRequestgains an over-issuance period, required exactly whenoverissuance_amountis present (422 otherwise).ipv_casesgains the two columns with a CHECK that amount and period are present together; the migration fails on a database holding an amount with no period (re-seed, as for the county rule).ipv.not_establishedcarries the period, and canopy-snap refuses the event without it (the delivery is retried, then dead-lettered). -
Appeal assessment (canopy-appeals):
appeal.overpayment_assessedcarries the first and last month of the assessment’s window (cb_assessments.window_start,cessation_date, the whole-month windowassessments.rsalready computes). canopy-snap refuses the event without them. -
Staged claims:
overpayment_claim_screensgains the two columns, so a claim the screen pass establishes later has its period.
The event
OverpaymentClaimedEvent gains period_first_month, period_last_month (required) and months (the recompute’s SizedMonth rows as pre-formatted display rows: month, paid, correct, overpaid; empty for every other path). publish_claim_established and publish_claimed_ack read the period from the claim row, so a re-acknowledged claim prints the same period. No person id beyond the recipient and no name is added.
canopy-notices
A new enrichment arm in worker.rs, beside with_sanctioned_member, runs for overpayment_notice with program snap:
-
Period. Missing or malformed period keys are an error: the item goes onto its retry ladder and no letter is rendered.
-
Liable adults (B). The household roster is read from canopy-persons (
get_household_fullwith an empty projection, so no SSN is opened) as of the period’s first day and as of its last day. A member is liable when at or past[notices].age_of_majorityon the day of a roster they appear in: the first day for the first roster, the last day for the last (MajorityRule, already inrecipient.rs). Someone who was a minor while a member is not named because they came of age after leaving. Their display names are overlaid asliable_adults. An empty result is an error, never a letter naming nobody. The read needs no new admission:delegated::PERSONS_GET_HOUSEHOLDS_ID_FULL(crates/canopy-auth/src/delegated.rs) admits any system caller, and canopy-notices already has its system edge and purpose to canopy-persons (identity_policy/call_graph.rs,CANOPY_NOTICES). The edge’s doc comment, which says the worker resolves recipients and addresses, gains the roster read. -
Due date (N).
notice_date + [notices.claims].repayment_due_days, overlaid asclaim_due_date. The pack key is required whensnapis enabled and canopy-notices refuses to boot without it. The federal layer’ssnap-procedure.jsongainsclaims.demand_due_days_max = 30(with an identical copy infixtures/config/test-federal/), and canopy-notices refuses a pack figure above it or below 1, as it does the hearing-window bounds. canopy-notices does not readsnap-procedure.jsontoday, so the unit adds that read beside thehearing-request-windows.jsonone inconfig.rs; a missing or malformed federal file refuses the boot. -
Calculation (E).
monthsis passed through; the template prints the table, or the pack’s "not itemized" sentence when it is empty.
The rendered map is stored per notice in the insert-only notice_program_data, minus the keys listed in NAMES_A_PERSON (services/canopy-notices/src/program_data_snapshot.rs). That list is fixed, so U3 adds liable_adults to it (3 to 4): without that the adults' names would be stored and could never be removed. An on-demand re-render therefore has no stored names; default_program_data in generator.rs gains placeholders for liable_adults, claim_due_date, the period keys and months, as it has for the letter’s existing keys, and the re-render path resolves the names again through the same arm. The due date a letter printed stays on record in the snapshot. Nothing reads it yet; delinquency (273.18(e)(5)) is #930’s.
Templates and pack text
The template renders (A) to (N) and the hearing block. (G), (H), (J), (K), (L), (M) are sentences in the template, the pack’s own wording. © prints the type from claim_basis through a pack-worded map (agency error, household error, intentional violation) in place of the raw tag. (O) and (P) are one block rendered only when an allotment_reduction input is present; no code sets it in this plan, and a render test passes it directly.
-
fixtures/config/notices-neutral: the neutral letter and manifest (program_data_keysgains the new keys); a neutral repayment-agreement page for agency-error and household-error claims. -
Georgia (its own repository, its own agent): the letter, Form 486 as a Typst page appended for AE and IHE claims and absent for IPV (OIG 3450 §4000), and §4005’s sentence that a hearing on the fact or amount of the claim suspends collection.
[notices.claims].repayment_due_dayswith its citation. -
The template and manifest comments call the letter the one-time claim notice; the "not a 273.13 notice" comment is rewritten to say what it is.
Order with the configuration repositories
Announce the contract on canopy/rules. Federal writes the bound; Georgia writes a held commit (manifest keys, letter, Form 486, the pack key). Both are verified from a git archive (signature, ancestry, files changed, canopy config check, the affected render tests with the archive swapped in), merged, and pinned as the first commits of U3’s MR, before the code that needs them. Texas is told the new required key and inputs; it is not pinned.
Tests
| Category | Tests |
|---|---|
Unit (period) |
|
Contract (wire) |
Wire pins for |
Routed (postgres) |
|
Unit (notices) |
|
Render |
One assertion per element (A) to (N) on the neutral letter’s text; |
Property |
The period’s month arithmetic round-trips and never inverts. |
Regression |
A render of today’s event payload (no period) fails: the case that would have caught the gap. |
Not run locally (the car’s): the stack-calling targets and the e2e journey of the recompute claim, which the unit updates to read the new letter.
Risks
| Risk | Mode | Mitigation |
|---|---|---|
A claim path stages an event with no period and a letter goes out without (D). |
fail-closed |
The field is required on the event type, each subscriber refuses a producer event without it, and canopy-notices refuses to render ( |
A deployment holds IPV cases with an amount and no period. |
fail-closed |
The migration fails and names the rows; pre-1.0 the answer is a re-seed. The changelog says so. |
The roster read names someone who was not an adult member during the period, or misses one who left mid-period. |
silent |
Two reads (first and last day), each judging majority on its own day; a member present only in the middle of a long period, or one who came of age mid-period and left before its end, is missed. Stated on the unit issue and in the API page; recording liability on the claim itself is #930’s ledger work. |
The liable adults' names are written to the insert-only snapshot table. |
fail-closed |
|
canopy-persons is down when the letter renders. |
fail-closed |
The item stays on its retry ladder; no letter without (B). |
A pack sets a due date past 30 days. |
fail-closed |
Boot refusal against the federal bound ( |
The letter promises an allotment reduction canopy does not make. |
fail-closed |
Nothing sets |
Georgia’s pinned template and canopy’s inputs disagree. |
fail-closed |
The template fails closed on a missing input; the pin is verified against the render tests before it is merged, and the car renders on the pin. |
TANF and Medicaid claims gain two NULL columns. |
silent |
They pass |
Scope
| Unit | Work | Status |
|---|---|---|
U1 |
canopy-appeals: the referral’s period, the |
Done (2026-11-25) |
U2 |
The canonical claim period; canopy-snap’s four claim paths, staged screens and the event; the manual POST’s callers. |
Done (2026-11-25) |
U3 |
Federal and Georgia pins; canopy-notices' arm, due date and bound; the neutral letter, manifest and repayment page; render tests; the action-coverage row |
Done (2026-11-25) |
Units are stacked in this order. Out of scope: allotment reduction and delinquency (#930); compromise, write-off and TOP referral as actions (#795); the TANF and Medicaid letters; itemizing an appeal claim’s months.
Delivery
-
Doc pages:
api/canopy-snap.adoc,api/canopy-appeals.adoc,api/canopy-notices.adocand theirdata-models/pages,services.adoc,rulesets.adocandfederal-requirements.adoc(the pack key and the bound),jurisdiction-onboarding.adoc(the letter’s inputs), each in the unit that changes its surface. -
CHANGELOG.adoc== Unreleased: one entry per unit; U1 and U2 name the new required request fields and the migration that refuses old IPV rows. -
This plan page with its nav entry, merged before U1.
-
The close: U3’s MR closes #2228; merge SHAs are noted on it; #930 and #795 are noted with what this delivered and what remains theirs.
Errata
-
Erratum (2026-11-24), before U1: the approved draft judged majority on the period’s last day for both rosters. The commit review found that names a member who was a minor while in the household; each roster now judges majority on its own day.
-
Erratum (2026-11-25), U1: the period type is
canopy_types::month_period::MonthPeriod, shared by the contracts, where the plan named aClaimPeriodin canopy-overpayments. An assessment whose cessation precedes its window start has no whole-month period; its claim event is withheld (logged), the posture the worker already takes for a corrupt assessment. -
Erratum (2026-11-25), U2: the recompute window’s end is inclusive (its two bounds are the first and last sized month), so the claim’s period is the window as it stands, not the month before
RowBase.end. The manual POST takes oneperiodobject, not two fields, and nothing outside canopy-snap's own tests calls it. canopy-snap requires the period in its own database (20270411000001), so that migration fails on existing claims or screens. Anappeal.overpayment_assessedwithout a period is skipped and logged, as its other malformed shapes are, where the plan said refused: the appeals scanner re-emits it. -
Erratum (2026-11-25), U3: an on-demand re-render does not read the names again; it prints the placeholder for them, as it does for the recipient (maintainer, 2026-11-25): a read inside a user's request on the service's own token would break the call graph's rule. The letter's printed months are
claim_period_firstandclaim_period_last, added by the worker beside the routed ISO months. The demand letter is pinned by type incanopy_contracts_notices::correlation. The neutral repayment agreement is a page of the letter itself, not a separate template.