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 manual POST /v1/overpayments, the claim an ipv.not_established event opens and the claim an appeal.overpayment_assessed event opens reach canopy-snap with none.

Decisions (maintainer)

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

  2. 2026-11-14: (E) prints "not itemized" for a claim with no itemized sizing.

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

  4. 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.start to the month before RowBase.end (the window’s end is exclusive).

  • Manual POST (api/overpayments_handler.rs): SnapCreateClaimRequest gains required period_first_month and period_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): CreateIpvReferralRequest gains an over-issuance period, required exactly when overissuance_amount is present (422 otherwise). ipv_cases gains 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_established carries the period, and canopy-snap refuses the event without it (the delivery is retried, then dead-lettered).

  • Appeal assessment (canopy-appeals): appeal.overpayment_assessed carries the first and last month of the assessment’s window (cb_assessments.window_start, cessation_date, the whole-month window assessments.rs already computes). canopy-snap refuses the event without them.

  • Staged claims: overpayment_claim_screens gains 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_full with 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_majority on the day of a roster they appear in: the first day for the first roster, the last day for the last (MajorityRule, already in recipient.rs). Someone who was a minor while a member is not named because they came of age after leaving. Their display names are overlaid as liable_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 as claim_due_date. The pack key is required when snap is enabled and canopy-notices refuses to boot without it. The federal layer’s snap-procedure.json gains claims.demand_due_days_max = 30 (with an identical copy in fixtures/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 read snap-procedure.json today, so the unit adds that read beside the hearing-request-windows.json one in config.rs; a missing or malformed federal file refuses the boot.

  • Calculation (E). months is 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_keys gains 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_days with 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)

a_claim_period_is_whole_months_in_order; the_recompute_window_becomes_an_inclusive_period; a_manual_claim_without_a_period_is_refused; a_referral_states_a_period_exactly_when_it_states_an_amount.

Contract (wire)

Wire pins for snap.overpayment_claimed, ipv.not_established and appeal.overpayment_assessed with the period; the OpenAPI snapshots of canopy-snap and canopy-appeals.

Routed (postgres)

every_claim_path_stages_its_period_on_the_event (recompute, manual, ADH direct, ADH staged, appeal direct, appeal staged, re-acknowledged); an_event_without_a_period_is_refused_and_opens_no_claim for each subscriber; the ipv_cases CHECK for amount without period and period without amount, NULL cases included.

Unit (notices)

the_liable_adults_are_the_adults_of_either_roster; a_member_under_the_age_of_majority_is_not_liable; a_minor_who_left_before_coming_of_age_is_not_liable; a_claim_with_no_liable_adult_is_refused; a_claim_event_without_a_period_is_refused; the_due_date_is_the_notice_date_plus_the_packs_days; a_due_date_figure_over_the_federal_thirty_days_refuses_boot; a_due_date_figure_below_one_day_refuses_boot; a_missing_or_malformed_federal_claims_bound_refuses_boot; a_snap_pack_without_the_due_days_key_refuses_boot; the_stored_snapshot_carries_no_liable_adult_name (and the existing routed-key test over NAMES_A_PERSON).

Render

One assertion per element (A) to (N) on the neutral letter’s text; an_unitemized_claim_prints_the_not_itemized_sentence; the_reduction_block_prints_only_with_a_reduction; the_repayment_agreement_is_absent_from_an_ipv_letter; the_due_date_is_within_thirty_days_of_the_letter. Georgia’s own render tests pin Form 486 and the suspension sentence in its repository.

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_claim_event_without_a_period_is_refused).

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

liable_adults joins NAMES_A_PERSON; the_stored_snapshot_carries_no_liable_adult_name.

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 (a_due_date_figure_over_the_federal_thirty_days_refuses_boot).

The letter promises an allotment reduction canopy does not make.

fail-closed

Nothing sets allotment_reduction; the_reduction_block_prints_only_with_a_reduction.

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 None and their letters are unchanged; the stamped-migration parity tests hold the three copies equal.

Scope

Unit Work Status

U1

canopy-appeals: the referral’s period, the ipv_cases columns, both events carry the period.

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 snap.claims.issue-demand-letter bound and its allowlist entry removed; closes #2228.

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.adoc and their data-models/ pages, services.adoc, rulesets.adoc and federal-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 a ClaimPeriod in 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 one period object, 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. An appeal.overpayment_assessed without 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_first and claim_period_last, added by the worker beside the routed ISO months. The demand letter is pinned by type in canopy_contracts_notices::correlation. The neutral repayment agreement is a page of the letter itself, not a separate template.

Edit this page · default