canopy-enrollment API Reference
For a service integrator (the BFF, canopy-appeals, canopy-renewals, canopy-reporting): canopy-enrollment owns the post-determination SNAP enrollment — the enrollment row, monthly issuance to EBT, issuance history, adverse actions with their appeal stays, and expungement of unused benefits (7 USC §2016(h)(12)©). Tables, indexes and retention: the data-models page; design history: snap-enrollment-ebt, adverse-action-pipeline, household issuances, partial-month retention, and for the expiry sweep, the combined initial allotment and the continuation arm snap-intake-completion.
- Base URL
-
container port 8006 (host:
CANOPY_PORT_CANOPY_ENROLLMENT_8006in.ports.env) - Authentication
-
Bearer token: a canopy-identity token for this receiver (its
audisurn:canopy:service:canopy-enrollment), authenticated by the service’s identity receiver (ADR-049 Amendment 14): no bearer is 401token_missing, a token it refuses 401token_rejected, anX-Canopy-Actorheader 400actor_header_retired, and no trustworthy key set in time 503keys_unavailable. - Access
-
canopy-appeals, canopy-eligibility, canopy-renewals, canopy-reporting and canopy-snap hold system edges to canopy-enrollment, and the portal one for the annual summary; every route admits a system caller but the event replay. Worker writes admit the writer bar (schedule and cancel through any client, create and issue through canopy-web), the household-scoped reads caseworker+ behind the #408 household gate, and the listed reads canopy-web’s readers or a service’s onward delegation; canopy-cli holds no edge to canopy-enrollment, and the event replay is user-only
admin. A refusal is 403 with itsReceiverDenialcode (ADR-049 Amendment 14); each route’s constant is in the authorization inventory. - Database
-
canopy_enrollment
Admission specifics
-
Household gate (#408,
gate_household_actor_access,services/canopy-enrollment/src/api/access.rs) on the four household-scoped reads — the household-issuance list, the annual summary, the continuation history (on the row’s household, after its 404) and the successors read (on the query’s household). A system caller passes and is not audited. A user’s delegation passes withsupervisororadmin; otherwise it needs an activehousehold_assignmentsrow in canopy-applications whoseworker_idequals its subject byte for byte (#1008), asked on the request’s outbound — the user’s delegation onward, which canopy-applications admits via canopy-enrollment on caseworker+ (ADR-049 Amendment 15) — else 403 with theenrollment.household_issuance.access_deniedaudit. Every allowed user read stages its allow audit; both audits carry the user’s subject. -
Ownership. The annual summary requires the portal’s
X-Canopy-Applicantclaim to bind the household (require_owned_household): 403ownership_claim_missing/ownership_mismatch. -
Attribution. Cancel, the stay commands and reopen record
sub=<principal.attribution_sub()>; actor=<body actor>: the caller’s canopy subject or its system client id (canopy-appeals sends the stay commands on its system token), beside the body’s display label. -
The event replay,
POST /v1/admin/events/replay, is merged bymain.rsfromcanopy_api::AdminRoutes(crates/canopy-api/src/admin.rs) and admitsADMIN_HUMAN(admin, any client).
Routes
Mounted by routes() in services/canopy-enrollment/src/api/mod.rs; spelling from crates/canopy-contracts-enrollment/src/paths.rs. The last row is the shared operator route main.rs merges from canopy_api::AdminRoutes (crates/canopy-api/src/admin.rs; body ReplayRequest { event_ids }), outside the request-outbound layer.
| Route | Access | Success | Coded refusals (RFC 9457 code) |
|---|---|---|---|
|
system; writer via canopy-web |
201 |
409 live enrollment exists; 422 |
|
system; case reader via canopy-web |
200 |
— |
|
system; writer via canopy-eligibility, canopy-snap |
200 |
400 either parameter absent or malformed |
|
system |
200 |
404 |
|
system; writer via canopy-web |
201 |
409 (issue guards below) |
|
system; case reader via canopy-web |
200 |
— |
|
system; caseworker+ (+ household gate) |
200 |
403 gate; 404 |
|
system; caseworker+ (+ household gate) |
200 |
400 |
|
system |
— |
410 always (below) |
|
system |
200 |
— |
|
system; caseworker+ (+ household gate) |
200 |
400 bad |
|
system; portal ( |
200 |
403 |
|
system |
200 |
422 over 500 ids |
|
system; worker reader via canopy-web |
200 |
422 over 500 ids |
|
system; writer |
201 |
400 earlier date; 409 open action / tombstone / non-terminable / key used for another enrollment; 422 no head, |
|
system; case reader via canopy-web |
200 page |
— |
|
system; writer via canopy-web, canopy-appeals |
200 |
404 |
|
system; writer |
200 |
404; 409 |
|
system; writer via canopy-appeals |
200 |
409 (stay machine below) |
|
system |
200 |
404 no link |
|
system |
201 |
400 future receipt; 409 not enacted / successor / raced; 422 wrong source |
|
system |
200 |
— |
|
|
200 |
403 |
Access legend: system = any system caller but the portal; portal (<scope>) = the portal’s system token holding that scope; writer = a user’s delegation holding a CASEWORKER_WRITER_ROLES role; caseworker+ = CASEWORKER_OR_ABOVE_ROLES; case reader = CASE_READER_ROLES; worker reader = WORKER_READER_ROLES (all crates/canopy-auth/src/roles.rs); a bar with no client admits a delegation through any client, via X, Y only a delegation those clients present; + household gate and + ownership are the checks above.
Enrollments
Create. CreateEnrollmentRequest — household_id, determination_id, application_id, certification_start_date, certification_end_date, monthly_issuance_amount, expedited, application_date, optional legal_filed_date. initial_issuance_due_date = legal_filed_date.unwrap_or(application_date) + [snap.issuance].{expedited_days | standard_days} (7 and 30 in the Georgia ruleset — 7 CFR 273.2(i)(3), 273.2(g)(1)); the event path shares the rule. One live enrollment (pending_issuance / active / suspended) per household is structural — the partial unique snap_enrollments_one_live_per_household (migrations/20260801000000_one_live_enrollment_per_household.sql) answers 409; an end before the start is 422 before any write.
Live read. GET /v1/enrollments/live?household_id=&as_of= (both required, as_of a YYYY-MM-DD date) — canopy-eligibility’s fail-closed classifier read and canopy-snap’s overpayment-recompute participation read (#936, the pre-establishment claim floors; also fail-closed) (store::live_enrollment_on): the household’s ONE row under the live predicate (active = true AND status IN ('pending_issuance', 'active', 'suspended') — peek_live_enrollment_id's SQL) whose certification_end_date >= as_of, as LiveEnrollmentView { enrollment: SnapEnrollment | null, upcoming: SnapEnrollment | null }. A row whose period covers as_of (certification_start_date ⇐ as_of) is enrollment. A row whose period starts after as_of (an approved enrollment that has not started) is upcoming, with enrollment: null (#2339): canopy-eligibility’s order arm continues it, and nothing reads it as participation on as_of. The one-live fence (#1130) means at most one of the two is set. An expired-but-unswept row (end before as_of) and a terminated / expired / fenced-out row read both null; that is a 200, never a 404, so the classifier tells "no live row" from a transport or parse failure. A body without upcoming parses as upcoming: null. A system caller, or canopy-eligibility’s or canopy-snap’s onward delegation on the writer bar; no portal arm.
Issue. IssueBenefitsRequest { benefit_month } (first of the month). Refusals in order, all row-free: enrollment_not_issuable (status not pending_issuance / active); benefit_month_after_certification_end; benefit_month_before_certification_start; covered_by_combined_allotment (also when the combined allotment commits between that check and the insert: the snap_issuances_no_overlapping_coverage belt refuses the row and the path answers the same code); benefit_month_already_issued; benefit_month_covered_by_household (another enrollment of the household holds the month); initial_month_under_floor (the anchor month prorates under the federal snap-procedure.json issuance.initial_proration_minimum_cents, 7 CFR 273.10(a)(1)(iii)); issuance_fence_tripped (the lifecycle_revision fence moved mid-issuance — the EBT transfer stays or returns to pending for reconciliation). The pending row is written (autocommitted) before the EBT call, under a fresh issuance id that is the EBT idempotency key, holding the settle lease (settle_claimed_at, #2664): the settlement pass never drives the row while this request’s EBT call is in flight (it reports the row lease-skipped), so with no lifecycle transition the request’s fenced mark lands it, clears the lease and answers 201 issued whatever the settlement ticks do. When the call fails, or the request dies after the write, the row stays pending under the lease and the settlement pass re-drives it under that id once the lease lapses (ten minutes); the expiry sweep never cancels it while the lease lives. A refusal computed before this request writes its row (every refusal above except issuance_fence_tripped, which follows the write) is answered only when the month holds no pending regular issuance of this enrollment; when it does (a retry of a request whose EBT call failed, or a month still settling, whichever request or the event path wrote the row), the answer is 202 with that row, so the caller learns the issuance id instead of benefit_month_already_issued (#2657). The 202 is given only while the settlement pass will drive the row: for an enrollment that is not issuable, or a month outside its certification window, enrollment_not_issuable and the window refusals stand. An issued or settled month still answers benefit_month_already_issued. The row carries combined / benefit_months_covered for a 7 CFR 274.2(c) combined initial allotment, which only the event path mints.
Settlement. The auto-enroll subscriber creates the first issuance pending inside the inbox transaction; the advisory-locked canopy-enrollment.issuance-settlement pass (5 s tick) drives the EBT call outside any transaction and lands the lifecycle_revision-fenced mark + first-issuance activation in one short transaction, stamping expiry_date = issuance day + [snap.issuance].expungement_days and ebt_accepted_on / ebt_transaction_id when the processor accepted a transfer whose landing fence-tripped. A pending row on a terminated or suspended enrollment is never auto-settled; the hourly aged-pending alert names it.
Expungement. The daily canopy-enrollment.scheduler pass (src/expungement.rs) notices, then expunges, issued rows (7 USC §2016(h)(12)©; 7 CFR 274.2(i)). Since #2407 the advance notice is a precondition of expungement (7 CFR 274.2(i)(2); compliance/action-catalogue/snap.toml snap.issuance.expungement-advance-notice). A row is noticed once its expiry_date is within [shared.timing].expungement_advance_notice_days, or as soon as it is past expiry without a notice (a late notice). Should two passes run at once, the first notice is staged under the row lock and only while the row has no event id (store::lock_unnoticed), so one pass stages the letter and the other counts the row in expunge_unchanged (#3172); the lock also requires the expiry_date the pass read, so a row an EBT activity moved meanwhile is not noticed with its old date but counts in expunge_unchanged, and the next pass reads its new date (#3173). The notice’s stated removal date is the later of expiry_date and the staging day plus the window. A row past expiry_date is expunged only after canopy-notices has dispatched its letter (expungement_notice_dispatched_on, stamped from notice.dispatched) and the pass day is after the later of expiry_date and the dispatch day plus the window, so a notice dispatched on the window’s first day expunges the day after expiry_date, as before. A row with no dispatched notice is HELD, never expunged: every pass logs a WARN naming the issuance and the reason (never_noticed when no notice was staged, notice_not_dispatched while the letter has not gone out, notice_restaged while a re-staged letter has not gone out) and counts it in expunge_held. When the letter exists but its dispatch failed, a canopy-notices resend (POST /v1/notices/{id}/resend) dispatches it, and that dispatch releases the hold. A late-noticed row waiting out its window counts in expunge_deferred. The expunge write itself re-asserts a dispatched notice.
Re-notice (#2423). A letter canopy-notices never generated (recipient resolution failed, so no notice row exists, a resend has nothing to send and a replayed event is deduplicated) would hold its row forever. So when a held row’s notice is still undispatched more than [shared.timing].expungement_renotice_after_days after its staging day (expungement_notice_staged_on), the pass re-stages it, logs a WARN with reason = notice_past_bound and counts it in notices_restaged (renotices_failed when the re-stage fails; the next pass retries it). Under the row lock, and only while the row still carries the notice the pass read (store::lock_undispatched_notice), it stages a fresh enrollment.expungement_pending under a new event id, stating a removal date the full window from that day, and stamps the new id, the staging day and expungement_notice_restage_count + 1. A pass that loses the lock to another pass, a dispatch or an activity counts the row in expunge_unchanged. The old event id no longer matches the row, so the superseded letter’s dispatch, a resend of it included, releases nothing: only the re-staged letter’s dispatch does, and the window runs from its dispatch day (7 CFR 274.2(i)(2)), so the household has the full window after the re-staged letter goes out. A household canopy-notices still cannot address is re-staged once per bound until canopy-persons holds a usable mailing address for the recipient (services/canopy-notices/src/recipient.rs) or, for a never_noticed row, its enrollment names a head. No operator edit of the notice columns is needed.
Held gauge (#2423). Every replica samples the held rows once a minute into the gauge canopy_enrollment_expungement_held{reason}, with the four WARN reasons as labels (expungement::spawn_held_metrics), so a dashboard reads the database whichever replica ran the daily pass, and a dispatch that releases a row shows within a minute. notice_past_bound counts rows the next pass will re-stage. The alerts on it are in Deployment Guide › Alerting.
Expungement approach (#1744). The pack designates its 7 CFR 274.2(i)(1) approach in snap.issuance.expungement_approach. Under unused_benefits, (i)(1)(ii), a row expires expungement_days after its issuance, whatever the account does. Under inactive_account, (i)(1)(i), EBT account activity moves the date: on ebt.account_activity.observed (below), every unexpunged issued row of the account whose expiry_date is earlier than the activity day plus expungement_days moves to that date, and its notice columns are cleared, so the pass notices it again before the new date. The expunge write also re-asserts expiry_date < today, so a row an activity moves while the pass runs matches nothing and counts in expunge_unchanged. A row expunged under inactive_account whose account has no activity observation counts in expunged_unobserved, logs a WARN once per pass and increments canopy_enrollment_expunged_without_activity_observation_total: until the activity feed is connected (#1553/24), every account ages from issuance.
Terminate. Direct termination was removed: a termination is an adverse action (7 CFR 273.13; PAMMS 3705). The route stays registered and answers 410 with that explanation.
Batch and household reads
-
GET /v1/households/{household_id}/issuances— optionalfrom=YYYY-MM+to=YYYY-MM(both or neither),include_all=trueadds the non-issuedrows (pending/cancelled, andfailedonce #1553 writes it). A combined row is listed when either covered month is in the window; per-month readers split it throughSnapBenefitIssuance::covered_months. -
POST /v1/households/issuances:batchGet{ household_ids, benefit_month }— the issued aggregate per unique id for one month (issued_total,issuance_count; an honest zero, never a dropped entry); no enrollment-status predicate ("issued is issued").POST /v1/households/enrollments:batchGet{ household_ids }— each household’s newest live enrollment (status,monthly_issuance_amount;nullwhen none). Both cap at 500 ids, collapse duplicates, keep request order, and audit nothing. -
GET /v1/households/{household_id}/annual-summary?year=—total_issued+ per-monthmonthsforissuance_status = 'issued'rows (expunged included); an unknown household is a 200 with"0". -
GET /v1/enrollments/{id}/continuations—enrollment_continuationsrows newest first, each{ continuation: ContinuationView, adverse_action: AdverseActionView | null }(classification∈immediate | reduction_staged | extend_now_reduce_later | termination_staged | no_change;status∈applied | staged | partially_applied | superseded | vetoed | cancelled). A user’s allowed read stagesenrollment.continuations.read. -
GET /v1/enrollments/successors?household_id=(api/successors.rs) — the household’ssnap_enrollment_successorsrows, newest decision first:{ renewal_application_id, determination_id, decision: approved | denied, status: scheduled | withdrawn | landed | superseded_by_live_row | refused, benefit_effective_date, certification_end_date?, enrollment_id?, updated_at }— one per renewal application whose in-period recertification decision was signed underrecert_approval. The same access as the continuations read (a system caller or a caseworker+ delegation, then the #408 gate on the QUERY’s household; a household with none is an empty list). A user’s allowed read stagesenrollment.successors.read.
Adverse actions
-
Schedule
POST /v1/adverse-actions: policy terms (advance days from[notices], CB availability, the policy version) are snapshotted onto the row; default effective date = legal today + advance days, and a caller date may only push later. One open action per enrollment;idempotency_keyreplays the same action. Once the request’s shape resolves the source triple (the worker key, or the claim), the triple decides (#2453): under the triple’s advisory lock (a periodic-report claim’s is its trigger lock), an action the triple already created is answered 200 as it now stands (enacted, cancelled, or with an effective date a later legal day would refuse) before any terminable, effective-date or tombstone check, so a retry is never refused by its own first request’s action and a concurrent same-triple pair yields one action and one replay. A triple first used for a different enrollment is still refused 409. Asourceclaim (created_source = periodic_report,source_reference= the certification id) creates it under the claimant’s idempotent triple; itscb_availableis the reason row’s, as for any action (#2212: both periodic-report rows,periodic_report_nonfilingandperiodic_report_verification_failure, carryfalse; no override on the source). The frozencb_rulecites no manual for a row without CB or an exempt action; a mass-change action (#806) freezes the pack’s[snap.adverse_action].mass_change_cb_ruleand recordsmass_change_exemption_authorityas its exemption authority. Areductioncarriesproposed_benefit_amountand, from in-process staging only,target_certification_end_date. Amember_sanction(#3219) is staged in process only (over HTTP it is 422member_sanction_not_claimable_over_http): it carriesproposed_benefit_amount, never a target end, and names the sanctioned member (person_id), the canopy-snap finding (sanction_ref), itsviolation_numberand the last day of its minimum period (minimum_period_ends_on). -
Read the cursor-paginated list (
after_id,household_id,open=true) or one action; both carryactive_staysand the provenance triple. -
Cancel
{ household_id, actor, reason? }(CancelAdverseActionRequest) releases everystayedlink atomically; idempotent on an already-cancelled action.household_idis required (422 before admission if missing): under the row’sFOR UPDATElock, an action whose storedhousehold_idis not the body’s is refused 409adverse_action_household_mismatchbefore the status check (#3105), naming the path id and the requested household, never the stored owner, with nothing written and no event staged. The check holds the stored owner to the household the request names; a caller that names the action’s own household passes. canopy-web binds the action to the worker’s household before sending that household (canopy-web API). -
Stay machine
PUT …/stays/{appeal_id}{ "command": "stay" | "restay" | "release" | "veto", "actor" }→StayReceipt { link_status, active_stays, action_status }. A newstayis refused against a non-scheduled action;vetomoots a still-scheduled action durably;restayis the one legalreleased → stayedtransition (a timely final appeal); replays of a terminal state return the stored state. canopy-appeals calls it at filing time and reads the link back through theGET. -
Reopen
{ received_date, actor }un-terminates the enrollment an enactedperiodic_report-sourced action closed (canopy-renewals validates the 30-day window and calls here);received_dateis the proration anchor for the receipt month,lifecycle_revisionis bumped, the action row staysenacted.
Sweeps
-
Enact (
POST /v1/adverse-actions/enact-sweep; also the hourly loop): every claimed due action passes the gate — zero active stays, dispatch evidence for the current window — the dispatched notice version whose noticed effective date covers the action’s floor, chosen by window and never by arrival order (#2461) — (dispatched_date ≤ noticed_effective_date − required_advance_days; exempt actions need a dispatched adequate notice), inside the enact window. Pass ⇒ terminated on the noticed legal date with PAMMS 2415 partial retention; fail ⇒ a successor legal window + operator alert. Claims areFOR UPDATE SKIP LOCKEDbatches, so concurrent passes share the cohort; always 200 with the typed report. -
Expiry (
POST /v1/enrollments/expiry-sweep/run; the dailycanopy-enrollment.expiry-sweepleg): a live enrollment whose inclusivecertification_end_dateis before legal today moves toexpired— pending issuances cancelled (an entitled month is a WARN-logged 7 CFR 273.17 restoration candidate),lifecycle_revision + 1, still-scheduled actions cancelled withenrollment_expired,enrollment.expiredstaged in the same transaction — and when the household’s DENIED in-period renewal left awithdrawnsuccessor for the day after that end, the denial’ssnap.case_closed(closure_date= end + 1, the denial’s reason, the expired row’s head of household) in the same transaction. After the scan the pass lands everyscheduledsuccessor whose start day has arrived (successors::land_due_successors), each in its OWN transaction under the household advisory lock: a live row already on the household →superseded_by_live_row(the day-of race with an interactive approval); else the stored approval through the ordinaryvalidate_for_enrollment+create_from_inputspath — a FULL first month, no proration, no initial-month floor (7 CFR 273.14(e)(1)) — →landed; a create that no longer passes (born-expired after an outage) →refusedwith the reason, WARNed as a 7 CFR 273.17 restoration candidate — the expiry before it stays committed. The report carriessuccessors_landed/successors_superseded/successors_refused. The hourly fenced tick’s window is keyed on the LEGAL day (run_window_fenced_until_complete), so the first probe after legal midnight of a start day expires the old row and lands the new one. A pass in which a row’s expiry or a successor’s landing failed, or which stopped at its time budget, releases that window, so the next hourly probe runs it again, the same legal day unless the day has run out of probes (#2433); a row that fails on every pass is retried hourly. A WARN alone (a refused successor, an entitled month) does not release the window. 202{ skipped: true }when another invocation holds the advisory lock.
Benefit proration
A mid-month effective date prorates (monthly_amount / days_in_month) * remaining_days, the days counted as the pack's [snap.issuance].proration_month says (7 CFR 273.10(a)(1)(ii), #1742: standard_30_day counts every month as 30 days and treats the 31st as the 30th; exact uses the calendar month; a missing or unknown value refuses boot), rounded per [snap.issuance].proration_rounding (floor_whole_dollar, 7 CFR 273.10(a)(1)(ii)). The base figure is the benefit month’s own price when the enrollment carries a benefit_month_prices schedule, else monthly_issuance_amount. Two anchors share issuance::prorate_month_from: the initial month (benefit_effective_date, falling back to application_date on HTTP-created rows) and a periodic-report reopen’s received_date. An initial month under the initial_proration_minimum_cents floor is refused initial_month_under_floor; a reopen month is never suppressed.
An adverse action is not enacted after the issuance cycle it was noticed for has ended; it is repaired with fresh dates instead. The cycle is the pack's [snap.issuance].cycle_granularity (benefit_month: the window closes on the last day of the noticed month; a missing or unknown value refuses boot).
Error codes
| Code | Meaning |
|---|---|
400 |
Invalid body; |
401 |
No bearer ( |
403 |
Admission: |
404 |
Enrollment, action, or stay link not found |
409 |
Issue guards: |
410 |
Direct terminate (removed) |
422 |
|
503 |
No trustworthy key set in time ( |
Events published
String set from crates/canopy-contracts-enrollment/src/events.rs and services/canopy-enrollment/src; every envelope asserts programs = ["snap"].
-
enrollment.created,enrollment.benefits_issued— the create and issue paths. -
enrollment.adverse_action_scheduled(AdverseActionScheduledV1: action id, provenance triple, recipient, verbatimeffective_date,action_type∈termination | reduction | member_sanction,action_reasons,cb_available, for a reductionproposed_benefit_amount/target_certification_end_date, and for amember_sanction(#3219)proposed_benefit_amount,sanctioned_person_id,sanction_ref,violation_numberandminimum_period_ends_on;person_idstays the notice's recipient) — at schedule time and for every successor legal window. Consumer: canopy-notices. -
enrollment.adverse_action_terminated(AdverseActionTerminatedV1, staged with the enact writes),enrollment.adverse_action_vetoed(veto_source∈stay_command | appeal_reversal),enrollment.adverse_action_cancelled(reason+actor;periodic_report_completedis the benign supersession) — consumed by canopy-renewals' periodic-report consumer. -
enrollment.adverse_action_enacted(AdverseActionEnactedV1, non-terminating enactments — reductions) — audit and SSE only. -
enrollment.continuation_applied(ContinuationAppliedV1,applied_via∈immediate | adverse_action_enacted, optionalsupplement, and since #1703 the optionalcertification_category— the row’s assigned category, thecodeof a[[snap.certification.categories]]row of the signing pack (georgiastandard | elderly_disabled | senior | abawd), omitted whenNone; since #2209 not a closed set:validate(check_certification_category) refuses only a malformed token (^[a-z][a-z0-9_]{0,63}$, neverexpedited), the continuation arm refuses an inbound token outside the codes canopy-enrollment loaded from ITS pack as anArmDefect(dead-lettered, never applied), and canopy-renewals refuses anin_cert_conversionwithout one) andenrollment.continuation_terminated(ContinuationTerminatedV1) — consumers: canopy-renewals' adjuster, canopy-notices (benefit-continuationonimmediate), canopy-security. -
snap.case_closed(SnapCaseClosedV1, the continuation termination tail’s Medicaid ELE signal, once at enactment). -
enrollment.expired(EnrollmentExpiredV1: the inclusive end,expired_at, the cancel tallies) — audit and the worker portal only; canopy-renewals does not consume it. -
enrollment.expungement_pending— the advance expungement letter’s trigger (removal_date,allotment_amount), fired[shared.timing].expungement_advance_notice_daysbefore expiry. Since #2388 it carriesperson_id, the letter’s recipient: the head of household of the issuance’s enrollment (head_of_household_person_id). An issuance whose enrollment names no head is not noticed: the daily pass counts it failed with a WARN, leaves it unstamped and retries it on every pass; past expiry it is held, not expunged. Since #2407removal_date(namedexpiry_dateuntil #2422) is the removal date the letter states (the issuance’s expiry date, or for a late notice the staging day plus the window), and the envelope id is stamped on the row asexpungement_notice_event_id. Since #2423 the pass stages it again, under a fresh envelope id, for a held row whose notice stayed undispatched past[shared.timing].expungement_renotice_after_days(Re-notice, above). -
enrollment.household_issuance.read/.access_denied,enrollment.continuations.read,enrollment.successors.read— the household-gate audit pair and the continuation-read and successors-read allow audits (ids and role tokens only). Each is in canopy-enrollment’s broker write ACL; the successors-read audit was missing from it until #2916, so the broker refused it.
Events consumed
-
determination.completed.snap— auto-enrollment (the initial-month proration rule and the combined initial allotment on anexpedited_postponedbasis; producer-contract violations go to the DLQ) and, on a continuation-class basis (in_cert_conversion,interim_change,order_continuation,mass_change_cola—CONTINUATION_CLASS_KINDS), the continuation arm (immediateapplies in place with the 273.12(c) supplement, reconciled asentitlement(month) − money already attributed to the monthover regular and supplemental rows (continuation/supplement.rs);extend_now_reduce_later,reduction_staged,termination_stagedstage acontinuation-sourced action whoseeffective_dateis the later of the determination’sbenefit_effective_dateand the 273.13 notice floor —todayitself for amass_change_cola, which stages advance-notice EXEMPT (7 CFR 273.13(b)(1):exempt_from_advance_notice,exemption_authority = "7 CFR 273.13(b)(1); PAMMS 3705:57",exemption_actor = "system:canopy-enrollment") withcb_availablekept from its reason row undercb_rule = "CB on a misapplication claim (7 CFR 273.12(e)(6); PAMMS 3705)"(adverse_actions.rsfreeze_policy; the enact gate then needs only a dispatched adequate notice) — under the kind family’s reason pair (continuation/arm.rsreason_codes):continuation_benefit_reduced/continuation_ineligiblefor the conversion,change_benefit_reduced/change_ineligiblefor the two re-determination kinds,mass_change_benefit_reduced/mass_change_ineligiblefor the COLA; canopy-notices letters the(created_source = continuation, mass_change_*)scheduled event asmass-change-reduction/mass-change-termination(a 273.12(e)(1)(ii) mass-change notice, never the advance NOA);no_changerecords the row). Forinterim_change/order_continuation/mass_change_colathe payload’s carriedcertification_end_date(and the signedexpiration_date) must be the live row’s end — a mismatch is the typedCertificationPeriodMismatchDLQ before any write. A duplicate live enrollment from a non-continuation approval parks until the expiry sweep flips the stale row; a continuation-class determination for a household WITHOUT a live enrollment — the COLA included — is the arm’sNoLiveEnrollmentDLQ (enroll_guards.rskeeps only the born-expired refusal; the #1635 COLA park is gone with #806). Arecert_approvaldecision — approved OR denied (successors::handle, routed before the continuation split) — is never inserted on arrival and never parks: under the household advisory lock andcausal::supersedesagainst the renewal application’s row(determination_id, determined_at), a newer approval (validated through the whole enrollment belt,recert_factsincluded:benefit_effective_date == renewal_certification_end_date + 1 == effective_date) isscheduledwith its payload stored; a newer denial iswithdrawn— with NO live row the case closes at once (snap.case_closed,closure_date= legal today, the firstdenial_reason_codesentry orunspecified), with one the closure waits for the expiry; an older or equal arrival is acked unchanged (successor_stale_arrival). A second renewal application while one is scheduled, a NEWER decision on a settled (landed / superseded / refused) row (an older or equal one is the stale ack above), a missing renewal application id or scoring instant, and a mis-anchored approval are typed DLQs. -
renewal.snap_periodic_report_processed(queuecanopy-enrollment.events) — records the per-(certification, generation)completion tombstone and cancels a still-scheduled matchingperiodic_reportaction withperiodic_report_completed. -
notice.generated/notice.dispatched— order-independent evidence stamps ontoadverse_action_notices(the enact gate’s dispatch evidence). The work-item key either carries (source_event_id+notice_type; absent or null keys are fine) is recorded on the version and supersedes a stale sibling awaiting its regeneration (#2459); a present but unparseablesource_event_idnacks. Since #2407 everynotice.dispatchedwhosesource_event_idmatches a row’sexpungement_notice_event_idstamps that row’sexpungement_notice_dispatched_onfromdispatched_date(first dispatch wins), releasing its expungement hold. A matching dispatch without a parseabledispatched_date, or an unparseablesource_event_id, nacks to the DLQ. -
notice.stale(#2459; payloadcanopy_contracts_notices::events::NoticeStaleV1) — canopy-notices retired an action letter whose legal day passed before dispatch (#2447), so it can never be the operative letter. Withregenerating = truea letter regenerated from the same work item follows: the version stays a staged successor, so the repair gate answers PendingEvidence in the gap instead of minting a second letter, and it is markedawaiting_regeneration; the first version recorded with the same work-item key (source_event_id+notice_type, carried bynotice.dispatchedand, from the #2459 producer,notice.generated) that is not itself awaiting supersedes it — at once if one is already recorded. Withregenerating = false(no work item, or canopy-notices' re-announcement after the regeneration failed terminally) the version is superseded now, so the gate can repair; supersession is monotonic, so a lateregenerating = truenever revives it. Arriving before the letter’snotice.generated, it creates the version row, and the late generated event no-ops. A dispatched version is never touched. A letter bound to no action is skipped; a malformed payload, or an action letter without its noticed effective date, nacks to the DLQ. -
ebt.account_activity.observed(#1744; payloadcanopy_contracts_enrollment::events::EbtAccountActivityObservedV1) — EBT account activity from the rail; canopy-exchange publishes it from the processor’s inactive-accounts file under #1553/24, and this consumer lands first. It upsertssnap_ebt_account_activity, keeping the laterlast_activity_on. Underinactive_accountit then moves the account’s unexpunged rows as Expungement approach describes; underunused_benefitsno date moves. A row already expunged is never reinstated (7 CFR 274.2(i)(3)); each one the activity would have moved incrementscanopy_enrollment_ebt_activity_after_expunge_total, the input to the reconciliation against the processor’s expunge file. A malformed payload, an unknownsourceincluded, nacks to the DLQ. -
appeal.decision_recorded/appeal.withdrawal_finalized— a reversal vetoes durably; an agency-favorable decision with a recorded CB cessation reschedules the action to the next cycle under adequate notice; a finalized withdrawal releases the stay and runs the gate.
Work sanction (#3219)
A determination.completed.snap under the work_sanction basis (continuation class) takes the continuation arm like an order_continuation, with three differences (continuation/arm.rs). A lower allotment stages a member_sanction instead of a reduction, under the work_sanction_member_excluded reason, with timely notice: its effective date is the later of the basis's anchor (the sanction's first day) and legal today plus [notices].advance_notice_days. A denial (every member sanctioned) stages a termination under work_sanction_ineligible. The event must carry the finding's work_sanction terms; one without them is a DLQ (WorkSanctionTermsMissing). A higher allotment on a lift applies immediately, as every continuation increase does. At maturation the enact gate runs the reduction tail for a member_sanction: the noticed amount re-prices the live row in place, the period is kept, the pending issuances are re-minted from the enacted month and the row stays live. Nothing marks the enactment final, so a later lift's order re-prices it back. The issuance lock taken before the enrollment row now covers every action that re-prices (ActionType::reprices). A newer determination for the household before maturation (an interim change, say) cancels the staged member_sanction like any staged continuation action; the enrollment.adverse_action_cancelled it stages names the finding (sanction_ref), and canopy-snap re-stages the sanction's order from it, so the sanction still takes effect (canopy-snap API).