canopy-applications API Reference

For a service integrator (the BFF, canopy-eligibility, canopy-notices, canopy-renewals, the applicant portal): canopy-applications is the ACA §1413 single-streamlined intake service. One application requests several programs; each program row carries its own processing clocks anchored on the jurisdiction-legal filing date. Tables: the data-models page. The design narratives this page used to carry — the reopen and postponement sagas, the record-back truth table, the day-30 leg, the renewal filing matrix — live in snap-intake-completion and snap-recert-interview-reinstatement; the finalize saga in ADR-038; the day-30 cutover in its runbook.

Base URL

container port 8003 (host: CANOPY_PORT_CANOPY_APPLICATIONS_8003 in .ports.env)

Authentication

Bearer token: a canopy-identity token for this receiver (its aud is urn:canopy:service:canopy-applications), 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-appeals, canopy-eligibility, canopy-notices, canopy-reporting and canopy-verification hold system edges to canopy-applications, and the portal one for its scoped routes. Most writes admit any system caller and the writer bar, most reads any system caller and caseworker+, with canopy-web’s readers (and services' onward delegations where listed) on the delegated reads; the provisioning, batch and saga-facing routes are system-only; the portal’s portal:intake, portal:applications:read and portal:documents:write scopes admit it on the applicant, read and upload routes; withdrawal, the interview waiver, the caseload trend and the rescan are canopy-cli operator routes. A refusal is 403 with its ReceiverDenial code (ADR-049 Amendment 14); each route’s constant is in the authorization inventory.

Database

canopy_applications

Admission specifics

  • Named human. A document accept or reject, the scan override, the reopen cure attestation, the postponement revert and the rep disqualification admit a system caller, then refuse it 403 (acting_worker, services/canopy-applications/src/api/mod.rs): each is a worker’s personal act and records the worker’s subject from its delegation.

  • Ownership. The portal’s X-Canopy-Applicant claim must bind the application on GET /v1/applications/{id}, the document list and upload (the upload’s person_id must also be the claim’s person) and the draft read, patch and finalize (require_owned_application / require_owned_person): 403 ownership_claim_missing / ownership_mismatch. The check is inert for every other caller.

  • Client pin. GET …/determination-context answers only canopy-eligibility (principal.client()): its system token, or its onward delegation on the writer bar; any other system caller is 403 after admission.

  • Subject and reason rules (ADR-049 Amendment 15). GET /v1/assignments/household-ids serves a delegation only its own subject’s assignments unless it holds supervisor or admin (403); a system caller reads any subject’s. POST /v1/rep-disqualifications/{id}/cancel lets a user without supervisor or admin (a writer through canopy-appeals) reverse a bar only for hearing_overturned (403 otherwise).

  • Actors (#1008). Every attribution a route records comes from the caller, never a body or path field: a typed actor from principal.actor() — a user as Human (the canopy subject), a system caller as Service (its client id) — or, on the human-only acts, the worker’s subject. On the wire an Actor is {"actor_type":"human","subject":"…"} or {"actor_type":"service","service":"…"}. The portal’s finalize records canopy-portal (finalize_actor). The writer bar excludes quality_control, so it is 403 on every write (services/canopy-applications/tests/qc_read_only_test.rs).

  • Outbound. A handler’s calls to canopy-persons, canopy-verification, canopy-renewals and canopy-eligibility ride the request’s outbound (RequestOutbound: the worker’s delegation onward, or canopy-applications' system token for a system caller, the portal included), the inline saga drives included. The scheduler legs (the manual trigger included), the saga ticks and the finalize reconciler send on canopy-applications' sender (system origin; src/api/deps.rs, main.rs).

Routes

Mounted by routes() in services/canopy-applications/src/api/mod.rs; spelling from crates/canopy-contracts-applications/src/paths.rs. 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; + ownership = the portal’s applicant claim (above); human only = a system caller is admitted, then 403.

Route Access Success Refusals (RFC 9457 code)

POST /v1/applications

system; writer via canopy-web, canopy-cli

201 Application

409 reopen_episode_open > renewal_already_filed > program_already_open; 422 bad programs_requested, renewal_requires_snap, renewal_certification_mismatch, rep_scope_uncovered, representative_barred; 502 renewal_certification_unavailable, persons_unavailable

GET /v1/applications

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

200 [Application]

422 bad filter / inverted range

POST /v1/applications:batchGet

system

200 [ApplicationCore]

422 over 500 ids

GET /v1/applications/caseload-trend

system; caseworker+ via canopy-cli

200 CaseloadTrend

422 window / bucket / program

GET /v1/applications/{id}

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

200 ApplicationWithPrograms

404

PUT /v1/applications/{id}

system

200 ApplicationWithPrograms

404; 409 reopen_episode_open > program_already_open; 422 bad programs_requested, renewal_requires_snap, rep_designation_required, rep_scope_uncovered, representative_barred; 502 persons_unavailable

DELETE /v1/applications/{id}

system; writer via canopy-cli

204

404

POST /v1/applications/{id}/interview/waive

system; writer via canopy-cli

200 Application

404

POST /v1/applications/{id}/interview/complete

system; writer

200 Application

404; 409 already_completed

POST /v1/applications/{id}/interview/schedule

system; writer

201 InterviewProjection

409 program_terminal, open_row_exists; 422 past_date, beyond_sop_date, headroom_violated, per-mode fields

POST /v1/applications/{id}/interview/reschedule

system; writer

201 InterviewProjection

409 no_open_row; 422 as schedule

GET /v1/applications/{id}/interviews

system; caseworker+; worker reader via canopy-web

200 [InterviewProjection]

—

GET /v1/applications/{id}/interviews/{interview_id}

system; caseworker+

200 InterviewProjection

404

GET /v1/applications/{id}/agency-pends

system; caseworker+; worker reader via canopy-web

200 [AgencyPendEpisode]

—

POST /v1/applications/{id}/programs/snap/reopen

system; writer

201 ReopenEpisode (200 replay)

404; 409 not_denied, reopen_episode_open, later_episode_approved, reopen_row_moved; 422 window_closed, denial_reason_not_reinstatable, interview_not_satisfied, cure refusals; 502 persons_unavailable

POST …/programs/snap/reopen-attestations

system; supervisor or admin (human only)

201 ReopenAttestation

422 future_cure_date

GET …/programs/snap/reopen/eligibility

system; caseworker+; worker reader via canopy-web

200 preview

—

GET …/programs/snap/reopen/episodes

system; caseworker+; worker reader via canopy-web

200 [ReopenEpisode]

—

POST …/programs/snap/reopen/resume

system; writer

200 ReopenEpisode

404; 409 saga_not_incomplete

POST /v1/applications/{id}/programs/snap/postpone

system; writer

201 PostponementEpisode (200 replay)

404; 409 / 422 (gate ladder below); 502 persons_unavailable, verification_context_unavailable

GET …/programs/snap/postponement

system; caseworker+; worker reader via canopy-web

200 PostponementView

—

POST …/programs/snap/postponement/complete

system; writer

200 PostponementEpisode

404; 409 postponed_items_open, postponement_undetermined; 502

POST …/programs/snap/postponement/revert

system; supervisor or admin (human only)

200 PostponementEpisode

404; 409 postponement_determined; 422 reason_not_manual

POST …/programs/snap/postponement/resume

system; writer

200 PostponementEpisode

404; 409 saga_not_incomplete

POST /v1/applications/scheduler/run

system; supervisor or admin

200 / 202 SchedulerRunOutcome

422 unknown leg, day30_disabled, expedited_downgrade_disabled

GET /v1/applications/day30-shadow-findings

system; supervisor or admin via canopy-web

200 [Day30ShadowFinding]

—

GET /v1/applications/{id}/sms-contact

system

200 SmsContactResponse

404

GET /v1/applications/{id}/determination-context

system; writer via canopy-eligibility; canopy-eligibility only (client pin)

200 DeterminationContextResponse

403 other caller; 404

POST …/programs/{program}/administrative-denial

system; writer

201 AdministrativeDenial (200 replay)

409 idempotency_key_reused, administrative_denial_stale_state, determination_already_recorded, already_administratively_denied; 422 interview_not_required, nomi_not_dispatched, denial_recipient_unresolved, interview_not_satisfied, no qualifying evidence

GET /v1/administrative-denials/{id}

system; caseworker+; worker reader via canopy-web, canopy-appeals

200 AdministrativeDenial

404

PUT /v1/applications/{id}/sections/{program}/{section}

system; writer

200 ApplicationSection

404; 409 section_household_mismatch; 422 unknown / inapplicable section, payload; 502 persons_unavailable

GET /v1/applications/{id}/sections

system; caseworker+; worker reader via canopy-web

200 [ApplicationSection]

404

POST …/programs/{program}/complete-data-collection

system; writer

200 CompleteDataCollectionResponse

404; 422 missing sections

POST /v1/applications/{id}/ele-consent

system; portal (portal:intake); writer

202

404; 409 application_household_mismatch > a status outside submitted / processing; 422 bad consent_source, no household_id

POST /v1/applicants/verify-credential

portal (portal:intake)

200 VerifyCredentialResponse

401 uniform (unknown code or wrong passcode); 403 portal_only_route

POST /v1/applicants/drafts

portal (portal:intake)

201 CreateDraftResponse

403

PATCH /v1/applicants/drafts/{id}

portal (portal:intake) + ownership

204

404; 422 base64 / current_step

GET /v1/applicants/drafts/{id}

portal (portal:intake) + ownership

200 GetDraftResponse

404 (also when expired)

POST /v1/applicants/drafts/{id}/finalize

portal (portal:intake) + ownership

201 FinalizeResponse

404; 409 digest mismatch / key reuse; 422; 503 + Retry-After

POST /v1/applicants/drafts/reap

system

200 ReapDraftsResponse

403

POST /v1/applicants/recover/initiate

portal (portal:intake)

200 always (outcome in body)

403

POST /v1/applicants/recover/kill/{token}

portal (portal:intake)

200 RecoverKillResponse

404

GET /v1/applicants/recover/{recovery_id}

system

200 RecoverDetailResponse

404

POST /v1/households/{household_id}/authorized-representatives

system; writer

201 AuthorizedRepresentative

422 representative_barred, representative_person_not_found, programs required; 502 canopy-persons unreachable or failing

GET /v1/households/{household_id}/authorized-representatives

system; caseworker+; worker reader via canopy-web

200 list

—

GET /v1/authorized-representatives/{id} (?include_inactive=true)

system; caseworker+

200

404

PUT /v1/authorized-representatives/{id}

system; writer

200

422 representative_barred, representative_person_not_found; 502 canopy-persons unreachable or failing

DELETE /v1/authorized-representatives/{id}

system; writer

204

404

POST /v1/authorized-representatives/{id}/disqualify

system; supervisor or admin (human only)

201 RepDisqualification

404; 409 authorized_representative_household_mismatch, open bar, designation_set_changed; 422 rep_letter_recipient_unresolved, organization_rep_not_disqualifiable, evidence_refs_required

GET /v1/rep-disqualifications/{id}

system; caseworker+

200 RepDisqualification

404

POST /v1/rep-disqualifications/{id}/cancel

system; supervisor or admin; writer via canopy-appeals (hearing_overturned only below supervisor)

200 RepDisqualification

404; 409 rep_disqualification_household_mismatch, terminal; 422 appeal_id_required, appeal_id_forbidden

GET /v1/persons/{person_id}/rep-disqualifications

system; caseworker+; worker reader via canopy-web

200 [RepDisqualification]

—

POST /v1/assignments

system

201 HouseholdAssignment

409 unique_violation (the worker already holds the household); 422 a body without worker_id, an invalid subject or an unknown field

GET /v1/assignments?subject=

system

200 list

400 a missing or invalid subject, an unknown query field

GET /v1/assignments/household-ids?subject=

system; caseworker+ via canopy-eligibility, canopy-verification (own subject unless supervisor or admin)

200 {items, next_cursor}

400 a missing or invalid subject, an unknown query field

DELETE /v1/assignments/{id}

system

204

404

GET /v1/households/{household_id}/assignments

system; caseworker+ via canopy-web, canopy-enrollment

200 list

—

POST /v1/applications/{id}/documents

system; portal (portal:documents:write) + ownership

201 ApplicationDocument

404; 422 size / MIME / fields

GET /v1/applications/{id}/documents

system; portal (portal:applications:read) + ownership; case reader via canopy-web

200 [ApplicationDocument]

—

GET …/documents/{document_id}/content

system; worker reader via canopy-web

200 bytes (Cache-Control: no-store)

404; 409 quarantined

POST …/documents/{document_id}/accept

system; writer (human only)

200 ApplicationDocument

403 no human; 404; 409 quarantined

POST …/documents/{document_id}/reject

system; writer (human only)

200 ApplicationDocument

403; 404; 409; 422 empty rejection_reason

POST …/documents/{document_id}/scan-override

system; supervisor or admin (human only)

200 ApplicationDocument

403; 404; 409 not skipped / already overridden; 422 reason bounds

POST …/documents/{document_id}/rescan

system; supervisor or admin via canopy-cli

200 ApplicationDocument

404; 409 already pending

Intake

Create. POST /v1/applications — household_id, programs_requested (validated against canopy_reference::Program, each program at most once — #2682: ONE 422 lists every unknown value and every repeated program, judged before any read or write by the validator create, finalize and PUT share), submission_channel, submitted_by, submitted_by_role, authorized_representative_id, received_at, optional expedited_screening, tanf_service_type, renews_certification_id. Atomic: the applications row, every application_programs row and the expedited screening commit together. Clocks anchor on applications.legal_filed_date — the receipt day in [jurisdiction].timezone, shifted on a weekend or holiday per [shared.application_processing].filing_receipt_rule (next_business_day in Georgia, PAMMS 3105:484-485; calendar_day in the default ruleset). A pack under next_business_day may also set [shared.application_processing].filing_close_of_business, a 24-hour "HH:MM" time in [jurisdiction].timezone (#1670): a receipt on a business day at or after that time files on the next business day, and legal_filed_basis reads after_hours_shift. A pack without the key keeps no filing hours, so a business-day receipt files that day at any hour; no opening hour exists, so a receipt before the office opens files that day too. A weekend or holiday receipt follows filing_receipt_rule whatever its hour. legal_filed_basis is one of business_hours, after_hours_shift, weekend_holiday_shift and calendar_day_receipt. A medicaid row’s standard_processing_deadline is legal_filed_date + medicaid_disability_days when the roster (read from canopy-persons before the transaction) records a disabled / disabled_veteran member, else + medicaid_days (42 CFR 435.912(c)(3)); a failed roster read is 502 persons_unavailable. A tanf row’s window is tanf_days. No federal rule sets a TANF processing clock (42 USC 617), so the window is the pack’s: Georgia’s is 45 calendar days, cited to PAMMS TANF 1105 (MT 82) in the georgia pack’s citations.toml (#3167). A pack may refine a tanf, medicaid or chip row’s deadline (domain::program_deadline, #3169): <program>_count_from counts the window from filing_day (legal_filed_date, the default) or receipt_day (the received_at day in [jurisdiction].timezone, never shifted), and <program>_non_workday_deadline keeps a deadline that lands on a weekend or [jurisdiction.holidays] date as_is (the default) or moves it to the prior_workday or next_workday. Georgia’s TANF counts from the receipt day and moves to the prior workday (PAMMS TANF 1105:79, 283, 289), so a Saturday 2026-03-07 receipt is due Tuesday 2026-04-21 and a Wednesday 2026-03-04 receipt, whose 45th day is a Saturday, is due Friday 2026-04-17. Georgia’s Medicaid and CHIP rows run the same two rules, the 90-day disability window included (PAMMS 2050:89-90, 2060:179-180 and 186, 2065:26, 215, 217 and 220; #3175). PAMMS 2050:90 dates a fax or internet application by the day the form was transmitted, which canopy does not record, so such a filing counts from its receipt day as well. Finalize and an added program on PUT compute the deadline the same way, from the stored received_at and legal_filed_date. The 201 echoes the row exactly as committed (workflow_due_date, reopen_pending, post_lapse_pending derived).

Renewal filing. renews_certification_id names the canopy-renewals certification this filing renews; application_kind is derived (recertification iff set, else initial), programs_requested must be exactly ["snap"] and expedited_screening absent (422 renewal_requires_snap, detail = snap_only / no_expedited_screening). The certification is read fail-closed from GET /v1/renewals/snap/certifications/{id} (CANOPY_APPLICATIONS__RENEWALS_URL; 502 renewal_certification_unavailable) and judged on the legal receipt day, in this order: 422 renewal_certification_mismatch with detail ∈ not_households_certification | certification_not_in_force | certification_lapsed (a late re-application files as initial) | renewal_too_early | certification_conversion_pending; 409 renewal_already_filed (one recertification per certification, uq_applications_one_renewal_per_certification). For these codes only, detail is a closed token a client may branch on. The SNAP row’s deadline is set by kind (domain::snap_deadline_by_kind): timely → the last workday on or before the period end; untimely → legal_filed_date + snap_standard_days.

Duplicate guards. Under the household’s intake:{household_id} then reopen:snap:{household_id} advisory locks: 409 reopen_episode_open when a live snap row already carries active_reopen_episode_id; 409 program_already_open (detail = the first offending program) when the household holds a non-terminal row for a requested program (domain::TERMINAL_PROGRAM_STATUSES = determined, approved, denied, withdrawn, voided). Nothing is written on any refusal.

List. GET /v1/applications — household_id, submitted_by, program / repeated programs, status / repeated statuses, repeated program_statuses (an active application_programs row in one of the given statuses — of the program and/or a program in programs when those are also given; a token outside PROGRAM_ROW_STATUSES, the application_programs_status_check vocabulary, → 422), from / to (inclusive; inverted → 422), limit (default 50, max 200), offset, post_lapse_pending (true / false / absent), order (newest default, oldest). Filters AND together. Every listed Application carries post_lapse_pending (an approved expedited row whose released postponement was never claimed for conversion, or whose window lapsed unsettled — derived on read from store::post_lapse_pending_sql) and workflow_due_date (the active SNAP row’s mutable current_workflow_deadline).

Reported income (#2231). FinalizeRequest.reported_income carries the apply wizard’s two income questions as answered: anyone_works (true / false / null when unanswered) and other_sources, each a code of the pack's [[intake.reported_income_sources]] (Rulesets › Reported income sources) at most once. A code the pack does not declare is refused 422 (code unknown_reported_income_source), a repeat 422 (duplicate_reported_income_source), each naming the source and before any write. Finalize stores it on the application in the filing transaction (applications.reported_anyone_works / reported_income_sources), and every application read serves it as Application.reported_income; null when no report was recorded (an application filed another way, or a portal filing from before #2231). It is applicant-reported, never verified, and carries no amounts; the portal sends income: [], so it becomes no income fact.

Reads. GET /v1/applications/{id} → ApplicationWithPrograms; each ApplicationProgram carries standard_processing_deadline, expedited_participation_deadline, expedited_downgraded_at, administrative_denial_id, and the derived recert_verification_due_cap. POST /v1/applications:batchGet { application_ids } → the compact ApplicationCore (id, household_id, status, expedited_eligible, received_at); absent ids are simply missing. GET /v1/applications/caseload-trend — window (<n>d / <n>w, default 12w, ≤ 366 d / 104 w), bucket (day | week), program; zero-filled inflow buckets.

Update / withdraw. PUT changes submission_channel, authorized_representative_id, programs_requested (the complete desired set, under the program-code validator create, finalize and PUT share — an unknown or repeated program is the same 422, never silently collapsed; the applications.programs_requested column and the program rows change in one transaction, #2702: added programs get fresh clocks, dropped ones are soft-deleted). Create’s program-set rules hold on PUT too (#2711), each refused as create refuses it, before any write. A recertification’s set stays exactly snap (422 renewal_requires_snap, detail snap_only). An added program the household already holds open is 409 program_already_open, and an added snap row behind the household’s open reopen episode is 409 reopen_episode_open, with create’s precedence. The representative must be permitted and scoped for each added program, or for every program when the PUT names a different representative (rep_designation_required, representative_barred, rep_scope_uncovered). A PUT that restates the program set takes the household’s intake lock and then reopen:snap, in create’s order, so it serializes with a concurrent filing for the same household. DELETE withdraws (active = false, status = withdrawn), closes every active program row in the same statement (withdraw_application, store/mod.rs: active = false; a row still outside TERMINAL_PROGRAM_STATUSES takes withdrawn, a decided row keeps its decision — #2149), closes an open reopen episode incomplete_closed and clears the row’s active_reopen_episode_id in that statement too, as a PUT that drops a program does for that row — both take the household’s reopen:snap lock before any row lock, which a reopen takes too, so neither misses a reopen committing beside it (#2703; ck_application_programs_reopen_pointer_live forbids a pointer on an inactive row) and closes every open appointment row in the same transaction.

ELE consent. POST /v1/applications/{id}/ele-consent takes EleConsentRequest (household_id, consent_source, language, notes) and stages application.ele_consent_recorded for the application’s household; it writes no applications row. consent_recorded_by is the caller’s actor (principal.actor()), never a body field. household_id is required: a body without it is 422. A consent_source other than applicant_portal or worker_attestation is 422, and an unknown application 404. The application must belong to the body’s household_id (#2545): another household’s is refused 409 application_household_mismatch before the status check, and nothing is staged. The detail names the request’s ids, never the stored household. An application whose status is not in ELE_CONSENT_ALLOWED_STATUSES (submitted, processing) is then an uncoded 409. The household check ties the application to the household the request names; it is not an authorization of that household. canopy-applications cannot know which household a worker acts in, so a caller that names the application’s true household passes. canopy-web binds the application to the worker’s household before it sends the consent (canopy-web).

Letter recipients. Every household letter this service stages — the interview appointment and NOMI, the reopen, the postponement’s written request, the administrative denial, the day-30 deny and pend, and the representative-disqualification fan-out’s household letters (the fan-out also letters the representative) — goes to the household’s head, chosen by the one fleet rule (canopy_types::household::select_head_by: an explicit head / head_of_household claim, else the portal’s self applicant frame, else the first member). The roster comes from canopy-persons' compact POST /v1/households:batchGet on the jurisdiction’s legal day (household_head::head_of_household, #2670): relationships only, so no SSN is decrypted and no Pub-1075 ssn.accessed event is staged, as the full bundle GET /v1/households/{id}/full would for every member. A household canopy-persons does not hold as active, or one with no members, has no head; a failed read stays a failure, never a guessed recipient. The letters' one person-keyed read — the representative’s display name on the disqualification letters, including the effect leg’s corrected letters — reads the person core through POST /v1/persons:batchGet with an empty projection (person_core::person_core, #2681), never the SSN-decrypting GET /v1/persons/{id}; an absent person is rep_letter_recipient_unresolved (422) or, on the leg, a failed row.

Interviews

  • Schedule — { interview_mode, scheduled_at | interview_by_date, dial_in_number?, location?, contact_name?, contact_phone? }. Guards, in order: G1 past_date; G2 beyond_sop_date (the legal date ≤ the SNAP row’s immutable standard_processing_deadline); G3 program_terminal (409); G4 headroom_violated — a chain-initial appointment must leave [snap.intake].interview_nomi_headroom_days before the SOP (on a recertification row also renewal_certification_end_date − [snap.certification].recert_interview_verification_headroom_days; once the bound is unachievable the 201 carries warnings: ["nomi_headroom_short"] instead); G5 an absent interview_by_date on on_demand defaults by kind. Per-mode fields: telephone and on_demand need dial_in_number; face_to_face the location set. One open appointment per application (open_row_exists on a concurrent double). Stages application.interview_scheduled; the head-of-household recipient resolves degrade-loudly (a person-less event skips the letter, never the schedule).

  • Reschedule supersedes the open row (superseded_by, unique — the chain never branches) and inserts the replacement under the same guards (G4 does not re-apply); no_open_row otherwise.

  • Complete is a compare-and-set (interview_completed_at IS NULL AND NOT interview_waived; a second completion or a waived interview is 409 already_completed), stamps interview_completed_by with the caller’s actor (the worker, or the system caller’s client id), and stages application.interview_completed when a row was closed. Waive — { reason } ∈ elderly_disabled | hardship | homebound.

  • Reads — the chain newest first; one immutable row (the canopy-notices render-time fetch; a leaked id under another application is 404) carrying nomi_staged_at / nomi_dispatched_at; GET …/agency-pends — the 7 CFR 273.2(h)(3) pend episodes.

SNAP reopen (7 CFR 273.2(h)(2))

POST …/programs/snap/reopen { cure_kind: verification_provided | interview_completed | attestation, attestation_id?, idempotency_key } reopens a procedurally denied SNAP row within the window without a new application. The cure date is derived from the denial’s own evidence, never claimed; arm A (cure within the standard period) → benefits from the filing date; arm B (days 31–60) → the cure date becomes the application date; arm R on a recertification row (7 CFR 273.14(e)(2)) → the reason gate (snap.certification.recert_reinstatable_denial_reasons, else 422 denial_reason_not_reinstatable), the interview belt (422 interview_not_satisfied), the snapshotted reopen_deadline_date (422 window_closed), and benefit_effective_date = max(cured_on, renewal_certification_end_date + 1). The preview (GET …/reopen/eligibility) returns reopenable, blocked_by, the dates and one server-derived row per cure kind — the UI computes nothing. An attestation (POST …/reopen-attestations { attested_cured_on, reason, document_ids }) is a supervisor’s durable cure-date record. After the reopen commits, the canopy-applications.reopen-saga runs three fenced steps — void later live SNAP rows of the household whose program row predates the void horizon, the episode’s reopened_at stamped under the household lock (application.snap_episode_voided; a SNAP row written after the horizon — a filing after the episode ended, or a row a PUT adds — is never voided, #2703, and nothing is voided once a later administrative denial, a withdrawal or a PUT dropping SNAP has closed the episode incomplete_closed, #2677), cancel their open interviews and verification items (superseded_by_reopen), dispatch the post-reopen determination — started inline ([inline-saga-drive]) and again on the five-minute leg; a stalled saga is incomplete, and POST …/reopen/resume retries the same saga (409 saga_not_incomplete otherwise).

SNAP expedited postponement (7 CFR 273.2(i)(4))

POST …/programs/snap/postpone { idempotency_key } opens a postponed-verification episode on a positively screened row; items, certification_months (1 or 2 by the federal snap-procedure.json filing day) and postponed_deadline (canopy_common::expedited_postponement::certification_end) are server-derived. One pure gate ladder (api/postponement_gates.rs) decides both the POST’s first refusal and the GET’s blocked_by, in order: not_expedited_eligible (422) → no_head_of_household (422) → expedited_window_missed (409, window_not_forfeited) → program_row_terminal (409) → postponement_open (409) → conflicting_episodes (422) → identity_not_verified (422; the head’s, or the filing representative’s, completed identity row) → interview_not_satisfied (422) → prior_postponement_unresolved (409); the item derivation that follows refuses an empty list 422 nothing_to_postpone and a window that leaves the calendar 422 param_defect (api/postponement_support.rs). GET …/postponement → PostponementView (state, episode, history with saga step / state / error_code, gates, postponable + blocked_by, would_postpone_items, open_postponed_items). …/complete (body {}) releases once every postponed item has a completed verification row and the expedited determination has settled (409 postponed_items_open / postponement_undetermined); inside the window the same transaction claims the in-cert conversion and re-enters the saga at dispatch_conversion; past it the application is flagged post_lapse_pending. …/revert { reason } (identity_unverified | interview_not_completed | eligibility_proof_not_provided; the system token verification_request_rejected is 422 reason_not_manual) is refused once a determination settled the episode (409 postponement_determined). The canopy-applications.postponement-saga steps are local_postpone → request_postponed_verifications → dispatch_determination (→ dispatch_conversion on a claimed release); …/resume retries an incomplete saga. Every SNAP episode writer serializes on the household’s reopen:snap:{household_id} lock.

The inline saga drive is bounded (#2195). Six requests start their episode's saga drive after their own transaction commits: …/snap/postpone, …/postponement/complete (an in-cert release), …/postponement/revert, …/postponement/resume, …/snap/reopen and …/reopen/resume. Each waits for that drive at most CANOPY_APPLICATIONS__INLINE_SAGA_DRIVE_BOUND_SECS (default 5 s; Configuration Reference) and then answers with the episode as it stands, under the status code it always had. The body has the same shape either way: when the drive ended inside the bound, saga_step / saga_state are its outcome (complete, awaiting_retry, incomplete); when the bound passed first, saga_state is running and the determination ids are still null. A slow canopy-verification, canopy-persons or canopy-eligibility therefore no longer makes a committed write look failed to its caller. The drive is not cancelled when the bound passes: it runs on its own task to its end, holding the saga lease, so the five-minute leg and a retried request claim nothing beside it (store::saga::claim_or_resume_saga), and whatever it leaves unfinished the leg resumes. A caller that needs the outcome reads GET …/postponement or GET …/reopen/episodes until saga_state leaves running; it never infers failure from an unfinished state in the write's response. The helper is inline_drive::drive_bounded_then_read_back (src/inline_drive.rs).

Scheduler legs

POST /v1/applications/scheduler/run — optional { "legs": […​] } from interview-nomi, day-30-disposition, expedited-downgrade, rep-disqualification-effect, rep-disqualification-expiry, reopen-saga, postponement-saga (api/scheduler.rs); absent runs every canonical leg in order; an unknown token is 422. Runs under the advisory lock (202 skipped: true when held), deliberately unfenced — every leg’s send-once row fences make re-runs idempotent. Response per leg: examined, staged, skipped, warned.

  • interview-nomi — classifies open appointment rows past their date: a missed chain-initial row flips to missed and stages application.interview_missed (send-once on nomi_source_event_id); a superseded chain-initial row whose date passed stages the PAMMS 3105:240 superseded_predate NOMI; a missed non-initial row flips with no NOMI.

  • day-30-disposition — CANOPY_APPLICATIONSDAY30_MODE ∈ off (default; a named request is 422 day30_disabled) | shadow | enforce (requires CANOPY_APPLICATIONSDAY30_ENFORCE_CUTOFF_DATE). Scans SNAP rows whose current_workflow_deadline arrived, reads verification state from canopy-verification fail-closed, and judges each row against the day30_policy truth table (default agency fault); every judgment lands in day30_shadow_findings. In enforce, the pend arms record an agency-pend episode, extend the clock by snap_standard_days and stage application.pending_agency_delay; the deny arms record an administrative denial on the business-day-forward execute date. GET /v1/applications/day30-shadow-findings (run_day, limit ≤ 500, offset) is the metrics read.

  • expedited-downgrade — enforce-only; stamps expedited_downgraded_at set-once on positively screened rows past expedited_participation_deadline (processing continues on the standard clock; never a denial).

  • rep-disqualification-effect / -expiry — below. reopen-saga / postponement-saga — the five-minute retry legs.

Recording determinations and the determination context

canopy-applications is the one writer of a program row's determination (#3202): the determination consumer (Events consumed) projects each determination.recorded.<program> verdict through record_back::apply (api/record_back.rs) — the household lock, the #1707 guard, the stamp, the episode settles and the parent recompute, in the inbox transaction — and the postponement and reopen sagas record their own determinations in-process through the same stamp. No route records a determination: the record-back route (POST /v1/applications/{id}/programs/{program}/determination) and its request body are retired, and canopy-web reads the application after a determine instead (canopy-web › Read after a determine). The row's status is the closed RecordedProgramStatus vocabulary (src/domain.rs): eligibility's approved and denied pass through, and sanctioned records as denied with sanctioned as the first denial_reason_codes entry (recorded_outcome; the mapping table is on State Machines › Application Status; #2170, #628). The row write and the parent applications.status recompute are one transaction: the first non-pending program moves submitted → processing; all-terminal rows flip it to determined. A snap determination stamps determination_basis_kind and settles the episode its basis names by compare-and-set; a basis naming an episode that was reverted, released or closed first is refused (postponement_not_open) with the determination unstamped, and the episode's own determination replays. A determination that lands after the application was withdrawn records nothing (classify_absent_row, #2149): the withdrawal already closed the program rows, so the parent stays withdrawn and no episode settle is attempted (stamp_then_settle_named_episodes, #2174). The verdict's eligibility_request_id is kept on the row for the sibling rule below.

  • Sibling rule (store::record_determination, #2324, #3202). Determination ids are UUIDv7, minted when the program service determines, so a later determination’s id sorts after an earlier one’s. The stamp lands when the row has no determination, when it is the row’s own (a replay), when both are of one eligibility request (application_programs.determination_request_id) and the incoming one outranks the row’s — approved over denied, else the newer id — or when they are of different requests and the incoming id is newer. A row or a stamp with no request id counts as another request. Otherwise the determination is superseded and acked; nothing is stamped, no settle runs, and the parent status does not recompute. A per-member program (Medicaid, CAPS, WIC) therefore ends on its approved sibling whatever order its determinations arrive in. The reopen and postponement sagas, which call the same stamp (RecordOutcome) naming their determine response’s request, leave the row alone in that case, as they do for a row another writer moved.

  • Refusal as state (#3202). A postponement_not_open refusal is kept on the program row as record_back_refusal (RecordBackRefusal: determination_id, code, refused_at), which GET /v1/applications/{id} serves on the row; the next recorded determination clears it. determination.record_back_refused is staged only when the row did not already name that determination’s refusal, so a redelivery, or a saga and the consumer refusing one determination, stage one event (refuse_if_named_episode_not_open, api/postponement_record_back.rs).

GET /v1/applications/{id}/determination-context — the orchestrator’s fail-closed pre-claim read (canopy-eligibility only: its system token or its onward delegation): application_id, filing_date (legal_filed_date), and per active program status, determination_received_at, administrative_denial_id, application_kind, the reopen_episode block, the live agency_pend, and on the snap row either postponement (an open, undetermined episode whose verification rows are on record) or postponement_pending_step (the saga’s step token until then), plus conversion for a released, claimed, unsettled in-cert conversion inside its deadline. A recertification application’s context also carries renewal_certification_end_date — the renewed certification’s inclusive end snapshotted at filing (applications.renewal_certification_end_date); absent on an initial application — the derivation’s recert_approval input (an approval on or before that day anchors the new period at the day after it; DeterminationContextResponse, crates/canopy-contracts-applications/src/applications.rs).

Administrative denial (7 CFR 273.2(h)(2))

POST …/programs/{program}/administrative-denial { reason ∈ missed_interview | verification_not_provided, idempotency_key, expected_program_status, actor? } records a procedural denial as a first-class, appealable, curable record. missed_interview requires [<program>.intake].interview_required = true (422 interview_not_required otherwise) and dispatched NOMI evidence (nomi_not_dispatched); verification_not_provided qualifies only open, eligibility-critical, enforceably anchored, past-due items from canopy-verification, and on a recertification row also a satisfied interview (interview_not_satisfied). The recipient resolves before the transaction (denial_recipient_unresolved). One transaction: program-row lock → idempotency probe → guards → the record on the row’s current episode slot (episode_id NULL for the initial intake episode; on a reopened row the open episode active_reopen_episode_id names, which the denial closes incomplete_closed, #2677) → program row denied + administrative_denial_id, episode pointer cleared → parent status → application.denied.{program} with reopen_deadline_date snapshotted through the per-program reopen right ([<program>.intake].denial_reopen_window_days; recertification: renewal_certification_end_date + recert_reinstatement_window_days). Past the role and actor checks the idempotency key decides every refusal: one is answered only when the key holds no record; a key holding the request’s reason replays that record (200), another reason is 409 idempotency_key_reused. A record already filling the episode’s slot is 409 already_administratively_denied naming it, never a 500. GET /v1/administrative-denials/{id} is the appeals hearing-view fetch.

Intake sections

Per-program section storage for the worker-portal guided intake (ApplicationSection, one row per (application_id, program, section_name) while active). section_name is a closed slug set (household_composition, identity, citizenship, residency, income_employment, resources, expenses_shelter, work_registration, special_circumstances, tanf_child_support, tanf_personal_responsibility, tanf_time_limits), each applicable to a program subset decided by SectionName::applicable_programs (crates/canopy-contracts-applications/src/sections.rs): household_composition, identity, residency and income_employment apply to every program (snap, tanf, medicaid, chip, caps, wic); citizenship to every program but wic (8 U.S.C. § 1615; 7 CFR 246.7 names no citizenship condition); work_registration (7 CFR 273.7; 45 CFR 261) and special_circumstances (its flags are 7 CFR 273 constructs) to snap and tanf; resources and expenses_shelter to snap; the three tanf_* sections to tanf — so SNAP has 9 sections, TANF 10, Medicaid / CHIP / CAPS 5 and WIC 4. PUT …/sections/{program}/{section} validates the typed payload (the SNAP verification sections' verifications array defaults to []; household_composition needs one members ref; the tanf_time_limits month counts, federal_months_used and state_months_used, are unsigned, so a body with a negative one is refused 422 as not matching the section, #3597) and refuses a section outside the program’s set 422 section '<section>' is not applicable to program '<program>' (validate_segments, services/canopy-applications/src/store/sections.rs). POST …/complete-data-collection returns the updated ApplicationProgram + the recomputed applications_status, or 422 with the missing section slugs — the program’s set minus the completed rows (missing_completed_sections).

The household_composition, expenses_shelter and special_circumstances payloads name a household (SectionName::names_household). After the application read, a payload naming a household other than the application’s is refused 409 section_household_mismatch before anything is written (refuse_foreign_section, services/canopy-applications/src/api/sections.rs; #2545). The detail names the application id and the requested household, never the stored owner, and the refusal logs one warn! carrying the two ids. The check ties the section to the application’s household; it is not an authorization of that household. canopy-applications cannot know which household a worker acts in, so a caller that names the application’s true household passes. canopy-web binds the save to the worker’s household before it sends it (canopy-web).

Every person a payload names must also be on the application’s household roster (#3032). The people are each payload’s person_id, head_of_household_person_id and address_person_id fields, which canopy-web’s binding checks, and also the nested references a direct caller can send: the members[].person_id of household_composition (canopy-web builds them from the roster) and the income_employment and resources verifications[].person_id (canopy-web’s form posts none). expenses_shelter and special_circumstances name no person. After the household check, the upsert reads the roster from canopy-persons' compact POST /v1/households:batchGet on the request’s outbound, as of the legal day of the service’s decision clock in [jurisdiction].timezone (refuse_people_off_the_roster, services/canopy-applications/src/api/sections/roster.rs). It is the read the letter recipients use: relationships only, no SSN decrypted, no audit event. A person off the roster is refused with the same 409 section_household_mismatch. A household canopy-persons does not hold as active has no members, so every person it names is off the roster. The detail names the person and the application id, never the household or its roster; the refusal logs one warn! with those ids. The check runs before the program and applicability checks, and nothing is written.

The roster read makes intake saves depend on canopy-persons, so its failure mode is decided: it fails closed. With canopy-persons unreachable, failing or unconfigured, a payload naming any person is refused 502 persons_unavailable, a retryable answer. No section row is written and no event is staged. A payload naming no person makes no read, so canopy-persons being down never blocks it: expenses_shelter, special_circumstances, or an income_employment or resources payload with no verifications. The read happens before the write’s transaction begins, so no database connection is held across it. Like the household check, this is a consistency check, not an authorization.

Applicant credentials, drafts and recovery (ADR-026)

The privacy-first portal flow (ADR-026); every route here is portal-only.

  • POST /v1/applicants/verify-credential { code: "HH-xxxxxxxx", passcode: "NNNN-NNNN-NNNN" } → { application_id }; an unknown code and a wrong passcode are the same 401 with argon2 timing equalized.

  • POST /v1/applicants/drafts mints a reserved application_id, the HH- code, the 12-digit passcode (returned once), kdf_salt, enc_version. PATCH …/{id} stores { ciphertext, nonce, enc_version, current_step } blind and slides the 30-day expiry; GET …/{id} returns the blob (404 once expired). POST …/reap (system) deletes expired drafts and their credentials, skipping drafts whose finalize is in flight or whose finalize_operations row is non-terminal.

  • POST …/{id}/finalize (FinalizeRequest — applicant, household_members, income, assets, expenses, programs_requested, ele_consent, notify_*, address, confidentiality, reported_income) validates programs_requested as create does (unknown or repeated programs are a 422 before any canopy-persons call, #2682), refuses a reported_income naming a source twice (422 duplicate_reported_income_source, #2231), and refuses an income, asset or expense amount canopy-persons would refuse, before any canopy-persons call (#2958): a negative one (422), or one past canopy_contracts_persons::claims::max_fact_amount() (422 fact_amount_out_of_range). An address, when one is sent, carries a required county_fips, and finalize refuses, before any canopy-persons call, one that is not a served county of the address's State (422 county_required, county_state_unknown, county_not_in_state or county_not_served; Rulesets › Served counties, #3376); an application with no address still files. It also refuses (422, naming the field) a fact string canopy-persons' validator would refuse: it runs the persons contract’s own validate() on the value the saga writes (finalize_saga::income_fact and its asset and expense siblings, #2959). Then it creates persons → household → members → address → facts over canopy-persons as applicant self-report claims, then in one local transaction inserts the applications row under the reserved id and deletes the draft, keeping the credentials as the login. It runs as the recoverable ADR-038 saga, the only finalize path (finalize_saga::finalize_via_saga; #2662 deleted the pre-saga path and its flag): a draft-row-locking claim on finalize_operations, (operation, generation, step) receipt tags on every persons write, a keyed-HMAC request digest per generation, held persons events released post-commit, and an identical 201 replay for a completed attempt, including a retry after the attempt that committed and deleted the draft. An ele_consent opt-in stages application.ele_consent_recorded with consent_recorded_by = the portal, as Service canopy-portal (api::finalize::finalize_actor, #1008). 409 on a digest mismatch; 503 + Retry-After while another attempt holds the lease or the reconciler is compensating.

  • Recovery: POST /v1/applicants/recover/initiate always answers 200 with outcome ∈ pending (recovery_id, reveal_at) | confidential_blocked | challenge_failed (uniform for an unknown code and a wrong DOB). The DOB is checked against the submitter’s person core (POST /v1/persons:batchGet, empty projection — #2681): this pre-authentication path decrypts no SSN and stages no ssn.accessed event, and makes the same one read for a right and a wrong DOB; POST …/recover/kill/{token} cancels the pending recovery and locks the case; GET …/recover/{recovery_id} (system) is canopy-notices' read of the application-time contact and the kill-switch token — never the passcode.

Authorized representatives (ACA §1413) and disqualifications (7 CFR 273.2(n)(4))

  • Designations are per household, soft-deleted (active = false). Create: { representative_person_id, relationship, written_consent_on_file, effective_date, expiration_date, programs, rep_kind }; programs is required, from snap | tanf | medicaid | caps | wic (CHIP is never independently applied for — 422); rep_kind individual (default) or organization (must carry both org fields; bar-exempt). The representative person must be one canopy-persons holds: create, and an update that names a representative_person_id, read it first through canopy-persons as the request’s caller. An absent person is 422 representative_person_not_found, and a canopy-persons that cannot answer is a 502; either way nothing is written, so a typo’d id never leaves a designation whose rep letters can resolve no recipient (#2541). The authority gate runs in every granting transaction under the person advisory lock: a new grant for a program with an open bar is 422 representative_barred; the as-rep filing on POST /v1/applications needs a date-active designation whose unsuspended scopes cover every requested program (422 rep_scope_uncovered). PUT applies programs as a diff and gates new grants only; ?include_inactive=true on the read serves a revoked designation (the canopy-notices letter validation needs existence).

  • POST /v1/authorized-representatives/{id}/disqualify { household_id, reason ∈ benefit_misuse | false_information, evidence_kind ∈ overpayment_claim | documented_finding, evidence_refs, actor? } bars the representative person for SNAP: one open bar per person, the record in noticing, and one application.rep_disqualification_noticed per household holding an active individual designation plus one rep letter — recipients resolved fail-closed before the transaction. The window [effective_from, effective_through) is dispatch-anchored: the rep letter’s notice.dispatched sets noticed_on, effective_from = noticed_on + disqualification_advance_notice_days, effective_through = effective_from + disqualification_duration_months ([snap.authorized_representatives], capped at 12 / floored at 1 by the loader). The rep-disqualification-effect leg moves pending → in_effect and suspends the person’s snap scopes; -expiry moves in_effect → expired and clears exactly this bar’s suspensions. POST /v1/rep-disqualifications/{id}/cancel { household_id, reason ∈ entered_in_error | hearing_overturned, appeal_id?, actor? } (hearing_overturned requires appeal_id; canopy-appeals calls it with the deciding worker’s delegation onward, and its rep-overturn retry with its system token, both naming the appeal’s household) clears the suspensions and letters the noticed set with application.rep_disqualification_rescinded. The record carries noticed_household_ids (the appeals ownership set) and origin_designation_id.

    Both writes require household_id (#3106, the #2545 pattern): axum’s Json extractor refuses a body without it with a 422 before admission. After the body checks and the resource read, the disqualify holds the designation’s household_id to the body’s, before the organization guard; the cancel holds the body’s household to the record’s ownership set (PAMMS 3120:81-83): noticed_household_ids (store::rep_disqualifications::noticed_household_ids) or, while no letter recipient is on file, the origin designation’s household read with inactive designations included (store::rep_disqualifications::origin_designation_id); a record with neither is nobody’s. An unknown id is a 404; a mismatch is a 409 authorized_representative_household_mismatch or rep_disqualification_household_mismatch before any upstream read or write, with the detail naming the path id and the requested household, never the stored owner (api::rep_household_check). A caller that names the resource’s own household still passes: canopy-applications admits a delegation by role alone and cannot know which household a worker acts in, so the check holds the stored owner to the household canopy-web’s binding, or canopy-appeals' appeal, names.

Household assignments (Pub 1075 AC-6)

The source of truth for the household gate canopy-enrollment, canopy-eligibility and canopy-verification consume. Create, the by-worker list and delete admit only system callers (the mutations are system provisioning); the household-ids page also admits canopy-eligibility’s and canopy-verification’s onward delegations and the per-household list canopy-web’s and canopy-enrollment’s, both on caseworker+. The worker is an opaque OIDC subject (#1008), a referent the provisioning caller names, so it never rides a path segment: create takes { worker_id, household_id }, and the reads take the URL-encoded ?subject= query parameter. Body and query types refuse unknown fields. The retired /v1/workers/{worker_id}/assignments… spellings are not mounted (404). Soft-delete via unassigned_at; GET /v1/assignments/household-ids?subject= is the ids-only keyset page (limit ≤ 200, after) canopy-eligibility’s alerts scoping (#596) and canopy-verification’s pending-verifications scoping (#2336) read.

Documents (ADR-042)

Upload is multipart/form-data — file, person_id, document_type (a code of the pack's [[intake.document_types]]; any other is refused 422 naming it; Rulesets › Intake document types), optional document_kind, program (storage namespace, default snap), uploaded_by_source; the bytes pass canopy-store::validate_upload (size ≤ 10 MiB, magic bytes, MIME allowlist, SHA-256) and the row is returned quarantined at scan_status = pending. The promotion worker settles pending → clean | infected | skipped | error; every serving and review surface gates on the derived scan_viewable. Content re-verifies sha256 + size against the row and refuses 409 unless viewable. Accept (no body) and reject ({ rejection_reason }) write the reviewing worker’s subject from its delegation; scan-override { reason } (8–500 chars) releases a skipped document and stages application_document.scan_overridden with the reason’s SHA-256; rescan (supervisor or admin via canopy-cli: canopy application document-rescan, or a system caller) resets to pending under a bumped generation, revoking any standing acceptance.

Expedited SNAP screening

expedited_screening on the create request evaluates 7 CFR 273.2(i): gross income < $150 and liquid assets ≤ $100, or income + assets < shelter + utilities, or a migrant farmworker with assets ≤ $100. A match sets expedited = true and the SNAP row’s set-once expedited_participation_deadline beside the untouched standard_processing_deadline, inside the intake transaction.

Error codes

Code Meaning

400

A body that is not syntactically valid JSON — axum 0.8’s JsonSyntaxError (the handlers take axum::Json with no rejection remapping); a syntactically valid body missing a required field is 422; an X-Canopy-Actor header (actor_header_retired)

401

No bearer (token_missing) or a token the receiver refuses (token_rejected); a failed applicant credential on verify-credential (uniform, the route’s own)

403

Admission: portal_on_non_portal_route, portal_scope_missing, portal_only_route (a non-portal caller on an applicant route), system_caller_required, actor_not_allowed, required_role_missing (quality_control on a write); ownership: ownership_claim_missing, ownership_mismatch. The service’s own: a system caller on a human-only act, a non-canopy-eligibility caller on the determination context, another worker’s subject on the household-ids page, a non-hearing_overturned cancel below supervisor

404

Application, appointment, episode, record, designation, assignment, draft, recovery or document not found (the withdrawn and the unknown read alike)

409

Intake: reopen_episode_open, renewal_already_filed, program_already_open. Interviews: already_completed, program_terminal, open_row_exists, no_open_row. Episodes: reopen_in_flight, expedited_window_missed, program_row_terminal, postponement_open, prior_postponement_unresolved, postponed_items_open, postponement_undetermined, postponement_determined, postponement_not_open, saga_not_incomplete. ELE consent: application_household_mismatch (the application belongs to another household than the body’s household_id, #2545). Sections: section_household_mismatch, a payload naming a household other than the application’s (#2545) or a person not on its household’s roster (#3032). Denial: idempotency_key_reused, administrative_denial_stale_state, determination_already_recorded, already_administratively_denied. Representatives: authorized_representative_household_mismatch and rep_disqualification_household_mismatch (the designation or record is not the body’s household_id's, #3106), an existing open bar, designation_set_changed, a terminal record. Documents: a quarantined or already-pending document. Finalize: a request-digest mismatch. Any route: an Idempotency-Key reused with a different body.

422

A syntactically valid body missing a required field or carrying a wrong type — axum 0.8’s JsonDataError, the rejection naming the field. Intake: bad programs_requested, renewal_requires_snap, renewal_certification_mismatch, rep_scope_uncovered, representative_barred, inverted dates, bad filters. Interviews: past_date, beyond_sop_date, headroom_violated, per-mode fields. Episodes: window_closed, denial_reason_not_reinstatable, interview_not_satisfied, future_cure_date, not_expedited_eligible, no_head_of_household, conflicting_episodes, identity_not_verified, nothing_to_postpone, reason_not_manual. Scheduler: an unknown leg, day30_disabled, expedited_downgrade_disabled. Denial: interview_not_required, nomi_not_dispatched, denial_recipient_unresolved. Representatives: rep_letter_recipient_unresolved, organization_rep_not_disqualifiable, evidence_refs_required, appeal_id_required, appeal_id_forbidden. Sections, drafts, documents: payload validation; a batch over 500 ids.

502

persons_unavailable, verification_context_unavailable, renewal_certification_unavailable — a dependency read failed; nothing written

503

Finalize: another attempt holds the lease or the reconciler is compensating (Retry-After); no trustworthy key set (keys_unavailable)

Events consumed

  • determination.recorded.snap, .tanf, .medicaid, .chip, .caps, .wic (DeterminationRecordedV1) on queue canopy-applications.determinations (#3202): canopy-applications projects each program’s determination from canopy-eligibility’s verdict, with no gateway in between (determination_subscriber). A verdict whose request an order placed (origin present) or whose basis is mass_change_cola is acked and writes nothing (projects). Any other runs record_back::apply on the inbox transaction, with the record-back’s status mapping (domain::recorded_outcome: sanctioned records as denied, sanctioned first in the codes). Every outcome — recorded, superseded, no live row, withdrawn, administratively denied, refused — is acked and logged at INFO with ids only. A payload that is not a recorded verdict under its own key is an error and dead-letters once its attempts are spent (#1014); a database or broker failure retries.

  • notice.dispatched — two set-once evidence stamps: notice_type = nomi → nomi_dispatched_at on the appointment row (the only lawful day-30 denial evidence); notice_type = expedited-postponed-approval → approval_letter_dispatched_at on the postponement episode; notice_type = rep-disqualification-rep → the bar’s noticed_on and window.

Events published

String set from crates/canopy-contracts-applications/src/events.rs and services/canopy-applications/src; ids, tokens and dates only (ADR-004), every envelope stamped with the row’s programs.

  • application.submitted (ApplicationSubmittedV1: application_id, household_id, application_kind, renews_certification_id, renewal_timely, received_at) — both the worker create and the portal finalize; consumed by canopy-renewals' canopy-renewals.renewal-filings.

  • application.withdrawn; application.expedited_identified (a 7 CFR 273.2(i) match at intake); application.ele_consent_recorded (consent_source; consent_recorded_by, an Actor object — canopy-medicaid parses only that shape and dead-letters any other).

  • application.interview_scheduled (mode, scheduled_at / interview_by_date, reschedule_of, the recertification keys), application.interview_completed, application.interview_missed (miss_kind, reschedule_by_date, denial_on_date, reschedule_deadline_passed, the recertification keys) — routed by canopy-notices to the appointment, on-demand and NOMI letters.

  • application.pending_agency_delay (one per agency-pend episode: cause, pended_on, prior_deadline, extended_deadline) → the agency-pending letter.

  • application.denied.{snap,tanf,medicaid,chip,caps,wic} — staged only by the administrative-denial writers, with administrative_denial_id, reason, legal_filed_date, reopen_deadline_date (only where the program grants a reopen right) and, on a SNAP recertification, reinstatable / reinstatement_window_open → the noa-denial letter.

  • application.reopened.snap; application.snap_episode_voided → the reopen-supersession-void letter.

  • application.snap_cure_attested (#3397): staged in the transaction that inserts a supervisor's cure attestation, so the act reaches the audit trail whether or not a reopen later uses it. attestation_id, attested_cured_on, attested_by (the supervisor, an Actor object), document_ids and reason_sha256, the digest of the reason; the prose stays on the row.

  • application.snap_postponed, application.snap_postponement_completed, application.snap_postponement_reverted.

  • application.rep_disqualification_noticed, application.rep_disqualification_rescinded — one per recipient, discriminated by recipient_kind.

  • application.applicant.recovery_initiated (consumed by canopy-notices.recovery), recovery_confidential_blocked, recovery_killed, recovery_completed.

  • determination.record_back_refused (DeterminationRecordBackRefusedV1: determination_id, reason = postponement_not_open, refused_at) — consumed by canopy-renewals' canopy-renewals.determinations.

  • application_document.scan_completed, scan_overridden (overridden_by, the releasing supervisor’s subject as a bare string), acceptance_revoked, scan_requeued — the ADR-042 scan lifecycle, indexed by document_id.

  • application_section.updated (section_name, completed, last_edited_by — the editor as an Actor object).

Edit this page · default