canopy-renewals API Reference

For a service integrator (the BFF, canopy-reporting, canopy-applications, canopy-enrollment): canopy-renewals owns the SNAP certification period — its creation, the renewal-due and federal-universe feeds, mid-certification interim contacts and change reports, the PAMMS 3730 periodic-report cycle, and the daily scheduler that publishes the notice triggers. Non-SNAP programs own their certification lifecycles in their own services (ADR-001); the program-parameterized routes here only record events. Tables: the data-models page; design history: snap-renewals-certification, adverse-action-pipeline (periodic reports), snap-recert-interview-reinstatement, snap-intake-completion (the expedited, continuation and NOE-dispatch consumers), materiality.

Base URL

container port 8007 (host: CANOPY_PORT_CANOPY_RENEWALS_8007 in .ports.env)

Authentication

Bearer token: a canopy-identity token for this receiver (its aud is urn:canopy:service:canopy-renewals), authenticated by the service’s identity receiver (ADR-049 Amendment 14): no bearer is 401 token_missing, a token it refuses 401 token_rejected, an X-Canopy-Actor header 400 actor_header_retired, and no trustworthy key set in time 503 keys_unavailable.

Access

canopy-eligibility and canopy-reporting hold system edges to canopy-renewals, and the portal one for the in-force read; every route admits a system caller. The seven worker writes admit the writer bar through any client; the listed reads admit canopy-web’s readers, with canopy-cli on the caseload trend and the nudges and canopy-eligibility’s or canopy-applications' onward delegation on the certification reads; the rollup refresh admits admin through canopy-cli; every other route is system-only. A refusal is 403 with its ReceiverDenial code (ADR-049 Amendment 14); each route’s constant is in the authorization inventory.

Database

canopy_renewals

Admission specifics

  • Ownership. The in-force read GET /v1/renewals/snap/certifications requires the portal’s X-Canopy-Applicant claim to bind the queried household (require_owned_household), decided from the claim before any query: 403 ownership_claim_missing / ownership_mismatch.

  • Attribution (#1008). The nudge and redetermination actions record action_by = principal.actor(): a user as Human (the canopy subject), a system caller as Service (its client id). Neither body carries an actor; the actor in the convert and reopen bodies is provenance text, not authorization. The writer bar excludes quality_control, which samples a renewal record and never authors one.

  • Outbound. The SNAP change report’s eligibility dry-run (the 130%-FPL screen) rides the request’s outbound (RequestOutbound: the writer’s delegation onward, or canopy-renewals' system token for a system caller); the canopy-enrollment calls (the convert and VCL recipient, the periodic-report schedule and reopen) and the consumers' and scheduler’s calls send on canopy-renewals' sender (system origin).

Routes

Mounted by routes() (plus periodic_report_routes() and scheduler_routes()) in services/canopy-renewals/src/api/mod.rs; spelling from crates/canopy-contracts-renewals/src/paths.rs. The literal /snap/… paths match before the {program} routes.

Route Access Success Refusals (RFC 9457 code)

POST /v1/renewals/snap/certifications

system; writer

201 SnapCertification

409 active certification exists, certification_exists_for_determination; 422 end not after start, certification_type_unknown, certification_period_exceeds_ceiling, certification_type_not_manual, noe_recipient_required, periodic_report_calendar_missing (#3334: a declared period that owes a periodic report by the federal measure, simplified reporting and longer than six months, in a jurisdiction with no [snap.periodic_reporting] table to mint it from)

GET /v1/renewals/snap/certifications?household_id=

system; portal (portal:certifications:read) + ownership; worker reader via canopy-web, canopy-eligibility

200 SnapCertification

403 ownership / scope; 404 none in force

GET /v1/renewals/snap/certifications/{id}

system; writer via canopy-applications

200 SnapCertification

404

POST /v1/renewals/snap/certifications/{id}/convert

system

200 SnapCertification

400 converted_on outside the period; 404; 409 certification_not_in_force, conversion_reason_conflict; 422 certification_not_convertible, conversion_reason_unknown; 503 recipient unresolvable

POST /v1/renewals/snap/certifications/{id}/interim-contact

system; writer

200 SnapCertification

404; 409 certification_household_mismatch; 422 check_violation (method outside phone, mail, in_person, online, system)

POST /v1/renewals/snap/certifications/{id}/change-report

system; writer

201 SnapChangeReport

409 certification_household_mismatch, certification_not_in_force; 422 check_violation (method outside phone, mail, in_person, online, system)

GET /v1/renewals/snap/due

system; worker reader via canopy-web

200 SnapCertificationPage

—

GET /v1/renewals/{program}/due

system; worker reader via canopy-web

200 SnapCertificationPage

422 unknown program slug

GET /v1/renewals/overdue

system; case reader via canopy-web

200 [OverdueCase]

400 limit outside 1..=500

GET /v1/renewals/caseload-trend

system; case reader via canopy-web, canopy-cli

200 CaseloadTrend

422 bucket / program; 503 + Retry-After stale or absent coverage

POST /v1/renewals/caseload-rollup/refresh

system; admin via canopy-cli

200 / 202 CaseloadRollupRefreshOutcome

—

GET /v1/renewals/snap/interim-contacts/due

system; case reader via canopy-web

200 [SnapCertification]

—

POST /v1/renewals/snap/universe-snapshots

system

201 UniverseSnapshot

—

GET /v1/renewals/snap/universe-snapshots/{id}/rows

system

200 UniverseSnapshotRowsPage

404

GET /v1/renewals/snap/nudges?household_id=

system; case reader via canopy-web, canopy-cli

200 [RecertNudge]

—

POST /v1/renewals/snap/nudges/{id}/action

system; writer

200 RecertNudge

404 (unknown, immaterial or already actioned); 409 nudge_household_mismatch; 422 missing household_id, unknown body field (a stale action_by)

POST /v1/renewals/{program}/interim-contact

system; writer

201 SnapChangeReport

400 program = snap; 422 check_violation (method outside phone, mail, in_person, online, system)

POST /v1/renewals/{program}/change-report

system; writer

201 SnapChangeReport

400 program = snap; 422 check_violation (method outside phone, mail, in_person, online, system)

GET /v1/renewals/snap/periodic-reports?household_id=

system

200 [SnapPeriodicReport]

—

GET /v1/renewals/snap/periodic-reports/{id}

system

200 SnapPeriodicReport

404

POST /v1/renewals/snap/periodic-reports/{id}/form

system

200 SnapPeriodicReport

409 state; 422 form_kind

POST /v1/renewals/snap/periodic-reports/{id}/vcl

system

200 SnapPeriodicReport

409 state; 422 due_date under 10 days; 503 recipient unresolvable

POST /v1/renewals/snap/periodic-reports/{id}/verified

system

200 SnapPeriodicReport

409 state

POST /v1/renewals/snap/periodic-reports/{id}/complete

system

200 SnapPeriodicReport

409 state / certification not active; 422 check_violation (method outside phone, mail, in_person, online, system)

POST /v1/renewals/snap/periodic-reports/{id}/reopen

system

200 SnapPeriodicReport (also the replay of a same-received_date reopen)

400 receipt date; 409 not terminated (and not reopened on this received_date), window elapsed, enrollment refused, re-applied, divergent replay; 422 arm-inconsistent form_kind

GET /v1/renewals/snap/redeterminations?household_id=

system

200 [PrRedetermination]

—

POST /v1/renewals/snap/redeterminations/{id}/action

system; writer

200 PrRedetermination

404 (unknown or already actioned); 409 redetermination_household_mismatch; 422 missing household_id, unknown body field (a stale action_by)

POST /v1/renewals/scheduler/run

system

200 / 202 SchedulerRunOutcome

—

Access legend: system = any system caller but the portal; portal (<scope>) = the portal’s system token holding that scope; + ownership = the claim check above; writer = a user’s delegation holding a CASEWORKER_WRITER_ROLES role; 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.

Certifications

Create. { household_id, application_id, determination_id, certification_type, certification_start_date, certification_end_date, head_of_household_person_id? }. certification_type is the caller-declared category, persisted verbatim; its vocabulary is the booted pack’s worker_declarable rows under [[snap.certification.categories]] in the pack’s jurisdiction.toml (#2209 — georgia standard 6 months, elderly_disabled 12, senior 36, abawd 4; default standard 6 and elderly_disabled 24), loaded by services/canopy-renewals/src/params.rs and checked at the handler — never by a closed enum or a CHECK. The three 422s: a token outside the declarable rows (a well-formed token another pack declares included) → certification_type_unknown, naming the pack’s declarable codes; expedited → certification_type_not_manual (system-minted only by the determination consumer, 7 CFR 273.2(i)); a declared period longer than the jurisdiction’s ceiling — certification_end_date after the end of certification_period(certification_start_date, [snap.certification].max_certification_months) — → certification_period_exceeds_ceiling, naming the ceiling (the default pack, ceiling 24, can no longer accept a 36-month certification; a worker-declared period is bounded by the ceiling, not by the row’s months, which is the JDM’s assignment). A malformed token ("", Senior, one over 64 characters) fails the CertificationType shape rule (^[a-z][a-z0-9_]{0,63}$) at deserialization, also 422. head_of_household_person_id is required exactly when the period is two months or less (certification_start_date + 2 months > certification_end_date; 7 CFR 273.14(b)(1) — the Notice of Expiration is then staged in the create transaction), else ignored. One certification per determination: a replayed determination_id, or one the continuation adjuster already recorded, is 409 certification_exists_for_determination. The create path takes the household advisory lock first and finalizes the household’s pending_certification continuation rows for this determination after the insert.

In-force read. GET /v1/renewals/snap/certifications?household_id= returns the one row in the in-force class — status ∈ store::IN_FORCE_CERT_STATUSES (active, recertifying — a household that has filed its recertification keeps a certification in force until the renewal is decided) with active = true; a lapsed certification whose end has passed but is still active is in this class, and is the only place the portal learns a period has run out. GET …/{id} reads any status; canopy-applications' renewal filing reads it fail-closed.

Convert. POST …/{id}/convert { reason, converted_on, actor } takes a certification whose pack row is convertible (georgia: senior, Senior SNAP) off the periodic-reporting waiver mid-period (PAMMS 3730:64-65; 3725:29-39, :132-137). A certification whose row is not convertible — or whose token the booted pack does not declare — is 422 certification_not_convertible, naming the pack’s convertible codes (renamed from certification_not_senior, #2209; the default pack declares no convertible row, so every convert there is refused). reason is the jurisdiction’s closed vocabulary snap.certification.esap.conversion_reasons (Georgia: abawd_member, earned_income, member_under_age_floor; required, and non-empty, exactly when a row converts); actor is provenance, not authorization. In one transaction: certification_type becomes the row’s converts_to (georgia senior → standard; the pack schema forbids a waived or convertible target), periodic_report_required is recomputed, the conversion stamps land, the remaining future-serviceable cycles are minted from the 3730 calendar (a conversion past the last serviceable due month records one cancelled / converted_after_last_cycle tombstone), and renewal.snap_certification_converted is staged. The period itself is never touched (3730:69-70; 3725:139-140). The recipient (the live enrollment’s head, from canopy-enrollment) resolves before the write; an unresolvable one is 503 with nothing converted — PAMMS 3725:134 makes the letter mandatory. Replaying the same reason returns the row unchanged. snap.periodic_reporting.conversion_exempt_from_phase_out (Georgia: true) keeps a converted AU reporting past the 3730:21-23 phase-out.

In a jurisdiction that runs no periodic report (no [snap.periodic_reporting] table) a conversion only re-types the certification (#3356): periodic_report_required stays false, no cycle is minted, no event is staged and no letter is sent, since the letter tells the household which reports it now owes. No recipient is resolved, so the 503 above is never answered there.

Due, universe and dashboard feeds

  • GET /v1/renewals/snap/due — keyset-paginated (limit clamped 1..=200, default 50; after_end_date + after_id). Default scope: certifications ending within [as_of, as_of + days] (days default [shared.timing].renewals_api_default_lookahead_days = 90, clamped 1..=366; as_of the ADR-033 tier-2 override, default the service’s legal day: its injected decision clock as a date in the pack’s [jurisdiction].timezone, #2526), soonest first. With active_on: the certifications in force on that date — the SNAP QC / FNS-388 universe (days ignored). Response SnapCertificationPage — items, next_cursor (only when the page was exactly limit rows), total_in_scope (the COUNT(*), first page only). There is no unbounded array mode; canopy-reporting page-loops to exhaustion and asserts extracted == total_in_scope.

  • GET /v1/renewals/{program}/due — the same params and envelope; program = snap returns the SNAP page, every other known program an empty complete page, an unknown slug 422.

  • POST /v1/renewals/snap/universe-snapshots { active_on } freezes an immutable generation in one transaction (UniverseSnapshot { id, active_on, row_count, created_at }, the bulk-cohort source); GET …/{id}/rows?after=<seq> pages it by dense seq (certification_period_id, household_id, application_id, determination_id, and since #806 U-C certification_type — the frozen MT-87 category, on which canopy-eligibility’s COLA admission excludes expedited rows — and continued_by_determination_id, the certification’s chain head, which the bulk case takes as its supersession baseline when present; crates/canopy-contracts-renewals/src/universe_snapshots.rs). Generations are reaped after CANOPY_RENEWALS__UNIVERSE_SNAPSHOT_RETENTION_DAYS (default 30).

  • GET /v1/renewals/overdue — SNAP in-force rows past their certification end, { household_id, program, action_type, due_date, days_overdue } (the cross-program aggregator shape; other programs join once they expose due-date stores). Query (OverdueListParams, crates/canopy-contracts-renewals/src/overdue.rs): as_of (the ADR-033 tier-2 anchor; absent, the service’s legal day, as for the due list, so a case never reads overdue a day early in the jurisdiction’s evening, #2526), limit (1..=500, default 100; out of range is 400, never a silent clamp), and the keyset cursor after_due_date + after_certification_id (both together; a page shorter than limit is the last — the response stays a bare array). GET /v1/renewals/snap/interim-contacts/due?as_of= — certifications with an overdue interim contact (as_of absent: the service’s legal day).

  • GET /v1/renewals/caseload-trend — window (<n>d / <n>w, default 12w, ≤ 366 d / 104 w), bucket (day | week), program (snap only): distinct households with an in-force certification at each bucket close, the days and weeks being legal ones in the jurisdiction’s timezone (#2592), served from the snap_caseload_daily rollup the daily canopy-renewals.caseload-rollup job materializes over [anchor − 735 d, anchor + 8 d]. Absent coverage or a generation older than 48 hours is an honest 503 + Retry-After: 60, never a fabricated series. POST /v1/renewals/caseload-rollup/refresh recomputes now (202 when another caller holds the lock; CLI canopy renewal caseload-rollup-refresh).

Interim contacts, change reports and nudges

  • POST …/{id}/interim-contact { household_id, contact_method ∈ phone | mail | in_person, notes } (PAMMS 3730 — the state midpoint-contact procedure; no federal paragraph sets the cadence, so none is cited, per the snap.certification.interim_contact_months citation row, #2143). The certification must belong to household_id: a certification of another household is refused 409 with the RFC 9457 code certification_household_mismatch before the contact is stamped (#2410). The change report refuses the same pairing with the same code, and both details keep the token as their prefix (#3033).

  • POST …/{id}/change-report { household_id, change_type ∈ income_change | household_change, report_method, description, reported_monthly_income?, reported_household_size? }. The certification must belong to household_id and be in force. For an income_change the 130%-FPL simplified-reporting screen (7 CFR 273.12(a)(5)) runs on facts of record: a write-free canopy-eligibility dry-run of the certification’s determination-of-record against the household’s current canopy-persons facts, screened on the assistance-unit size, gross income and 130%-FPL ceiling that replay used. The reported_* fields are provenance only. The row’s screen_status says why it does or does not carry inputs: not_applicable; screened (derived_household_size, derived_monthly_income, gross_income_limit, screen_determination_id, screen_corpus_hash populated, and requires_redetermination = derived_monthly_income > gross_income_limit, enforced by a DB CHECK); dry_run_unprocessable; eligibility_unavailable — a lawful report is never dropped and a degraded screen never falls back to the caller’s figures.

  • GET /v1/renewals/snap/nudges?household_id=&pending_only= lists the recert nudges the materiality subscriber recorded (RecertNudge: the triggering fact, baseline and dry-run verdicts, benefit_delta_cents, is_material, the action taken). POST …/nudges/{id}/action { household_id, action ∈ filed_recert | dismissed } (ActionRecertNudgeRequest) is guarded WHERE is_material AND action_taken IS NULL — the first decision stands. Filing records intent only. The recorded action_by is the caller’s Actor ({"actor_type":"human","subject":…} for a worker’s delegation, {"actor_type":"service","service":…} for a system caller; #1008), null while pending.

  • The nudge action’s household check (refuse_foreign_nudge, #2545) runs after admission and before the guarded update. household_id is required: axum’s Json extractor refuses a body without it with a 422, before admission. An unknown nudge id keeps the 404. A nudge whose stored household_id is not the body’s is 409 nudge_household_mismatch, whose detail names the path id and the requested household, never the stored owner; the refusal writes nothing and logs one warn! carrying the two ids. The OpenAPI 409 of this route also carries the shared idempotency layer’s conflict (crates/canopy-api/src/idempotency.rs). The check holds the stored owner to the household the request names. It does not tell whether the caller may act in that household: canopy-renewals cannot know which household a worker acts in, so a caller that names the nudge’s own household passes. canopy-web binds the nudge to the worker’s household before it sends that household (canopy-web API).

  • The program-parameterized twins ({program} ∈ tanf | medicaid | caps | wic; snap is 400) are household-level: canopy-renewals keeps no certification for these programs, so the path names only the program, the body names the household_id, and the SnapChangeReport row it inserts is discriminated by program with certification_id null (#2409; the path carried a certification id the handler discarded before).

Periodic-report cycles (PAMMS 3730; 7 CFR 273.12(a)(5)(iii))

Cycles are minted by the daily scheduler (no creation API): one scheduled generation-1 cycle per extended certification, with the 3730 calendar (the 15th-of-prior-month initial notice, the 5th-of-due-month combined notice, month-end closure). The commands record the worker-side workflow; the transition stamps are server-set from the gated clock; out-of-order commands are 409 naming the cycle’s status.

A jurisdiction that runs no periodic report (#3298: no [[snap.certification.categories]] row could owe one, so its pack carries no [snap.periodic_reporting] table) materializes no cycle, mints no frequency-shift or conversion cycles, and answers every command below with 409 periodic_report_not_applicable. A converting row does not by itself require the table (#3356). The cycle reads return what exists, which for such a pack is nothing.

  • …/form { form_kind, complete } — form_kind from [snap.periodic_reporting].accepted_form_kinds (Georgia ["528", "297", "508"]; else 422 naming the list); complete: false → form_incomplete (still eligible for the combined notice), true → form_complete (never un-filed). Legal from scheduled / notice_sent / form_incomplete.

  • …/vcl { reason ∈ reported_change | discrepancy, detail, due_date? } — legal only from form_complete; due_date defaults to sent + vcl_response_days and may not allow under 10 calendar days (3730:218). Fail-closed on the letter: the live enrollment’s head resolves before the transaction and renewal.snap_periodic_report_vcl is staged atomically with the vcl_pending stamp; an unresolvable recipient is 503 with nothing written. detail never rides the event.

  • …/verified (no body) — legal only from vcl_pending.

  • …/complete { changes: [ { change_type, report_method, description, reported_monthly_income?, household_size? } ] } — the 130%-FPL screen runs once, outside the lock, for the whole form; then one locked transaction writes the processed stamp, one change-report row per change, and renewal.snap_periodic_report_processed. Legal from form_complete or verified; completion assigns no new certification period (3730:161).

  • …/reopen { received_date, form_kind?, actor } reopens a terminated cycle when the missing form or verification arrives within [snap.periodic_reporting].reopen_window_days (30) after the due month (Chart 3730.1 rows 4 / 5): validate → canopy-enrollment’s idempotent POST /v1/adverse-actions/{id}/reopen → one local transaction (the cycle rejoins the state machine, the certification reinstates terminated → active). The arm is derived: a cycle that reached the VCL died on verification (row 4; form_kind must be omitted); any other is a nonfiler (row 5; form_kind required). A retry with a different received_date is 409. A request whose received_date the cycle already carries as its reopened_date, while the certification that reopen reinstated is still in force (active or recertifying), replays it: 200 with the cycle as it now stands, checked on the pre-flight read and again under the certification lock before the reinstatement, so a lost-response retry and a racing twin both converge on the one reopen (#2656). A superseded certification keeps the 409.

  • The re-determination queue: when a periodic-report termination dies on an appeal veto or a worker cancel, the terminal consumer mints a PrRedetermination (trigger_kind ∈ action_vetoed | action_cancelled) and marks the cycle cancelled; POST …/redeterminations/{id}/action { household_id, action ∈ redetermined | dismissed } (ActionRedeterminationRequest) is guarded WHERE action_taken IS NULL (404 otherwise), and records the caller’s Actor as action_by, as the nudge action does. Its household check (refuse_foreign_redetermination, #3108) runs after admission and before the guarded update, with the same contract as refuse_foreign_nudge: household_id is required (422 before admission if missing), an unknown id keeps the 404, and an entry whose stored household_id is not the body’s is 409 redetermination_household_mismatch (naming the path id and the requested household, never the stored owner) with nothing written. The check holds the stored owner to the household the request names; a caller that names the entry’s own household passes.

Scheduler

POST /v1/renewals/scheduler/run runs one daily pass now under the scheduler’s advisory lock (202 skipped: true when a replica holds it): cycle materialization, the two 3730 drains, the lapsed-VCL drain, the 7 CFR 273.14(b)(1) Notice-of-Expiration drain and the due-list gauges, each drained to exhaustion in keyset pages within CANOPY_RENEWALS__PR_TICK_BUDGET_SECS. No caller-supplied date — a trigger mutates. The response SchedulerCheckView carries the counters, including the NOE leg’s expiration_notices_sent, expiration_notice_skipped, expiration_notices_late (sent on or after the first day of the last certification month — a delivery defect to investigate), the gauge expiration_notice_elapsed_unsent, and renewals_minted. The pass (scheduler::run_daily_pass) ends with the mint leg, renewal_decisions::mint_due_renewals: every scheduled snap_renewal_decisions row with certification_start_date ⇐ legal today opens its certification through the shared writer (cert_create::create_with_supersede, the recorded pair and type, the event’s recipient and determined_at) — whose supersede retires the old recertifying certification, now past its end, with supersede_reason = new_certification (never retire_renewed_certification; the renewal linkage is the decision row) — and the row becomes minted; a withdrawn decision mints nothing. The hourly background tick’s window is keyed on the LEGAL day (run_window_fenced), so the first probe after legal midnight of a period start mints it. The certification record may trail canopy-enrollment’s successor landing by the pass cadence; enrollment is the issuing authority.

  • 15th-of-prior-month (3730:83): stages renewal.snap_periodic_report_due and moves the cycle scheduled → notice_sent in one transaction; recipient = the live enrollment’s head.

  • 5th-of-due-month (3730:98-108), only for a cycle whose 15th notice was actually sent: schedules the exempt-shaped termination adverse action in canopy-enrollment under the periodic_report provenance triple (reason periodic_report_nonfiling, whose row carries cb_available = false; no narrative, so the letter prints the row’s display_text; the exemption authority is the pack’s [snap.periodic_reporting].nonfiling_exemption_authority, #2212; effective = the last workday at or before month-end per [jurisdiction.holidays]); enrollment’s enact sweep is the month-end closure executor; the cycle records the action id and combined_notice_sent_date, its status untouched. Only a scheduled action is recorded, as in the lapsed-VCL drain: a replay that returns a cancelled action leaves the cycle unstamped (#2671). The drain’s count of triggered actions counts only a stamp that changed the cycle.

  • Lapsed VCL (Chart 3730.1 row 2): a complete form whose checklist lapsed unanswered schedules the periodic_report_verification_failure termination under the same triple, with no narrative and the pack’s verification_failure_exemption_authority (#2212: its own reason row, cb_available = false; canopy-notices fans the pr-vcl-termination letter by reason_code); status stays vcl_pending so a late verification still cures.

  • Notice of Expiration: the drain’s window opens on the first day of the next-to-last month and stays open while the certification is in force today; a certification of two months or less stages the same event at creation. Both arms pre-mint the envelope id as snap_certifications.noe_source_event_id, the correlation the dispatch consumer reads.

  • Renewal due (renewal.snap_due): the one drain that reads status = 'active' alone — a recertifying household already filed.

Error codes

Code Meaning

400

Missing household_id; converted_on outside [certification_start_date, min(today, certification_end_date)]; a periodic-report reopen receipt in the future or before the due month; snap on a program-parameterized route; an X-Canopy-Actor header (actor_header_retired)

401

No bearer (token_missing) or a token the receiver refuses (token_rejected)

403

portal_on_non_portal_route, portal_scope_missing, system_caller_required (a user on a system-only route), actor_not_allowed, required_role_missing (quality_control on a write); on the in-force read, ownership_claim_missing / ownership_mismatch

404

Certification, cycle, nudge or redetermination not found; no certification in force

409

A second active certification; certification_exists_for_determination; certification_household_mismatch, certification_not_in_force; nudge_household_mismatch (a nudge action whose household_id is not the nudge’s, #2545); redetermination_household_mismatch (a re-determination action whose household_id is not the entry’s, #3108); conversion_reason_conflict; a periodic-report command out of order; a reopen outside its window, refused by enrollment, or replayed with a different date

422

An unknown field in a deny_unknown_fields body (e.g. a stale action_by on either action); a nudge or re-determination action body without household_id (#2545, #3108); certification_type_unknown (a token outside the booted pack’s declarable rows; a malformed token fails the CertificationType shape rule at deserialization), certification_period_exceeds_ceiling, certification_type_not_manual; noe_recipient_required; certification_not_convertible, conversion_reason_unknown; an unknown program slug on {program}/due; a form_kind outside accepted_form_kinds or inconsistent with the reopen arm; a VCL due_date under 10 days; bucket / program on the caseload trend

503

Fail-closed, nothing written, retryable: the letter recipient could not be resolved on /vcl and /convert (no live enrollment, no head, canopy-enrollment unreachable); on the caseload trend, absent or stale coverage (Retry-After: 60); no trustworthy key set (keys_unavailable)

Events published

String set from services/canopy-renewals/src; every envelope asserts programs = ["snap"].

  • renewal.snap_certification_created — every certification, by whichever writer.

  • renewal.snap_certification_converted — the mid-period conversion of a convertible pack row (georgia: Senior SNAP) (person_id, certification_end_date, first_due_month — null when the remainder minted no cycle, reason); routed by canopy-notices to the senior-conversion letter.

  • renewal.snap_due — the renewal-due drain; renewal.snap_interim_contact_due — the interim-contact drain.

  • renewal.snap_expiration_notice_due — the 7 CFR 273.14(b)(1) Notice of Expiration trigger (once per certification; renewal_deadline = the recert_timely_filing_day of the last month, clamped to the end); routed to notice-of-expiration.

  • renewal.snap_expiration_notice_superseded (ExpirationNoticeSupersededV1: source_event_id = the fenced NOE’s envelope id, certification_id, household_id) — staged in the transaction that clears a staged NOE fence (a continuation moved the end, or a continuation-class termination ended the period); consumed by canopy-notices.noe-superseded.

  • renewal.material_change — a material mid-certification change (change_type, change_reasons, the previous / new amounts, the raw cents); routed to change-in-circumstances.

  • renewal.snap_periodic_report_due (RenewalPeriodicReportDueV1: due_month, file_by_date, closure_date) → pr-due; renewal.snap_periodic_report_vcl (RenewalPeriodicReportVclV1: vcl_reason, vcl_sent_date, vcl_due_date, closure_date) → pr-vcl; renewal.snap_periodic_report_processed (RenewalPeriodicReportProcessedV1) — consumed by canopy-enrollment’s completion tombstone.

Consumers

Six durable queues; every handler runs on the inbox transaction, parks an unrecognized routing key, and sends a producer-contract violation (a missing required field, an out-of-vocabulary token) to the DLQ rather than guessing.

  • canopy-renewals.renewal-filings ← application.submitted: a recertification filing projects onto its certification (status = recertifying, renewal_application_id, renewal_submitted_at = received_at) in one idempotent UPDATE; an initial filing is acked; zero rows (superseded, terminated or recertifying under another application) is a WARN renewal_filing_not_applied, never a retry. IN_FORCE_CERT_STATUSES (active, recertifying) governs every in-force predicate; the renewal-due drain alone stays = 'active'.

  • canopy-renewals.adverse-actions ← enrollment.adverse_action_{terminated,vetoed,cancelled} (non-periodic_report sources acked untouched): terminated → certification terminated + the cycle terminated on the noticed date; vetoed, or cancelled for any reason but periodic_report_completed → the cycle cancelled + one PrRedetermination.

  • canopy-renewals.determinations ← determination.completed.snap and determination.record_back_refused. On an approved expedited_postponed basis: the causal guard (the event supersedes the active certification iff none, or it names it as previous_determination_id, or its determined_at is newer), then the expedited certification (1–2 months, no periodic report, no interim contact, the at-certification NOE) superseding the prior. On recert_reinstatement: locate the lapsed certification by renewal_application_id, retire it (status = expired, renewal_determination_id stamped — the only writer of that column), and open a certification of the approval’s assigned category (certification_category, #1703) from the signed dates — the token passes through as CertificationType and its membership in the booted pack’s [[snap.certification.categories]] is checked once at the write (an undeclared token is the typed InputDefect::UnknownCategory, naming the pack’s codes, to the DLQ; #2209). On a record_back_refused (postponement_not_open): the certification the disowned determination opened is superseded with supersede_reason = record_back_refused and its staged NOE unstaged. On recert_approval — approved OR denied (renewal_decisions::record): under the household lock, locate the recertifying certification by renewal_application_id (none → DLQ, the reinstatement arm’s remedy), then causal::supersedes against the application’s snap_renewal_decisions row — an approval (its signed pair anchored at the renewed end + 1, its certification_category as the type; a missing category is the typed RecertApprovalWithoutCategory DLQ) → scheduled, a denial → withdrawn, an older or equal decision → acked unchanged (renewal_decision_stale_arrival). NOTHING is minted there and the recertifying certification is NOT retired: it stays in force to its end (universe snapshots and current-period continuations keep reading it); the scheduler’s pass mints at period start (below).

  • canopy-renewals.notice-dispatched ← notice.dispatched (notice_of_expiration only): stamps noe_dispatched_at / noe_dispatched_date set-once by noe_source_event_id, falling through to the snap_certification_adjustments row that snapshotted a cleared id. The predicate noe::noe_evidence_dispatched is the evidence contract.

  • canopy-renewals.continuations ← enrollment.continuation_applied / enrollment.continuation_terminated: the adjuster records one snap_certification_adjustments row per event (applied | no_change | stale | superseded_by_new_certification | pending_certification), moving the certification end and type (the approval’s certification_category on an in_cert_conversion of an expedited certification; a conversion without one, or with a token the booted pack does not declare, is refused to the DLQ) by a watermark-fenced compare-and-set, recomputing periodic_report_required (false for expedited and for a row with periodic_reporting_waived = true, else the [snap.periodic_reporting] threshold and phase-out test) and rescheduling the interim contact (interim_contact_due_date = start + [snap.certification].interim_contact_months for a row with interim_contact = true, else none — georgia standard only; #2209), and re-staging or clearing the NOE fence (renewal.snap_expiration_notice_superseded when a fenced id is cleared); a termination sets terminated + terminated_at, cancels open cycles and clears the fence.

  • canopy-renewals.materiality ← income.claimed, asset.claimed, expense.claimed, household.member_claimed (ADR-027 §6): for a household with an active certification, a write-free dry-run (POST /v1/eligibility/determine/dry-run, as_of = the change’s valid_from) against the determination-of-record; the verdict diff lands in recert_nudges (idempotent on the event id), and a material change — a verdict flip, or a benefit delta ≥ [snap.materiality].benefit_delta_threshold_cents — emits renewal.material_change. An event whose envelope timestamp is older than the certification’s created_at is skipped by the ordering rule as already in the baseline, not a change — the outbox may deliver it after the worker opens the period (#2196); a change effective before the cert start is manual review (Decision J). A 4xx dry-run is manual review, not a nudge; the dry-run and the persons reads send on canopy-renewals' sender (system origin; …ELIGIBILITY_URL, …PERSONS_URL), and the subscriber is not registered without one (subscriber::wire).

Configuration

CANOPY_RENEWALS{ELIGIBILITY_URL, PERSONS_URL, ENROLLMENT_URL, PR_TICK_BUDGET_SECS, UNIVERSE_SNAPSHOT_RETENTION_DAYS} (services/canopy-renewals/src/config.rs); the jurisdiction keys [shared.timing].renewals_api_default_lookahead_days, [snap.certification].{recert_timely_filing_day, recert_reinstatement_window_days, recert_late_renewal_window_days}, [snap.periodic_reporting].{vcl_response_days, accepted_form_kinds, reopen_window_days, conversion_exempt_from_phase_out}, [snap.certification.esap].conversion_reasons, [snap.materiality].benefit_delta_threshold_cents. Identity settings are the baseline IDENTITY_ISSUER / IDENTITY_INTERNAL_URL (configuration reference) and the client key CANOPY_RENEWALSIDENTITY_CLIENT_PRIVATE_KEY.

Edit this page · default