canopy-web API Reference

For a contributor working on the worker-portal BFF: every route canopy-web mounts, the gate each runs under, and the upstream call it makes. Caseworker workflow is the SNAP Caseworker Guide; the page surfaces are Worker Portal Screenshots; the colour tokens are the Orchard Design System.

NOTE
canopy-web is a server-rendered htmx BFF; its pages carry no utoipa decorators and have no OpenAPI document. The JSON composition surface (/v1/composition/*) is documented by the CompositionApi document at GET /api-doc/openapi.json. That document is committed as docs/modules/ROOT/openapi/web.json and checked against what the service serves by a unit test, which cargo xtask api-docs --offline also runs (canopy_web::openapi::served).
Base URL

canopy-web’s public origin, CANOPY_WEB__PUBLIC_ORIGIN (always https; on the devstack https://web.canopy.test:<port>;, served by the ingress TLS proxy in front of container port 8080)

Authentication

A canopy-identity web session (ADR-049 Amendments 18 and 19). A worker signs in at the deployment’s one upstream identity provider (Kanidm on the devstack) through canopy-web’s relying party; canopy-identity federates the upstream’s answer into a session, and canopy-web’s session engine keeps it fresh and serves each request (auth::serve::serve_session). An unauthenticated request to a protected route is redirected to /login?return_to=… (middleware::require_auth); a request whose session store cannot be read, or whose stale session’s maintenance has not finished within the page budget, answers 503 with Retry-After: 5 instead.

Session

canopy-web’s own PostgreSQL store (ADR-009 Amendment 2; tables on the data model). The session_context layer, outermost on the protected and composition routers, loads the session the cookie names once per request. Sliding idle deadline of 8 hours by default (CANOPY_WEBSESSION_TTL_SECONDS, floor 300 s, read at boot), slid when less than the deadline less a minute is left; whatever its idle deadline, the engine ends the session, logged expired, once it can no longer be kept fresh, at the latest at the federated session’s own end. Cookies: Host-canopy_session (SameSite=Strict, a browser-session cookie), Host-canopy_login_flow (SameSite=Lax, 900 s, the flow in flight) and Host-canopy_reauth (SameSite=Lax, 30 days); all HttpOnly and Secure, always.

Database

canopy_web — sessions, the composition-override layers (ADR-022) and the event outbox/inbox; no benefit-domain data (canopy-web Data Model).

Outbound identity

Every call a request handler makes, read or write, presents the worker’s delegation: a canopy-identity token for that one target, minted through the request’s outbound over the worker’s session (auth::Outbound, a canopy_auth::WebOutbound), and minted once more after a receiver’s 401. A call whose bearer cannot be minted fails closed (auth_unavailable), and a handler can extract only the roster serve_session bound to its request (the boot roster is layered as clients::SharedRoster, which only the serve reads), so nothing a handler sends goes without the worker’s identity. canopy-web’s own system token (WebSender::system_bearer) serves only work no request owns: the worker-directory sink and the worker-name refill. canopy-web boots only with CANOPY_WEBIDENTITY_CLIENT_PRIVATE_KEY and CANOPY_WEBUPSTREAM_CLIENT_SECRET (Configuration Reference › canopy-web). The session’s credential never leaves the BFF.

Outbound paths, redirects and links

Every upstream request path is an UpstreamPath, and every formatted redirect target, like every href or hx-get URL built in Rust with a query value or a producer’s id, a LocalTarget (typed_path.rs, #2539): the upstream_path! / local_target! formats take only bare {} placeholders, checked at compile time, and every value goes in percent-encoded as one segment or one query value, so form or path text cannot add a segment, a query parameter or a header line. A local-target value must be typed (an id, a program, an integer, a date or a static slug), so an id read back from another service links only once it parses (a queue or palette row whose id does not is offered without a link, or not at all); free text read back from another service may stand in an upstream path as Text, and an empty, . or .. one refuses the call before it is sent. A search term or other free text rides a link only as an encoded query value. The one off-origin redirect, to the upstream’s authorization endpoint, is an IssuerTarget, which only the relying party’s authorization request constructs; the handoff page’s off-origin targets (a restarted flow’s authorization request, the upstream’s end-session endpoint) are URLs canopy-auth built, never request input. There is no general external redirect. cargo xtask web-paths audit keeps redirects, upstream paths and URL query values from being formatted as text anywhere else.

Person-keyed writes

canopy-persons admits a worker’s delegation by role and knows nothing of the household a worker acts in, so binding a worker’s write to that household is canopy-web’s job (the #996 decision). Its one canopy-persons write client, ScopedClients::persons, takes a PersonsWritePath (persons_write.rs, #2540), never an UpstreamPath: the person create (/v1/persons), a path beneath one household (/v1/households/{id}…), a path beneath one person (/v1/persons/{id}…), or the end of one pregnancy (/v1/pregnancies/{fact_id}, #3147). The person path is built only from a ProvenPerson, whose one constructor finds the person among the household’s roster members (fact_editor::prove_household_member reads GET /v1/households/{id}, never the SSN-decrypting /full bundle, #2680). The pregnancy end names no person, so it is built only from a ProvenPregnancy, whose one constructor finds the fact among a proven person’s own pregnancies (PersonsWritePath::end_pregnancy). Each suffix joins beneath its base (UpstreamPath::join) or refuses the path before anything is sent. A per-target blessing of the canopy-persons client (into_authorized / into_neutral) is refused at every verb. So a person-keyed persons write that skips the membership proof does not compile.

Person reads

canopy-persons decrypts the SSN, and stages a Pub-1075 ssn.accessed event for each person who has one, on GET /v1/persons/{id}, and on the person search GET /v1/persons?search= and the household bundle GET /v1/households/{id}/full only when their projection names person_ssn (#2705, #2986). The Income, Assets and Expenses tabs read the bundle projecting only their own fact group, and the Address tab its addresses, pregnancies and homelessness periods (addresses,pregnancies,homelessness, #3147); the Persons tab, which shows each member’s last four and parents, projects person_ssn and parent_child (#3047). A read that needs only member ids, relationships, names, dates of birth or one person’s own facts takes none of them (#2680): the members come from GET /v1/households/{id} (household_head::read_roster), names and dates of birth from POST /v1/persons:batchGet under the empty projection (ServiceClients::person_cores, household_head::read_named_roster), a read retried and deadline-bounded like a GET (InternalClient::post_read), and one person’s facts from GET /v1/persons/{id}/addresses and GET /v1/persons/{id}/income, which serve a soft-deleted person too, and from POST /v1/persons:batchGet for that one person projecting pregnancies (include_inactive, #3147). The roster serves the membership proof of every person-keyed write (fact_editor::prove_household_member), the head of household the create-enrollment, create-certification and file-application actions resolve, and the file-appeal requestor check; the roster with names serves the change-history members, the file-appeal requestor picker, the Medicaid categories tab's cooperation and qualifying-activity section (#3191, #3205) and the SNAP ABAWD tab's work-registration section (#3218); the person core serves the case hero’s head name, the representatives' names, the process page’s and intake form’s applicant name, and the names and ages on the determination roster and the Medicaid categories tab; the proven person’s own facts serve the address editor’s redaction guard (addresses) and the pregnancy end’s ownership proof (pregnancies), and the person’s pending proposals serve the IEVS accept’s retry lookup (income/proposals?discrepancy_id=, #2546). The batch serves a soft-deleted person still on the roster too (include_inactive, #2705), so those views name them; only an id canopy-persons does not know falls back to Person xxxxxxxx, "Unknown", "Unknown applicant" or a blank. The SSN-decrypting reads stay where the SSN’s last four is shown: GET /v1/persons/{id} on the Household tab, and the bundle projecting person_ssn on the Persons tab. Case search and the ⌘K palette search under an empty projection, which opens no SSN (#2705).

Fact reads

The Income, Assets, Expenses and Persons tabs and the CAPS tab's parents-and-children section decode the household bundle as canopy-persons' contract type, HouseholdFull, with its MemberFull, Person, Income, Asset, Expense and ParentChildRelation (#3377); canopy-web keeps no private copy of those shapes. The decode is strict: a fact or member canopy-web cannot read fails the whole read. The Income, Assets, Expenses and Persons tabs then show their error state with Retry, and the CAPS section its "couldn't load" line with the tab Partial. A fact or member is never left out of a list that otherwise renders: a worker who sees the list sees everything canopy-persons served. Two more reads follow the same rule. The Persons tab's membership ids come from GET /v1/households/{id} decoded as HouseholdWithMembers, and a roster that does not parse hides every remove and relationship form behind the visible removal-unavailable note. The process page's gross-income preview decodes GET /v1/persons/{id}/income as Income, and a member whose income does not parse makes the total "—", never a sum without that member.

Roster and search reads

Every other read of GET /v1/households/{id} decodes HouseholdWithMembers, and both person searches (GET /v1/persons?search=) decode Person, under the same strict rule (#3398); canopy-web keeps no private roster, household or search-hit shape, and a member's person id is a PersonId from the decode on. A read that does not decode takes the path a failed fetch of that surface already takes. The shared roster read (household_head::read_roster) fails, so a membership proof before a fact, parent–child, TANF work-standard or appeal write refuses the write with that action's roster-unavailable answer, filing an application answers roster-unavailable, head-of-household resolution reports an upstream failure and never a headless household, and a member picker shows its roster-unavailable option. The Determination tab shows its household-roster error block, the Household tab its members error block and the degraded address card, the WIC Nutritional Risk tab its error block, and the case hero a "—" member count under an "Unknown" head. The process page shows no household size, applicant or income total. The case search shows its error fragment with Retry, and the command palette treats its persons leg as failed: the error arm, or the incomplete-list line over the notices that did load.

Appeal reads

The Appeals list (GET /v1/appeals) and My Queue's appeals source (GET /v1/appeals/queue) decode canopy-appeals' contract type, AppealRequest, as the Pending Hearings panel and the case page's Appeals tab do (#3408); canopy-web reads no appeal field by an untyped key. The decode is strict, and an appeal that does not decode fails the read. The Appeals list then shows its error state, never a list with that appeal missing or a blank where its field was, and My Queue treats its appeals source as failed: its error arm, or the incomplete-list line over the items that did load.

Audit event reads

The dashboard's Audit Events panel and the case page's Activity tab decode canopy-security's GET /v1/security/events as its contract type, AuditEvent, as the audit log and its citation do (#3408). The decode is strict, and an event that does not decode fails the read: the panel shows its error state with Retry and the Activity tab its "Couldn't load activity" block, never the remaining events alone or a row reading "unknown" where a field was missing.

Overdue case reads

The dashboard's Overdue Cases panel decodes canopy-renewals' GET /v1/renewals/overdue as its contract type, OverdueCase (#3408). The decode is strict, and a case that does not decode fails the read: the panel shows its error state with Retry, never the remaining cases alone or a row with a blank where a field was missing. The supervisor KPIs' SLA-at-risk tile reads the same route only to count its rows, and decodes none of them.

IEVS hit reads

The dashboard's IEVS Alerts panel decodes canopy-verification's GET /v1/verifications/ievs/discrepancies as its contract type, IevsHit (#3408). The decode is strict, and a hit that does not decode fails the read: the panel shows its error state with Retry, never the remaining hits alone or a row with a blank where a field was missing. The supervisor KPIs' exceptions tile reads the same route only to count its rows, and decodes none of them.

Cross-program alert reads

The dashboard's Cross-program Alerts panel decodes canopy-eligibility's GET /v1/eligibility/cross-program-alerts/all and …​/scoped as their contract type, CrossProgramAlert (#3408). The decode is strict, and an alert that does not decode fails the read: the panel shows its error state with Retry, never the remaining alerts alone or a row with a default program or severity where a field was missing.

WIC reads

canopy-web decodes canopy-wic's answers as their contract types (#3408): the dashboard's Upcoming Appointments panel reads GET /v1/wic/appointments/upcoming as WicAppointment, the case page's Nutritional Risk tab reads each member's GET /v1/nutritional-risk-assessments as WicNutritionalRiskAssessment, and the nutritional-risk action decodes the same type from its create. The decodes are strict. An appointment that does not decode fails the panel's read, which shows its error state with Retry. An assessment that does not decode fails that member's read, which the tab marks as an incomplete list. Neither shows the remaining rows alone, or a row with a default where a field was missing. An appointment carries no location, so the panel names the WIC clinic on every row.

ABAWD tracking read

The SNAP ABAWD tab's tracking records are canopy-snap's GET /v1/abawd/tracking, decoded as its contract type, AbawdTracking (#3408), and shown as JSON. The decode is strict, and a list with a window that does not decode is a failed read: the tab shows its "data unavailable" card, never the remaining windows alone. No windows is the "No data" card. Each record's fields print in the record's own order. The JSON is HTML-escaped before it is put in the page, so a record's text is shown as text and never rendered as markup (#3586).

Notice reads

Four surfaces decode canopy-notices' GET /v1/notices as its contract type, NoticePage (#3408): the Notices list page, the dashboard's Recent Notices panel, the case page's Notices tab and the command palette's notices leg. The decode is strict, and a page with a notice that does not decode fails the read: the list, the panel and the tab show their error state with Retry, and the palette counts its notices leg as failed, as for an outage. None shows the remaining notices alone or a row with a blank where a field was missing. Each link a row has, to the notice's case (the list page) or to its PDF (all four), is built from the ids the contract carries, so it is always present; a page carrying an id that is not one does not decode, and no link is built from it (#2539).

Application list reads (dashboard)

The dashboard's Recent Applications and Team Queue panels decode canopy-applications' GET /v1/applications as its contract type, Application (#3408). The decode is strict, and a list with an application that does not decode fails the read: the panel shows its error state with Retry, never the remaining applications alone or a row with a default status where a field was missing. A row's process and case links are built from the ids the contract carries, so they are always present. Recent Applications shows the first program an application requests, and no program chip for one that requests none. The Team Queue page, the Applications list and My Queue decode Application under the same rule (#3584). My Queue, on the dashboard and on /cases, reads the route twice, for its in-flight and its post-lapse applications. A list with an application that does not decode fails that read: the queue shows its incomplete-list banner over the rows its other reads delivered, or its error state when none did, and never that list's remaining applications alone.

Application reads (case page)

The case page and its tab fragment read the household's newest application for the active program (GET /v1/applications?household_id=&program=&limit=1) through one function, page::program_application, which decodes canopy-applications' contract type, Application (#3408). The page takes the application's id, whether ELE consent is still open (its status is submitted or processing), and its renewal identity for the recertification chip; the tab fragment takes the id. A household with no application for the program, a failed read and a list that does not decode all read as no application: an empty application id, which the case templates test before they render an application-bound action.

Application read (process and intake pages)

The process page reads GET /v1/applications/{id} as canopy-applications' contract type, ApplicationWithPrograms (#3408). The decode is strict: a row that does not decode, a missing or malformed programs_requested included, is a failed read, and the page shows its error state with nothing read after it. A row that decodes is authorized before anything of it is shown, any-of its programs_requested in the worker's scope (authorize_application_programs): a list with no program, or with a program canopy does not know, authorizes no one and is refused 422; a list outside the worker's programs is refused 403. The intake page reads the same route the same way. A row that does not decode renders the page under its "Could not load this application" banner, and no household is read for it. A row that decodes is authorized by the same rule, and then tells the page whether its program is one the application requests and whether that program's row is data_collected.

Application read (approve, deny, run determination)

The approve, SNAP deny and run-determination actions read the application they act on as ApplicationWithPrograms too, before any write (#3408). A row that does not decode is refused as a failed read: "Failed to fetch application" for approve and deny, "Could not load the application" for a run. Approve takes the household and the requested programs from the row and authorizes all-of them; an empty list or an unknown program is refused 422. The SNAP denial requires SNAP among the requested programs and takes the SNAP program row's status as its concurrency token. A run requires that the application request its program. The request-verification action reads the application the same way, confirms it belongs to the household, authorizes all-of its programs, and requests for the person who submitted it; cancelling a verification that carries no program reads it to authorize all-of its programs. In both, a row that does not decode is the action's own read failure ("Couldn't load the application for this household"; a 502 for the cancel).

Stored sections read (intake page)

The intake page reads the application's stored sections (GET /v1/applications/{id}/sections) as canopy-applications' contract type, ApplicationSection (#3408). Each accordion row joins its section with the stored row for the page's program: a completed section reads "Saved", a draft "Draft saved" and the legal day it was last saved, and a section with no row "Not started". The decode is strict: a list with a section that does not decode fails the read, and the accordion shows its error block rather than rows that read "Not started".

Verification request write

Requesting a verification sends canopy-verification's POST /v1/verifications/requests its contract request, CreateVerificationRequestsRequest: one item of the requested type for the application's submitter, in checklist mode with no due date (#3408). The answer is read as VerificationRequestsResponse, and the item's created flag picks the landing notice: a new request, or an open one that already covered the need. An answer that cannot be read is not a failed write, since the request was recorded; it lands on "already open", which promises no letter.

Verification gate

The intake page and the run-determination action each read whether the application has a pending verification (GET /v1/verifications?application_id=&status=pending&limit=1) and only count the rows. One row blocks the run: the page disables Run Determination, and the action refuses, naming the open verifications. A read that fails, or an answer that is not a list, blocks it too, and both say the status could not be confirmed rather than that open verifications exist (#1319 for the page, #3590 for the action).

Determine call

Approve and run determination send canopy-eligibility's POST /v1/eligibility/determine its contract request, DetermineRequest: the application and household by their typed ids, the programs, the worker's name and, for a run, the worker's report date when the form carries one (#3408). The answer is read as DetermineResponse. An answer that does not decode is no response, not a failed run: the orchestrator accepted the call, but the answer names no determination to look for, so canopy-web reports the run pending (#3202).

SNAP parameters read (process page)

The SNAP process page reads canopy-snap's GET /v1/params?household_size= as its contract type, SnapParamsResponse, and shows the gross and net income limits on its "Gross income limit" and "Net income limit" lines, as dollars rounded to the cent (#3588). The page names no percentage of the poverty level beside them (#3589): the limits are the jurisdiction's table values, and the page does not know what share of the poverty level they are. The limits are decimals, which are strings on the wire. A read that fails, or an answer that does not decode, shows a dash for both and raises the page's incomplete-data banner.

Determination reads (case hero)

The case page's identity hero decodes canopy-eligibility's newest determination per program (GET /v1/eligibility/determinations?latest_per_program=true) as its contract type, ProgramDetermination (#3408). The decode is strict, and a list with a determination that does not decode fails the read: each chip whose status comes from this read then reads "Status unavailable", as for an eligibility outage, so no verdict from the read is shown beside a row of it the hero could not read. This includes a row whose status is not a verdict. What the hero already does for that outage is unchanged: the Medicaid chip still shows its household rollup when it has one, since that comes from canopy-medicaid's per-subject rows; an Express Lane grant does not stand in for a determination while the read is unavailable (#1306); and a program that is not deployed reads "Not configured". The process page reads the route's per-household list (?household_id=&limit=) as ProgramDetermination too, and shows the row for its application and its program (a Medicaid page takes a row stored under chip): its verdict in the worker's words with its basis, and its benefit in dollars. A list that does not decode, a status that is not a verdict included, leaves the verdict unavailable; no row for the application and program is "not yet determined".

Program determination lists

The dashboard's Recent Determinations panel reads each in-scope program's GET /v1/determinations?limit=2 as the type that service declares for its list (#3408): an array of SnapDeterminationRead from canopy-snap, a TanfDeterminationPage from canopy-tanf, a MedicaidDeterminationPage from canopy-medicaid, an array of CapsDeterminationRead from canopy-caps and an array of WicDeterminationRead from canopy-wic. The decode is strict, and a list in another shape or with a row that does not decode fails that program's leg: the panel shows the program's "couldn't load" row, never the list's remaining rows alone. A row is dated by determined_at, or for CAPS and WIC, which stamp none, by created_at. Its case link is built from the household id the contract carries, so it is always present. A WIC income reassessment decides no one's certification and is not shown. The case page's ?program=all matrix reads SNAP's and TANF's lists for the household the same way: the row is the first listed determination's verdict and decision day, and a list that does not decode is the row's "Unavailable". The Medicaid COA Categories tab decodes canopy-medicaid's page for the household: its first determination names the application whose categories the tab shows, and a page that does not decode is the tab's error block, never its "No COA evaluation results".

Resource-keyed writes

A worker’s form names a resource by id and the receiving service acts on it by id, so canopy-web binds the resource to the household the worker acts in before the write (#2543). The household resources it writes by an id taken from the request — IEVS and TANF discrepancies, CAPS authorizations, recert nudges, SNAP appeals, adverse actions, authorized-representative designations and representative disqualifications — stand in a write path only as a Bound id (bound_resource.rs): their id types are not path segments, nor is a raw Uuid (so an id’s raw value is none either), and a Bound id is minted only by a read that found the resource on the household (the household canopy-snap matched the IEVS discrepancy for, the TANF discrepancy’s, appeal’s, action’s or designation’s own household, the authorization’s determination, the household’s nudge list, the disqualification’s noticed households), else the action’s refusal and nothing written. A Bound id also carries the household its read proved (Bound::household_id, #2545), and a write body names that household, never a form field. A receiving service that checks it refuses a resource of another household before it writes: canopy-tanf’s discrepancy resolve (409 discrepancy_household_mismatch, canopy-tanf API), canopy-snap’s IEVS discrepancy resolve (409 discrepancy_household_mismatch, #3103, canopy-snap API), canopy-caps' authorization update and provider switch (409 authorization_household_mismatch, canopy-caps API), canopy-renewals' nudge action (409 nudge_household_mismatch, canopy-renewals API), canopy-enrollment’s adverse-action cancel (409 adverse_action_household_mismatch, #3105, canopy-enrollment API), canopy-wic’s termination cancel (409 termination_household_mismatch, #3107, canopy-wic API) and canopy-applications' section upsert (409 section_household_mismatch, canopy-applications API). The other receiving services act by id alone. cargo xtask web-paths audit refuses, inside a path or a Text, a value stringified there, a posted form field, and an id unwrapped there (.0, into_inner, as_uuid, Uuid::from). What neither holds: the program-service write clients take any UpstreamPath (no write-path type accepts only Bound segments, as PersonsWritePath does for canopy-persons), and the audit reads only the expression in the path, so a string or raw value built in an earlier statement, or an untyped String path parameter in Text, passes. Other request-id writes bind by their own reads: the section save holds a posted household and every person it names to the application’s household, the ELE consent binds its application to the posted household, the document reviews refuse an application of another household than the one posted, the Medicaid CMD event refuses an application of another household or one not requesting Medicaid, and a verification cancel finds the verification on its application’s list. The ELE consent’s receiving service checks too: the body names the household the binding read proved, and canopy-applications refuses an application of another household (409 application_household_mismatch, #2545, canopy-applications API).

Authorization model

Surface Authority Denial Marker

Every route in api::routes(), studio::wizard::routes(), admin_security::routes() and device::routes() (the protected router, main.rs)

web_session::layer::session_context (outermost: one SessionState per request), middleware::require_auth (a live session) plus csrf::csrf_middleware on POST / PUT / PATCH / DELETE (X-CSRF-Token header or _csrf form field; the token is minted with the session at sign-in and never rewritten; every page carries it in a csrf-token meta tag, and canopy-web.js sends it as the header on every htmx request, #552)

redirect to /login; 403 on a CSRF miss; 503 when the session store cannot be read

—

Every mutating route (POST / PUT / PATCH / DELETE)

cargo xtask route-authz audit requires each mutating registration’s handler to take the extractor its router file’s policy names (policy_for, xtask/src/cmd/route_authz.rs):

  • the case-work routers, api::routes() in api/mod.rs and the builders it merges (api/actions.rs, api/actions_postponement.rs, api/program_action_routes.rs, api/address.rs, api/pregnancy.rs, api/homelessness.rs, api/members.rs, api/members/parents.rs, api/actions_interview.rs, api/ops_held.rs): session::WritePermission, which refuses roles whose WorkerRole::can_write is false (Analyst, StudioAdmin, Auditor, Unprivileged);

  • Studio (studio/wizard.rs: the step POSTs and cancel): extractor::StudioAdminOnly (Admin | StudioAdmin), not WritePermission, which would refuse a studio admin;

  • security administration (admin_security.rs): admin_security::SecurityAdminOnly, which admits a session holding security_admin (Security administration);

  • device approval (device.rs): device::ApproverSession, any admitted session (Device approval);

  • composition JSON (api/composition.rs): composition_session::SelfScoped on a path ending /user/me, composition_session::JurisdictionAdmin (Admin) on every other;

  • the outer router (main.rs, which holds the auth-lifecycle routes): no mutation, except POST /logout, which must take csrf::CsrfCheckedSignOut, so sign-out is a CSRF-checked state change; a safe verb registered on /logout fails the audit too.

A mutating route in any other file, or one whose handler is an inline closure, fails the audit. A test in route_authz.rs asks policy_for about every canopy-web source file and holds this list to the answers: each router file sits in a bullet with the extractor required of it, and a bullet names no router or extractor the policy does not (#2542).

403 before any upstream call: the wrong role for WritePermission, StudioAdminOnly (the branded Studio 403 page), SecurityAdminOnly (the 403 page) or JurisdictionAdmin (JSON); a sign-out whose CSRF token misses the live session’s

—

Program scope on writes (ADR-044, #1516)

program_scope::ProgramScope<P> where the program is a compile-time fact, else an AuthorizedResource proof — the household’s participating programs (the union of programs_requested across its applications) must intersect the worker’s WorkerProgramScope (any-of; shared facts are not per-program). The write verbs on InternalClient are module-private, so a mutation cannot obtain a write-capable client without the proof; SCOPE_POLICY in xtask/src/cmd/route_authz.rs classifies every mutating handler

403 out of scope; 422 no usable participation set (fail-closed) — both before the upstream call

x-canopy-denial: program-scope (program_scope::mark_denial) so htmx swaps the refusal in

Protected reads (ADR-044, #1518)

READ_SCOPE_POLICY (xtask/src/cmd/route_authz.rs) classifies every protected GET: case detail and its fragments gate on household participation (any-of); search and the palette gate per row; index pages are query-time programs= scoped; notice PDFs and document bytes are authorized by their owning case; /sse filters per connection; dashboard panels are classified in PANEL_SCOPE_POLICY (dashboard/panels/mod.rs)

403; an empty participation union on the full case page is an honest 404; an unparseable union is 422

x-canopy-denial

Role gates

/team-queue Supervisor / Admin; /audit-log* Admin / StudioAdmin / Auditor; /ops/quarantined-determinations* and /ops/held-determinations* the determination operators (WorkerRole::is_determination_operator: Eligibility Specialist / Supervisor / Admin); every other /ops/ Supervisor / Admin; /studio/ StudioAdminOnly (Admin | StudioAdmin); /admin/security* SecurityAdminOnly (security_admin, whatever the case role); /cases/{household_id}, its tab fragments, ?program=all, fact history and the representative disqualification timeline a role the jurisdiction’s composition names (the pack’s idp.toml), so not the Auditor or the security administrator (api/case_detail/role_gate.rs, #2804, #2908); supervisor-only writes (require_supervisor on the rep disqualify / cancel actions, require_supervisor_page on reopen attestation and postponement revert)

403 with zero upstream I/O

x-canopy-denial: rep-binding on the rep actions; case-role on a refused case fragment

Composition JSON (/v1/composition/*)

session_context, then the session-based JSON extractors — composition_session::SelfScoped for /user/me, composition_session::JurisdictionAdmin otherwise; the sub-router carries no CSRF layer, so the SameSite=Strict cookie is the CSRF control (web_session/cookie.rs, load-bearing comment)

401 without a session; 503 session_store_unavailable when the store cannot be read

—

Pages and fragments

Protected GETs mounted in api::routes(). "Scoped read" is the READ_SCOPE_POLICY mechanism.

Route Read gate Purpose → upstream

GET /

hero programs= + per-panel scoping

Composition-driven dashboard; surface by surface_for_role (worker / supervisor / analyst). The hero's big stat counts the in-flight applications (GET /v1/applications?statuses=submitted&statuses=processing&limit=200, programs=-scoped): the rows are only counted, so none of their fields is read (CountedRows, #3408); a full page reads 200+, and a failed read, or a body that is not a list, reads —. Queue rows carry the reopen_pending and post_lapse_pending text chips with data-reopen-pending / data-post-lapse-pending / data-overdue markers, and data-due-on: the typed day order_queue ranks the row by inside its band, empty when it has none (#3174); the in-flight leg reads GET /v1/applications?…&limit=10&order=oldest&programs=…, the post-lapse leg …?post_lapse_pending=true, merged by application id. A queue row whose application carries no id renders its Action cell as the muted em-dash, never a link to /applications//… (the same rows render on GET /cases; #2198).

GET /dashboard/panel/{slug}

same panel fetchers

Single-panel htmx refresh (the error-block Retry); 404 when the slug is outside the caller’s composed surface, deliberately indistinguishable from "no such panel" so the endpoint cannot probe another role’s panels (an Auditor session is 404 too).

GET /dashboard/customize

not program-scoped (own layout)

Customize My Dashboard (ADR-024): hide / reorder / resize within the role baseline; saves via PUT /v1/composition/{surface}/user/me, resets via DELETE; 404 for a non-dashboard surface.

GET /cases

scoped queue + search helpers

Case search page; the same My Queue above the search shell, its rows carrying the panel’s reopen_pending and post_lapse_pending text chips (#3178) and the same data-reopen-pending, data-post-lapse-pending, data-overdue and data-due-on markers (#3174).

GET /cases/search?q=

per-row participation gate

htmx result rows (300 ms / 2+ characters); the fragment degrades on an outage, never "not found". A row's program label and its in-scope decision come from the household's participation union, the one read (participation::household_programs_union) the case page's gate and the fact writes take as their input (#3408), so search never decides on a different list of programs than they do. The rules applied to that list still differ: a row is in scope when any of the household's programs is one of the worker's, while the case page also refuses a union holding a slug it does not know and applies the role gate. An application list that does not decode drops the row, as an outage does.

GET /command-palette/search?q=

per-row

⌘K palette fragment; empty q → Recents + Suggested (a determination operator’s Suggested group also offers the Quarantined determinations jump, #2061); else canopy-persons + canopy-notices fan-out.

GET /cases/{household_id}

the composition’s roles, then participation any-of

The household id is a typed path id: a malformed one is 400 before any upstream call, as on the tab and fact-history routes (#2539). Case detail: the jurisdiction’s composed case_detail sections (?focus_section= allowlist); ?program=all → the cross-program matrix. Rows are participation ∩ scope, decided before any fetch. The identity hero carries a role="status" notice when canopy-eligibility holds determinations of the household in quarantine (#2321). It reads GET /v1/eligibility/households/{household_id}/quarantined-determinations/count once, on the worker’s delegation, which counts only the worker’s programs (Medicaid and CHIP as one scope, #733). The notice says how many are held for review. A determination operator gets the worklist link narrowed to the household; anyone else is told an operator must resolve them. A failed count is a neutral "could not check" note, never silence; a zero count renders nothing. The ?program=all summary view shows no notice.

GET /cases/{household_id}/tab/{tab_id}

same (fragment)

One tab: 14 explicit arms plus the composed-section fall-through; an unknown slug renders the not-in-composition placeholder. The wic-terminations arm, for ?program=wic only, is the WIC Determination tab’s termination panel (#2450), which that tab loads as its own fragment so its reads never degrade the roster (api/case_detail/wic_terminations_tab.rs). It lists the household’s income reassessment runs (canopy-wic GET /v1/determinations?household_id=…&purpose=income_reassessment) apart from the roster’s certifying evaluations, each member’s income and adjunctive result and outcome on the run, with no category or package. It also lists each current certification record (GET /v1/participants?household_id=…) with its terminations (GET /v1/participants/{id}/terminations, read only for a record on that list): status, effective date, reason and each letter’s notice date, dispatch date and superseded flag. A failed records read is the error block; a failed reassessment or terminations read is a visible marker (Partial). The Determination tab’s Run Determination button, like the Action ▾ entry (#2191), renders disabled with its reason when the household has no application (#2198). The Determination tab’s body re-fetches itself on the sse:determination_complete, sse:cmd_settled and sse:cmd_failed triggers (templates/cases/tab_determination.html). An event that lands while that re-fetch is in flight aborts it and issues a fresh one (hx-sync="this:replace"), so the body never keeps a read older than the last event it heard (#3074). The TANF Work Requirements tab reads canopy-tanf by person and in bulk, never by the household id (#2312). It reads the household’s named roster, then POST /v1/work-requirements:batchGet for every member, then POST /v1/work-requirements/activities/summary:batchGet?detail=row for the members with a requirement on file, for the legal day’s month. Each such member’s card shows canopy-tanf’s figures as it reports them: status, whether work is required, exempt, sanction level, the month’s countable, core and non-core hours, and each activity row’s weekly rate, core class and dates. No hour standard lives in canopy-web. A failed roster or status read is the error block; a failed summary read keeps the cards and marks the hours unavailable (Partial). When the summary read is canopy-tanf's 422 work_standard_unrecorded or work_standard_child_unknown, that marker names the cause instead of "didn’t respond", and names no member (#3021). Each card also shows the member's work-standard basis timeline (#3021, templates/cases/_work_standard_basis.html), read beside the summary in one POST /v1/work-requirements/work-standard-basis:batchGet for the on-file members, with as_of the tab's legal day. The rows keep canopy-tanf's order, and In force today marks the row whose id is the response's in_force_basis_id. The custodial children are named from one POST /v1/persons:batchGet over every distinct listed child with include_inactive: false, the request canopy-tanf makes itself (ServiceClients::active_person_cores); a child that read leaves out reads "Unknown person — record a corrected basis". Recorded by reads "you", the worker directory's name or "another worker" (crate::audit::resolve_actor). A member with no basis gets the empty state; a failed timeline read marks each card's basis unavailable, and a failed children read marks each listed child cell; either is Partial. The TANF Time Limits tab reads the same way (#2939): the roster, then POST /v1/time-limits:batchGet for every member. Each member with a clock on file shows months used against the lower of the row’s two caps: the jurisdiction’s own, snapshotted since #2941, and the federal one. It also shows months remaining, the exemption and the last counted month; a member near the limit is warned unless exempt. No limit is fabricated for a member without one (#1151). A failed read is the error block; no member on file is the no-data state. A determination carrying an operator advisory (#3324, read from canopy-eligibility's list) shows each as a role="note" panel under its strip or in its row (determination_view::advisory_lines, templates/cases/tab_determination.html). The SNAP standard-CE advisory names the members whose TANF or SSI record could not be read, from one POST /v1/persons:batchGet. A member that read leaves out, or every member when it fails, takes the roster's fallback name, so the warning always shows. Each determination row’s signature cell (templates/cases/_det_meta.html, determination_view::SignatureChip, #2061) states only whose signature stands behind the row: Verified by eligibility for a row read from canopy-eligibility’s determination list (which holds verified determinations of record only, the demo seed’s included, #2320), Signed by the program service for a program service’s own row that carries a signature (nothing on the page verifies it), and Unsigned otherwise.

GET /cases/{household_id}/fact-history/{resource}

the composition’s roles, then participation any-of

Change history for income / asset / expense: canopy-security GET /v1/security/persons/{id}/fact-history/{kind} per member, merged. The members come from GET /v1/households/{id} and their names from one unprojected POST /v1/persons:batchGet (#2680).

GET /cases/{household_id}/representatives/by-person/{person_id}/disqualifications

same + person→household binding (403)

SNAP rep-disqualification timeline: canopy-applications GET /v1/persons/{person_id}/rep-disqualifications; a failed list read is 502.

GET /cases/{household_id}/enrollment/continuations

participation any-of + SNAP view gate + mintable-role bar + #408 assignment mirror

Benefit-continuation panel: GET /v1/enrollments?household_id=, then GET /v1/enrollments/{id}/continuations, both on the worker’s delegation; upstream 403 → 403, any other failure → 502 with data-continuations-unavailable.

GET /applications

programs=, plus household_id= when the page names one

Application list (50 newest); ?household_id= narrows it to one household (a non-UUID is 400; the program scope still applies, #3113); recertification / post-lapse / reopened text chips; voided renders as a neutral closed pill. The list is decoded as canopy-applications' Application (#3584): each row's actions link by the contract's ids, and a list with an application that does not decode shows the page's error state.

GET /applications/{id}/process

?program= view gate (the case tabs' resolver) + authorize_application_programs

Processing page, program-parameterised — see Process page contract.

GET /applications/{id}/snap/reopen/panel

the process page's gates for its SNAP panels, in its order: SNAP view gate (before any read), then GET /v1/applications/{id} on the worker's delegation, then the page's any-of authorization over the row's programs_requested

The reopen panel as a fragment (#3396, api/process_panels.rs): the markup the page renders in #reopen-panel-slot, from the same reads. A read-only role gets it without the write forms. A refusal is the marked 403 / 422 (x-canopy-denial: program-scope); an unreadable application or episode history is 502 with x-canopy-denial: process-panel-unavailable and the data-reopen-panel-unavailable banner; a failed preview is 502 with the panel and its own data-reopen-preview-unavailable banner; an empty 200 means the records were read and the row has no panel.

GET /applications/{id}/snap/postponement/panel

same

The postponement panel as a fragment (#3396), for #postponement-panel-slot. Same refusals; an unreadable application is 502 with the data-postponement-panel-unavailable banner, and a failed view read is 502 with the panel carrying the row's state and data-postponement-unavailable, nothing offered.

GET /applications/{id}/intake/{program}

path-program gate + application read

Per-program intake page ({program} ∈ snap / tanf / medicaid / chip / caps / wic); the section rows are the program’s set from SectionName::applicable_programs — SNAP 9, TANF 10, Medicaid / CHIP / CAPS 5, WIC 4 (canopy-applications › Intake sections). A section shows the manual citation the pack declares for it and the program, or none (Rulesets › Intake section citations). A section field naming a household member (person_id, head_of_household_person_id, address_person_id) picks one from the application household’s named roster, read for a writer, and posts the picked id; household composition pre-picks the head, and every other field leads with a disabled "Choose a member" so the worker must choose. A failed roster read leaves a disabled "Roster unavailable" option; required refuses either disabled option (#2933).

GET /notices

programs=

Notice history (canopy-notices).

GET /appeals

programs=

Appeal queue (canopy-appeals).

GET /renewals

per-program legs

Renewal queue, 30 / 60 / 90-day windows.

GET /renewals/list?window=

same

Renewal table body fragment.

GET /team-queue

programs=; Supervisor / Admin

Every status=submitted application in the jurisdiction, decoded as canopy-applications' Application (#3584): each row links to its process page and its case by the contract's ids, and a list with an application that does not decode shows the page's error state.

GET /audit-log

upstream programs=; Admin / StudioAdmin / Auditor

System audit stream from canopy-security; filters source_service, limit, from / to. Each row’s actor renders from the recorded user_id / user_role (#1008): a service role shows the service’s name with the system chip; otherwise the actor is a human — "you", the worker-directory name, or "another worker" — and only an empty user_id renders "system". Matching is exact (no trimming or case folding).

GET /audit-log/export.csv

same

CSV of the displayed view (same list URL).

GET /audit-log/citation/{event_id}/pdf

row-programs authorization; same roles

Signed "Cite for hearing" PDF via canopy-notices POST /v1/documents/render (audit-citation template, ES256).

GET /ops/day30-shadow

not program-scoped; Supervisor / Admin

Day-30 disposition report from canopy-applications GET /v1/applications/day30-shadow-findings, in the worker layout (templates/ops/day30_report.html); arm, action, evidence and the applied outcome as text pills (data-applied). Another role gets a 403 banner, and a failed read a 502 one.

GET /ops/scheduler

not program-scoped; Supervisor / Admin

The manual applications-drain trigger page, in the worker layout (templates/ops/scheduler.html). Another role gets a 403 banner.

GET /ops/quarantined-determinations

programs= (the worker’s storage slugs, so a Medicaid scope also sees chip); determination operators

The worklist of open interactive envelopes canopy-eligibility quarantined (Quarantined-envelope worklist (#2061)) — canopy-eligibility GET /v1/eligibility/quarantined-determinations on the worker’s delegation. household_id= narrows it to one household, the case page banner’s link (#2321); the page names the household, offers every household, and keeps the filter across pages.

GET /ops/held-determinations

program= through the view gate (a program outside the worker’s scope 403, an unknown slug 422, before any read); determination operators

One program’s held determinations, each with its disposition (Held-determination worklist (#3127)) — canopy-eligibility GET /v1/eligibility/held-determinations?program=&limit=50&after= on the worker’s delegation. No program= lists the worker’s first program; after= is the page cursor eligibility issued (any other is 422).

GET /notices/{id}/pdf

authorized by the owning case

Notice PDF stream (canopy-notices).

GET /documents/{application_id}/{document_id}/content

application read on the owning application

Document bytes from canopy-applications on the worker’s delegation, served inline; upstream 404 → 404, anything else → 502.

GET /sse

per-connection fail-closed program filter

Server-Sent Events: the determination registry plus SSE_EXTRA_ROUTING_KEYS (sse_routing.rs), surfaced as dot-free sse:* triggers; a key without a program segment is delivered only when the envelope asserts programs; the stream ends on a mid-connection scope change. The events carry nothing a page trusts: a subscriber refetches its own gated route. Subscribers: the Determination tab body (determination_complete, cmd_settled, cmd_failed), the continuations panel (the three enrollment_* continuation names), and since #3396 the process page's reopen slot (application_reopened) and postponement slot (application_postponed, application_postponement_completed, application_postponement_reverted).

Dashboard panels — the analyst pipeline funnel (dashboard/panels/analyst_pipeline_funnel.rs, STAGES): one GET /v1/applications fetch per stage, each limit=200 (200+ at the cap) and programs=-scoped to the session; a failed fetch renders — in its own column and every fetch failing renders the panel error state. Submitted, Screening and Determination count the parent applications.status (statuses=submitted / processing / determined — the tokens recompute_application_status and the column default write). Verification and Authorized count applications with an active application_programs row in data_collected / approved (program_statuses=, #2169), because no write produces either token on the parent row (State Machines › Application Status). The stages are not disjoint: an application approved for SNAP while its TANF row is still pending is counted in both Screening and Authorized.

Process page contract

GET /applications/{id}/process renders from RECORDS, never from re-derived clocks, and marks the page incomplete rather than failing when a leg fails:

  • Program view (?program=<slug>): resolved exactly as on the case tabs — an explicit out-of-scope slug is 403 and an unknown slug 422 (the shared ScopeDenied::view_gate, before any read); absence falls back to the worker’s first in-scope program, never a hardcoded SNAP; chip folds into Medicaid. The SNAP view is byte-identical to the pre-parameterised page (pinned by the testdata/process_snap_*.html goldens). A Medicaid/CHIP view renders the program-neutral core — the program-labelled title, the summary with that program’s data-program-clock cell, the verification work items and the program’s OWN determination row from the per-household eligibility read — and none of the 7 CFR 273.2 SNAP blocks below (disposition / reopen / postponement / post-lapse / expedited, the interview panel, the 130 % / 100 % FPL income test, the SOP cell and recertification chip, the Approve / Deny pair); it offers the case page’s program tab (data-case-link, /cases/{household_id}?program=<slug>) where the SNAP actions were, and reads none of the SNAP legs.

  • Disposition banners (api/disposition_banner.rs, role="status", text-labelled): PENDED from GET /v1/applications/{id}/agency-pends (cause as a closed-token label, the extended deadline, a pend history); DENIED (administrative) from GET /v1/administrative-denials/{id} (reason label, cure action, the snapshotted reopen_deadline_date; a recertification row points at the reinstatement panel instead); EXPEDITED WINDOW MISSED from expedited_downgraded_at. A failed read renders no banner and marks the page incomplete.

  • Reopen panel #reopen-panel (api/reopen_panel.rs): history from GET /v1/applications/{id}/programs/snap/reopen/episodes on every active SNAP row; the server preview GET …/reopen/eligibility only on an administratively denied row. Cures are confirm dialogs posting only cure_kind (+ attestation_id) and the page’s per-render key (#2708); blocked reasons render as text; a recertification preview renders the 7 CFR 273.14(e)(2) variant. Hooks: data-reopen-incomplete, data-reopen-attest, data-reopen-notice, data-reopen-file-application.

  • Live refresh of the two panels (#3396): each renders inline on first load inside a slot that is present on every SNAP view, panel or not — #reopen-panel-slot (hx-get /applications/{id}/snap/reopen/panel, hx-trigger sse:application_reopened from:body) and #postponement-panel-slot (hx-get /applications/{id}/snap/postponement/panel, triggered by the three postponement events), both hx-swap="innerHTML". The page and the fragment include one partial each (templates/applications/_reopen_panel.html, _postponement_panel.html). A refetch replaces the panel, so input typed into one of its forms is lost; the ?notice= banners sit outside the slots and stay.

  • Postponement panel #postponement-panel (api/postponement_panel.rs) from GET /v1/applications/{id}/programs/snap/postponement: the three gates (data-postponement-gate, data-gate-satisfied, data-identity-holder), the postpone trigger (data-postpone-trigger, offered only when postponable), items, history, the data-postponement-incomplete saga banner with Resume, the supervisor revert form.

  • Post-lapse banner data-post-lapse-banner iff the GET /v1/applications/{id} read says post_lapse_pending, with the letter-evidence line (data-post-lapse-letter) and the released clock Determination due <day> (data-post-lapse-due, data-overdue).

  • Interview panel #interview-panel: kind-branched date hints; refusals land inline through the PRG ?interview_error=<code>&interview_error_detail=…#interview-panel (a closed nine-token vocabulary, api/actions_interview/copy.rs); the data-interview-complete form renders only while an appointment is open and interview_completed_at is unset. The schedule / reschedule form is collapsed by default and has two openers: a relayed refusal (which must show the inputs it complains about) and ?schedule_interview=true (#580) — the flag the case page’s Action ▾ Schedule Interview… entry deep-links with, resolved server-side into the panel’s Alpine state so the CSP build evaluates no location.hash.

  • Recertification chip (data-recertification-chip): Recertification of <start>–<end> from the one renewals read, degrading to Recertification — period ends <end>; the SOP label is chosen by kind from the row’s own facts.

  • ?notice=<slug> banners are server-allowlisted (reopened, reopen-resumed, reopen-attested, postponed, postponement-completed, postponement-reverted, postponement-resumed, interview-scheduled, interview-rescheduled, interview-completed, interview-scheduled-headroom-short, verification-cancelled).

SSR deadlines & degraded states

Twenty-three read routes — thirteen under the page budget, ten under the fragment budget — run under an aggregate request deadline (#1306 built the machinery, #1319 extended it to the remaining SSR read surfaces; SSR aggregate request deadline): every upstream read a handler makes — gate wait, retries, token acquisition, body and decode — is bounded by one absolute cutoff, and an upstream failure renders an honest per-component state instead of a whole-page 500. The coverage is the set of handlers that construct RequestDeadline::from_now(Duration::from_millis(web_config.{page,fragment}_deadline_ms)) — 22 sites under services/canopy-web/src/api/, one per route below except the two process-panel fragments, which share one; no other route constructs either budget.

Budget Default Knob Applies to

Page

12 000 ms

CANOPY_WEB__PAGE_DEADLINE_MS

13 routes: GET /, GET /cases, GET /cases/{household_id} (incl. ?program=all), GET /applications, GET /applications/{id}/process, GET /applications/{id}/intake/{program}, GET /notices, GET /appeals, GET /renewals, GET /team-queue, GET /audit-log, and the two audit-log downloads GET /audit-log/export.csv and GET /audit-log/citation/{event_id}/pdf (their canopy-security reads ride the page budget; the citation’s render POST stays unstamped)

Fragment

8 000 ms

CANOPY_WEB__FRAGMENT_DEADLINE_MS

10 routes: GET /cases/search, GET /cases/{household_id}/tab/{tab_id}, GET /dashboard/panel/{slug}, GET /command-palette/search, GET /renewals/list, GET /cases/{household_id}/fact-history/{resource}, GET /cases/{household_id}/representatives/by-person/{person_id}/disqualifications, GET /cases/{household_id}/enrollment/continuations, GET /applications/{id}/snap/reopen/panel, GET /applications/{id}/snap/postponement/panel

Session serve

the page budget

CANOPY_WEB__PAGE_DEADLINE_MS

every request behind serve_session: how long it waits on a stale session’s maintenance (the wait behind another request’s claim, the upstream refresh and canopy-identity’s renewal), which the session engine runs (ADR-049 Amendment 18); past it the request answers 503 with Retry-After, never a sign-in loop, and the maintenance runs on

Service calls

30 s constant (auth::CALLS_BUDGET)

—

how long a request’s calls may mint delegations, from its start: past the page budget, so a write that outlasts the page still has its bearers

Boot validation bounds the knobs (page ∈ [1 000, 14 000] ms, fragment ∈ [1 000, 9 000] ms); CANOPY_WEB__DEADLINE_OVERRIDE=true is the accountable override (loud warn every boot, hard 600 s cap). Per-component caps come from each plugin manifest’s data.timeout_ms (default 5 000 ms); the binding constraint is min(page deadline, component cap). Knob semantics: Configuration Reference › canopy-web.

One token-failure rule. A call whose bearer cannot be minted fails with a typed auth_unavailable before any request is built, on every verb and in every handler, with or without a deadline (ServiceClient::bearer, clients.rs). No handler sends a request without a bearer.

Declined: a middleware that stamps the deadline (#1324). Each handler constructs its own deadline, and a from_fn layer that minted one for every GET was considered and turned down:

  • The budget is per route. One file serves a page under the page budget and its fragment under the fragment budget (api/dashboard.rs), so the layer would need a second route table to choose, and another to exempt downloads and writes. That table would restate a judgment each handler already makes.

  • The layer would remove only the mint. Each handler would still read the deadline to bind its clients and to record canopy_web.page.outcome once at its exit.

  • Writes take no page deadline: a write is never cancelled part-way (#1320 owns bounded writes).

Nothing mechanical detects a new read route that lands without a deadline. The per-route hang tests cover only the routes already listed above, so a new read route constructs its deadline and adds its hang test in its own MR, and review checks for both. Revisit this when #1320 needs a bounded write in a stamped handler, or when a read route first lands without a deadline.

Every covered component renders exactly one of populated, empty (the upstream answered and there is genuinely nothing — an outage is never "All caught up"), degraded (some legs failed; rows stay visible under an incomplete-list banner with a per-component Retry) or error (a static block with Retry; copy is time-aware and never quotes upstream text, #715).

Telemetry

SSR-deadline, panel-cache, session-refresh, session-store and sign-out instruments on the canopy_web meter (label values are closed enum names, compile-time slugs or configured chooser-entry slugs; upstream text never crosses into metrics). The meter also carries canopy_web.auth.admission_rejected, canopy_web.session.decode_failed and canopy_web.authz.scope_denied (telemetry.rs).

Instrument Labels Recorded

canopy_web.upstream.call_outcome (counter)

service; kind ∈ {ok, deadline_exceeded, timeout, transport, http_4xx, http_5xx, exhausted, decode, auth_unavailable, token_timeout}

once per logical upstream call

canopy_web.component.duration_ms (histogram, ms)

surface; component (plugin slug or a static component); outcome ∈ {populated, empty, partial, error, timeout}

once per rendered component, at its own fetch seam; the count is the render count

canopy_web.page.outcome (histogram; value = handler wall-clock ms, remaining_ms = budget left)

surface; outcome ∈ {ok, degraded, error}

once per handler exit on 17 of the 23 deadline-covered routes — the two audit-log downloads record no page point (downloads sit outside the page/fragment vocabulary) and the continuations and representative-history fragments record component points only, under surface=tab; the two process-panel fragments record no point

canopy_web.panel_cache.outcome (counter, #1218)

service; kind ∈ {hit, miss, coalesced, bypass}

one disposition per cache consultation; bypass once per scoping event whose TTL is 0

canopy_web.panel_cache.evictions (counter), .entries / .bytes (gauges)

service on evictions

evictions under the CANOPY_WEB__PANEL_CACHE_{MAX_ENTRIES,MAX_BODY_BYTES,MAX_TOTAL_BYTES} budgets; occupancy each collection

canopy_web.auth.admission_rejected (counter, #1515)

stage ∈ {callback, serve}; reason ∈ {no_role, missing_primary_programs, malformed_primary_programs, malformed_subject}

once per session canopy-web refused to admit: at the callback (sign-ins project to no worker) or a later serve (re-federation stopped projecting one)

canopy_web.session.decode_failed (counter, #1515)

none

once per session row whose record no longer decodes, which reads as no session

canopy_web.session.slide_failed (counter, #2518)

none

once per request whose idle-deadline slide failed; the request is still served

canopy_web.session.sweep_failed (counter, #2519)

step ∈ {idle_sessions, expired_flows, end_log}

once per failed step of a session sweep pass; serving is unaffected and the next pass retries

The panel-data cache (#1218) sits at the InternalClient JSON-GET seam: fail-closed guards run before any cache read; entries are keyed (service, full URL, sha256(credential)); hits are judged against the calling panel’s resolved TTL (0 bypasses; the authorization-filtered panels, cross-program alerts (#596) and pending verifications (#2336), always resolve 0 whatever the manifest or composition sets, AUTH_FILTERED_PANEL_SLUGS); per-key single-flight coalesces cold bursts; only successfully decoded 2xx bodies are cached.

Composition JSON API

The composition sub-router (api::composition::routes(), merged in main.rs outside the CSRF / require_auth layers) exposes the three DB-backed override layers of ADR-022.

Route Gate Behaviour

GET, PUT, PATCH, DELETE /v1/composition/{surface}/live

JurisdictionAdmin

Jurisdiction-live layer: GET reads, PUT replaces, PATCH applies RFC 6902 ops (test ops for optimistic concurrency), DELETE removes the row.

POST /v1/composition/{surface}/live/archive

JurisdictionAdmin

Explicit-archive the live override after a Studio promote-merge.

GET, PUT, PATCH /v1/composition/{surface}/role/{role}

JurisdictionAdmin

Role override layer (filtering applies after the merge, ADR-021); 404 RoleNotFound for an unknown role.

GET, PUT, PATCH, DELETE /v1/composition/{surface}/user/me

SelfScoped

Per-worker layer, keyed by the session’s OIDC subject byte for byte (scope_key and created_by both hold it; any valid subject, not only a UUID, #1008). Dashboard surfaces take the user_delta_v1 envelope (PUT-only; PATCH → 415); case_detail and other surfaces take RFC 6902 ops. DELETE resets to baseline — 204, idempotent; the audit event fires only when a row was removed. GET answers the layer's stored document as it was written (patch_ops): the user_delta_v1 envelope or an op list.

user_delta_v1 (ADR-024): {"type": "user_delta_v1", "hidden_slugs": […​], "span_overrides": {slug: span}, "slug_order": […​]} for worker_dashboard / supervisor_dashboard / analyst_dashboard; every slug must exist in the post-role-filter baseline (SlugNotInBaseline → 422) and every span must be in the manifest’s allowed_spans (SpanOutOfRange → 422). Writes take the If-Match / If-None-Match: * precondition headers (412 / 428).

Every composition surface load emits the best-effort telemetry event composition.render (payload {jurisdiction, role, user_id, surface, version}, ids and slugs only; user_id is the worker’s OIDC subject, present for every worker load since #1008 and absent for a role-level load; version is a 16-hex-character string — the first 8 bytes of the SHA-256 over the resolved document — never a JSON number, #1777).

Action endpoints

Every action rides the protected router’s session + CSRF layers and WritePermission; the Scope column is the SCOPE_POLICY classification — a ProgramScope<P> extractor, or resource (an AuthorizedResource proof from the household or application). Refusal copy is server-owned, keyed on the upstream’s RFC 9457 code; the upstream body never reaches the DOM (ADR-041). Success is a PRG redirect back to the case or process page unless stated.

A program action’s case redirect names the program it acted on: /cases/{household_id}?program=<slug>&focus_section=<section>, with the posted target_section narrowed by safe_focus_section (actions::program_case_landing, #3017). Without program= the case page opens the worker’s first in-scope program, so a worker holding several programs would land on another program’s view. The document review actions (POST /actions/documents/{accept,reject,scan-override}) have no program of their own: the Documents section is in every program’s view, and the review is authorized against all of the application’s programs. Each form posts the view it renders in as active_program, and the review lands on that program’s view when Program::from_slug accepts the slug and the worker’s scope holds it (actions::document_review_target, #3040). An absent, unknown or out-of-scope value lands without program=, on the worker’s default view.

Application lifecycle and intake proxies

Route Scope Behaviour → upstream

POST /applications/{id}/approve

resource

Approve → canopy-eligibility. The application id is a typed path id (a malformed one is 400), and the landing redirect is built from the row’s household id, parsed before any write (#2539). The determine call runs under determine_timeout_ms and, when it outlives it, answers the run’s still-running alert, as run-determination below does (#3199).

POST /applications/{id}/snap/deny

resource (the SNAP row)

Per-program administrative denial, reason ∈ missed_interview | verification_not_provided (#788), with the page’s per-render key as its replay anchor (#2708); the worker’s delegation. A 422 renders a reason-keyed recovery message (interview_not_satisfied matched by code first: complete or waive the interview in #interview-panel, then retry); a 409 says refresh-and-retry.

POST /applications/{id}/snap/reopen

ProgramScope<Snap>

Reopen a procedurally denied SNAP row (7 CFR 273.2(h)(2)) → POST /v1/applications/{id}/programs/snap/reopen, the worker’s delegation; the form carries only cure_kind (+ attestation_id) and the page’s per-render key, whose anchor folds in the cure (#2708); the application is pre-read and a SNAP-less case is refused 422 pre-write. Refusal copy: api/actions_reopen_copy.rs (interview_not_satisfied, verification_open, window_closed / before_denial, later_episode_approved, reopen_in_flight; the recertification table adds reinstatement_window_closed, denial_reason_not_reinstatable). PRG ?notice=reopened#reopen-panel.

POST /applications/{id}/snap/reopen/resume

ProgramScope<Snap>

Resume an incomplete reopen saga → POST …/programs/snap/reopen/resume (empty body); 409 saga_not_incomplete → "nothing to resume". ?notice=reopen-resumed.

POST /applications/{id}/snap/reopen-attestations

ProgramScope<Snap> + supervisor page gate

Supervisor’s attestation of a cure day (attested_cured_on, reason validated before I/O) → POST …/programs/snap/reopen-attestations, the worker’s delegation. ?notice=reopen-attested.

POST /applications/{id}/snap/postpone

ProgramScope<Snap>

Open the expedited postponed-verification episode (7 CFR 273.2(i)(4)) → POST …/programs/snap/postpone, the worker’s delegation; the form carries only the CSRF token and the page’s per-render key, sent as the replay anchor (#2708). Refusal copy: api/actions_postponement_copy.rs. ?notice=postponed#postponement-panel.

POST /applications/{id}/snap/postponement/complete

ProgramScope<Snap>

Evidence-derived completion → POST …/postponement/complete; 409 postponed_items_open renders the open tokens as labels. A release after the short certification’s last day flags post_lapse_pending instead of converting. ?notice=postponement-completed.

POST /applications/{id}/snap/postponement/revert

ProgramScope<Snap> + supervisor page gate

Reversion with one of the three manual grounds (identity_unverified | interview_not_completed | eligibility_proof_not_provided; anything else 422 with zero I/O) → POST …/postponement/revert; 409 postponement_determined → the certification lapses on its own deadline. ?notice=postponement-reverted.

POST /applications/{id}/snap/postponement/resume

ProgramScope<Snap>

Resume an incomplete postponement saga → POST …/postponement/resume. ?notice=postponement-resumed.

POST /applications/{id}/interview/{schedule,reschedule}

ProgramScope<Snap>

Record or move the interview appointment (#1638) → canopy-applications, the worker’s delegation; the date + time pair is combined in the legal zone. A refusal returns inline via ?interview_error=<code>&interview_error_detail=…#interview-panel (headroom_violated, past_date, beyond_sop_date, conflict, unprocessable, form_invalid); a 201 with warnings: ["nomi_headroom_short"] lands on ?notice=interview-scheduled-headroom-short, otherwise interview-scheduled / interview-rescheduled.

POST /applications/{id}/interview/complete

ProgramScope<Snap>

Record an On-Demand call-in (#1734) → POST /v1/applications/{id}/interview/complete (empty object, the worker’s delegation; the response is read as IgnoredAny). already_completed (409) is stated; a 404 redirects bare. ?notice=interview-completed#interview-panel.

POST /applications/{id}/verifications/{vid}/cancel

resource (the row’s own program; legacy program-NULL rows all-of the application’s programs)

Cancel one verification work item (#1645) → canopy-verification.

POST /applications/{id}/run-determination?program=

resource

Per-program Run Determination → canopy-eligibility; ?program= is required (a missing value renders an error banner). The run dispatches those of the program’s storage slugs the application requested (requested_run_slugs). A Medicaid/CHIP run sends medicaid and chip together when both were filed (42 CFR 457.350 screen-and-enroll, #2319), from either slug. A program none of whose slugs was requested renders the membership banner. The failed-run error goes out-of-band into #determination-run-banner under HX-Reswap: none for the Determination tab’s own form, as a plain fragment for other targets (#2066). The determine call has its own budget, determine_timeout_ms (8 s by default; Configuration Reference), not the 5 s client default. A call that outlives it is time-class, not a failure: the same slot shows a role="status" Determination still running alert that asks the worker to refresh and run it again to record the outcome, since only a result canopy-web holds is recorded back (#3199; the gap is #3202), and nothing is recorded back. Every terminal result carrying a determination_id is then recorded back (record_determination_outcomes → canopy-applications POST /v1/applications/{id}/programs/{program}/determination; the /approve route shares the leg): approved and denied pass through, and sanctioned records as denied with sanctioned as the first denial_reason_codes entry (record_back_outcome, exhaustive over DeterminationStatus; the table is on State Machines › Application Status; #2170, #628), so the parent rolls up and the case leaves the queue; an outcome with no verdict (pending_verification, input_unsatisfiable) is logged and skipped (recordable_status). A coded refusal of the record-back renders as the action’s error fragment in server-owned copy (record_back_refusal_copy: 409 postponement_not_open, application_withdrawn, already_administratively_denied, determination_superseded; 422 provenance_fields_required). A response records ONE determination per program (#2928, the aggregate verdict): a per-subject program (WIC per participant, CAPS per child, Medicaid per person) returns several, and the application’s one row per program takes the newest approved sibling when any subject is approved, else the newest sibling (determinations_to_record, outranks); each subject’s own verdict and denial codes stay with the program service (ADR-001). Any other record-back failure is a WARN and the determination result stands.

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

resource (SNAP or TANF)

Worker-attested ELE consent (#977) → POST /v1/applications/{id}/ele-consent on the worker’s delegation (the application id a typed path id, a malformed one 400, #2539; the application read first and refused 403 unless it belongs to the posted household, #2543 — the authorization stays the worker’s SNAP or TANF scope, since consent is household-scoped; #985 — canopy-applications takes consent_recorded_by from the delegation’s worker; a delegation that cannot be minted refuses the attestation inline; api/actions_ele.rs). The body names the household the application read returned (EleConsentRequest.household_id, #2545). canopy-applications' coded 409 application_household_mismatch means its record and that read disagree, so it renders as the binding’s 403 (ele_consent_failure); an uncoded 409 renders "only before the application is determined".

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

resource

Intake section save: put_section_proxy builds the section’s contract payload from the fields its form posts (applications/section_payload.rs, #3593) → PUT /v1/applications/{id}/sections/{program}/{section} on the worker’s delegation (#1008), so the upstream records the editing worker as last_edited_by; a delegation that cannot be minted refuses the save inline. The application id is a typed path id (a malformed one 400). Before the write the application and its household’s roster are read (#2543, applications/section_binding.rs): a posted household_id other than the application’s, or a person_id / …_person_id field naming someone off that roster, refuses the save with the banner and nothing written, and the household-composition members come from that roster, never from the posted household’s. A section whose payload names a household (household composition, expenses and shelter, special circumstances) sends the application’s household whatever the form posted, a blank one included, for canopy-applications to check again (#2545); its 409 section_household_mismatch renders the refusal banner. The body carries the section’s contract fields and nothing else: a posted key the section does not have, a posted timestamp and a contract field the form does not offer are not sent; verified_at is the server’s time to the second; a note or a SAVE case number is sent as the text it is. After the binding checks, a {section} the contract does not have, a field the section requires and the form lacks, and a value the field cannot take are refused with the banner naming the field (Could not save: invalid verification method), nothing written and nothing recorded. A program not active on the application stays canopy-applications' 422. The write’s answer is not read: any answer the client accepts is a save. An unchecked box is sent as false, so a special-circumstances form with none checked sends all six of its flags (#3148). Once a special-circumstances save is stored, the household’s homelessness follows its homeless answer (#3147, applications/homelessness_claim.rs): the household’s periods are read (GET /v1/households/{id}/full?projection=homelessness), and on the jurisdiction’s legal day true with no period open claims one from that day (POST /v1/households/{id}/homelessness, authored by the worker with origin intake, keyed by the section’s verified_at, the periods read and the body), false with one open closes it on that day, and any other answer writes nothing. The section carries no effective date (verified_at is the server’s stamp of the save), so the claim starts on the save’s legal day. A line under the saved banner names the claim or the close; a failed read or write leaves the section saved, and the answer says so in a Failed to record homelessness: … alert. Both outcomes answer HTTP 200 as one plain banner the form’s own swap lands in the row’s .intake-section__form-status slot — an unmarked 4xx is one htmx never swaps (#2082); the #1516 scope denial stays a marked 4xx.

POST /applications/{id}/programs/{program}/complete-data-collection

resource

→ POST /v1/applications/{id}/programs/{program}/complete-data-collection, with an empty JSON object as its body. The answer is not read: any answer the client accepts is a completion.

Case actions

Route Scope Behaviour → upstream

POST /cases/{household_id}/request-verification

resource

Written-request batch (CreateVerificationRequestsRequest, #1644) → canopy-verification POST /v1/verifications/requests. The <option> list and the handler allowlist are one source, [[snap.verification.requestable_types]] in the jurisdiction’s jurisdiction.toml; an unlisted type is 422 before any call (canopy-verification’s request_policy::validate_shape refuses only empty values and duplicate (type, person) pairs, so the BFF is the only allowlist). PRG ?notice=verification-requested when the item was created, verification-already-open otherwise, with vtype=<code>. The household id is a typed path id (a malformed one is 400) and the form’s application_id is parsed before any upstream call (a malformed one is 422), so the application fetch is never built from form text and the household binding compares ids (#2539).

POST /cases/{household_id}/file-application

resource (per program, fail-closed)

File a new application for the existing household (#978) → POST /v1/applications on the worker’s delegation. Each ticked program files its storage slugs, so the Medicaid/CHIP box files medicaid and chip (#2319); submitted_by is the head of household from the roster GET /v1/households/{id} (no SSN read, #2680). Redirects to the first filed program’s case view. SNAP renew election: SNAP renew election (#1728).

POST /cases/{household_id}/representatives

resource (all-of the posted program set) + household case access

Designate an authorized representative (#1666) → POST /v1/households/{household_id}/authorized-representatives, the worker’s delegation. Field failures return one 422 fragment (data-field); 422 representative_barred renders the origin’s detail line (the one carve-out); 409 → refresh-and-retry. Success answers HX-Redirect to ?focus_section=representatives&notice=rep-designated.

POST /cases/{household_id}/representatives/{designation_id}/disqualify

ProgramScope<Snap> + Supervisor / Admin + case access

Bar the representative from SNAP representation (7 CFR 273.2(n)(4)) → POST /v1/authorized-representatives/{id}/disqualify, after a read that checks designation.household_id == path (403) and refuses organizations (422); the typed DisqualifyRepresentativeRequest names the household that binding proved, for canopy-applications to check again (#3106). Reason benefit_misuse | false_information; evidence class + refs. notice=rep-disqualified.

POST /cases/{household_id}/rep-disqualifications/{id}/cancel

ProgramScope<Snap> + Supervisor / Admin + case access

Reverse an open bar → POST /v1/rep-disqualifications/{id}/cancel, after the record→household binding ({household_id} ∈ noticed_household_ids, else 403); the typed CancelRepDisqualificationRequest names the household that binding proved, for canopy-applications to check again (#3106). Reason entered_in_error | hearing_overturned (appeal_id required iff overturned). notice=rep-disqualification-cancelled.

Refusals on the Representatives section swap into its role="status" aria-live="polite" region at their honest status (data-swap-errors); both modals run under the shared CanopyFocusTrap in canopy-web.js (the focus trap and client-side validators are syntax-checked only — no browser test covers them).

SNAP renew election (#1728)

The "File application" modal (api/actions_intake.rs + its renew / copy children; view model case_detail/renew_election.rs) files a SNAP recertification against the household’s certification, resolved server-side from the one renewals read the case page already performs (GET /v1/renewals/snap/certifications?household_id=): an active certification offers the renew_snap checkbox; a recertifying one renders the "Open the existing renewal" link instead (data-renew-election="existing"; a 404 on the linked application means it was withdrawn — data-renew-election="withdrawn", no control); no in-force certification or a read failure offers no control. On submit a ticked box with programs ≠ ["snap"] is refused locally; otherwise the handler re-reads the certification and POSTs CreateApplicationRequest { renews_certification_id, programs_requested: ["snap"], … } on the worker’s delegation. Refusals render the shared _action_error.html fragment (HTTP 200) with the copy table in actions_intake/copy.rs, keyed (status, code, detail):

Refusal Copy (first sentence)

409 renewal_already_filed

A SNAP renewal is already filed for this certification — open the existing renewal.

409 program_already_open / <program>

This household already has an open <program> application (label via applications::intake_rows::program_label_for).

422 renewal_certification_mismatch / not_households_certification

The certification to renew does not belong to this household — file as a new application.

422 renewal_certification_mismatch / certification_not_in_force (also the BFF’s own pre-read)

This household has no in-force SNAP certification to renew.

422 renewal_certification_mismatch / certification_lapsed

The SNAP certification has already ended — a late re-application is not a renewal.

422 renewal_certification_mismatch / renewal_too_early

It is too early to renew: the window opens on <date> (canopy_types::recert::earliest_renewal_filing_day).

422 renewal_certification_mismatch / certification_conversion_pending

Not filed as a renewal: the postponed verification is still being resolved.

422 renewal_requires_snap / snap_only (also judged locally)

A renewal renews the SNAP certification alone — select only SNAP, or clear the renew box.

422 renewal_requires_snap / no_expedited_screening

A renewal cannot be expedited-screened.

502 renewal_certification_unavailable (also the BFF’s own pre-read failure)

The certification could not be read from canopy-renewals — nothing was filed; retry.

An unrecognised triple falls through to the generic upstream arm. The identity hero’s data-recertification-chip renders Recertification of <start>–<end> when the same read handed back the renewed certification, else Recertification — period ends <end>.

Generic and SNAP caseworker actions

Where a row below says a form id is parsed before any upstream call, it is parsed as its typed canopy_types::id before any upstream call or bearer mint (actions::parse_household_id, actions::parse_certification_id, and actions::parse_form_id for the others; #2380, #2385), so no upstream path, query or Location is built from the form’s text. A value that is not one is the inline Invalid … id. fragment, and the case redirect is built from the typed household id (actions::case_target, or actions::case_notice_target when a banner rides it).

The case-detail fact editors (income, assets, expenses, addresses and members) parse the form’s household id before any upstream call or token fetch, and the program tab, the fact ids their write paths name and the fact id an edit’s correction, or the IEVS accept’s matched self-report, carries in its claim body (#2709) after the scope and membership gates and before the write (fact_editor::{parse_household, parse_program, parse_fact_id}, #2539), so an out-of-scope worker still gets the gate’s 403. A value that is not one is the editors' 422 fragment, and the success redirect is built from the typed household and program (fact_editor::redirect_to_case); their person-keyed writes use the person id the membership check proved. The IEVS accept and reject actions, whose scope gate is the ProgramScope<Snap> extractor, parse the household, discrepancy and program the same way before any upstream call and redirect the same way. Both then bind the discrepancy to the posted household before any write (#2540): they read it from canopy-snap (GET /v1/verification/discrepancies/{id}), and the household canopy-snap matched it for (its match result’s, served with the discrepancy, so the binding holds whatever has become of the application since, #2543) must be that household, or the action is the 403 That discrepancy does not belong to this household. The accept form carries no person id: the income claim is keyed on the discrepancy’s own subject, proven a member of the household (the editors' not-a-member 403 otherwise), so the persons write and the snap flip happen only after both checks. The accept holds its income as a canopy-persons proposal (POST /v1/persons/{id}/income/proposals, #2546), which feeds no determination until canopy-persons consumes canopy-snap’s resolution event and promotes it (ADR-027 Amendment 6). So no race can leave unlinked income feeding eligibility.

  • Choosing the fact. Under canopy-snap’s resolve guard (#2544) the accept decides its fact before writing:

    • An open discrepancy proposes a correction of the form’s matched self-report.

    • Otherwise it proposes onto the fact a pending proposal of the discrepancy already names (a flip-failed earlier attempt, read from the person’s pending proposals).

    • Otherwise it proposes a new fact.

  • A repeat writes nothing. A repeat on a discrepancy already accepted with its fact (a double submit, a stale tab) writes nothing and lands on the case. A discrepancy resolved any other way when the accept reads it is refused (409) before the proposal.

  • A late resolution leaves the proposal inert. A resolution that lands between that read and the flip (another action’s, or a verification re-run’s withdrawal) is caught by the guard after the proposal is written. The proposal stays inert, and the accept answers 409 saying the income was not applied, with the reason the guard’s code names: another action resolved it, or a re-run withdrew it.

  • The landing. A successful accept lands with the ievs-accepted notice: the income applies once the resolution is processed. The Income tab shows an accepted discrepancy whose linked fact is not yet served as an IEVS-sourced income as "Verified — being recorded", on its paired self-report or as a row of its own.

  • Double submits. The twins of a double submit of one rendered form can both read the discrepancy open before either writes. So the form carries a key minted once per render (idempotency_key, required; a value that is not a UUID is the 422 fragment before any write). The proposal rides it as the platform Idempotency-Key with the proposal body folded in (a UUIDv5 named by the body under the render key, ievs::claim_key, #2660):

    • The twins propose one fact. A twin whose body matches the first’s gets that proposal’s fact replayed; one whose read landed after the first proposal finds it pending and proposes onto its fact under its own key.

    • canopy-snap answers each flip of that fact as the same resolution, and every twin lands on the case.

    • canopy-persons scopes the key to the acting worker the delegation names (#1443), so two workers' proposals never share one.

    • A submit of the same render whose body differs is its own proposal under its own key. An accept from another render is a write of its own that the guard still refuses as above, its proposal left inert.

The add forms of the fact editors — income, assets, expenses, addresses (POST /actions/{income,asset,expense,address}/add) add member (POST /actions/member/add), add parent (POST /actions/parent/add, #3047) and record pregnancy and homelessness (POST /actions/{pregnancy,homelessness}/add, #3147) — converge a double submit the same way (#2674). Each form carries a key minted once per render of its tab (idempotency_key, required; a form without one is axum’s 422 and one that is not a UUID the editors' 422 fragment, both before any write), and every canopy-persons create the add makes rides the platform Idempotency-Key derived from it with the exact request body folded in (a UUIDv5 named by the body under the render key, fact_editor::add_submission_key; the person create folds in the household and the worker beside its body, which names neither). The twins of a double submit post one body under one render key, so canopy-persons answers the second create with the first one’s stored response: one fact, or for add member one person — the person create and the membership claim derive separate keys, and the twin’s claim names the person its replayed create returned, so it replays the first membership too. A resubmit of the same render after the membership claim failed reuses the person that attempt created rather than orphaning another; a transient claim failure (one the middleware does not store — a 5xx, 408 or 429 past its cooldown, a 401 or 403, a transport error) then attaches it, while a refusal it stores (a 400, 404, 409 or 422) is answered again. The same add from another render (the next visit, a reload) is an add of its own under its own key. The middleware keys an entry by its path as well, so one render’s key serves every member’s add form; a twin that arrives while the first create is still running past the middleware’s wait budget gets its retryable 503 error page. The edit and remove forms carry no key: an edit’s correction and a remove’s close each name the fact they act on, so neither can write a second fact.

A fact write these actions refuse with a 403 is recorded in the audit trail (#3426). The refusal stages one fact_write.refused event in canopy-web's outbox, in a transaction of its own, before the 403 is answered; canopy-security records it as (refuse, fact_write) on the household, attributed to the worker. The payload is five fields and no fact value: actor_user_id (the worker's session subject), actor_role, household_id, editor and refusal. The event is program-neutral. refusal is one of:

  • not_a_household_member: the person or membership fact the form names is not on the household's roster;

  • fact_not_the_members: the pregnancy or parent fact is not a fact of the member the form names;

  • fact_not_the_households: the homelessness period or IEVS discrepancy belongs to another household;

  • sealed_fact: the address or pregnancy is sealed (ADR-036);

  • withheld_address: the household's addresses are withheld;

  • program_out_of_scope: no program the household participates in is in the worker's scope.

editor names the action: income, asset, expense, address, household_member, parent, pregnancy, homelessness, ievs_discrepancy, and the program actions that share the roster binding, abawd_activity, abawd_eligibility, snap_work_registration, snap_work_sanction, tanf_work_activity, medicaid_cmd_update, medicaid_cooperation, medicaid_demonstration_activity, wic_nutritional_risk, wic_breastfeeding, caps_parent_activity and caps_care_need, and the actions that refuse a posted record of another household, or a person off the roster, on their own (#3434): recert_nudge (file and dismiss), document_review (accept, reject and scan override), verification_request, ele_consent, representative_disqualification (disqualify and reverse), tanf_discrepancy, tanf_work_standard, caps_authorization (update and provider switch) and wic_termination (schedule and cancel). The Medicaid CMD update records an application of another household under medicaid_cmd_update. A record of another household is fact_not_the_households; the work-standard basis action's person off the roster, or a person value that is not a person id, is not_a_household_member. One function (fact_editor::refusal::FactWrite::refuse) stages the event and builds the 403, and those 403 bodies are private to its module. An action whose 403 is a fragment of its own (the work-standard result, the representative actions' refusal, the verification request's error page) stages the same event through FactWrite::record_refusal and renders its fragment only once the event is staged. Only a refusal made through that module is recorded (the six refusal kinds above). Not recorded: role, case-access and program-scope denials, whether an extractor makes them before a handler runs (WritePermission, ProgramScope<P>) or a handler does (the representative actions' supervisor and case-access checks, the document review's and verification request's program checks); and a work-standard post whose household value is not a household id, which names no household to record it on. A read that refuses to render is not a refused write and is not recorded. Four actions answer an HTTP 200 that deliberately reads the same for another household's record as for a missing one, so a forged form learns nothing: the SNAP hearing decision (snap_appeal_decision), the adverse-action cancel (snap_adverse_action_cancel), the appeal filing's selected action (snap_appeal_filing) and the intake section save (intake_section). Their answer is unchanged, and the attempt is recorded when the record is another household's (the section save also records a person off the roster); a missing or unreadable record is not recorded (#3436). The appeal filing makes one more read, on the refused path only, to tell the two apart. When the event cannot be staged the write is still refused, the failure is logged at ERROR, and the answer is a 500 that names no reason. A 422 (a form value that does not parse, a read that failed) is not a refusal and is not recorded.

The process page’s reopen, postpone and administrative-denial forms (POST /applications/{id}/snap/{reopen,postpone,deny}) converge a double submit through canopy-applications' body-carried replay anchor (#2708). The page mints one key per render, and each of the three forms carries it (idempotency_key). A form without one, or with a value that is not a UUID, is refused before any upstream call (the action’s refusal page, or the deny action’s error fragment). Postpone and deny send the render key as their idempotency_key. Postpone’s body names nothing else, and canopy-applications replays a denial’s key only with the same reason, refusing another reason under it (409 idempotency_key_reused). Reopen sends the render key with the cure, and the attestation it rests on, folded in (a UUIDv5, actions_reopen::reopen_key). canopy-applications replays a known reopen key whatever the body, so a second cure posted from the same render must carry a key of its own: it then meets the open-episode 409 instead of a replay of a reopen it did not ask for. The twins of a double submit post one render’s anchor, so canopy-applications replays the first write for the second and both land as the success redirect. The same action from another render (a reload after the first landed) is a write of its own, which meets canopy-applications' state guard as a 409 (while the first write stands, reopen_episode_open, postponement_open or already_administratively_denied). The three writes are separate upstream records, so one render key serves all three forms.

Route Scope Behaviour → upstream

POST /actions/interim-contact

ProgramScope<Snap>

Posted from the case top bar’s Record Interim Contact modal, which carries the in-force certification hidden; the Determination tab offers no SNAP report form, so no worker types a certification id (#1620, #2386) → canopy-renewals POST /v1/renewals/snap/certifications/{id}/interim-contact; contact_method ∈ the snap_change_reports_method_check set (phone | mail | in_person | online), in the typed RecordInterimContactRequest naming the case’s household_id (a blank note is None), so canopy-renewals refuses a certification of another household with 409 (#2410). The household and certification ids are parsed before any upstream call (#2380, #2385).

POST /actions/change-report

ProgramScope<Snap>

canopy-renewals POST /v1/renewals/snap/certifications/{id}/change-report; the form is validated before I/O (actions::parse_change_report: closed change_type, report_method from the DB CHECK set, Decimal income, household_size 1..=30). PRG ?notice=redetermination-required when the origin’s screen tripped, else change-recorded.

POST /actions/renewals/file-recert

ProgramScope<Snap> + nudge-household binding

canopy-renewals POST /v1/renewals/snap/nudges/{id}/action with action=filed_recert; the household and nudge ids are parsed before any upstream call (#2385), and the nudge must be on the household’s own nudge list (GET /v1/renewals/snap/nudges?household_id=), else 403 before the write (#2543). The typed ActionRecertNudgeRequest names the household that list read proved, for canopy-renewals to check again (#2545); an upstream refusal, its 409 nudge_household_mismatch included, renders the generic "Failed to record nudge decision" fragment.

POST /actions/renewals/dismiss-nudge

ProgramScope<Snap> + nudge-household binding

The same nudge-action endpoint with action=dismissed, behind the same parse and binding.

POST /actions/abawd-activity

ProgramScope<Snap> + tracking-household and household-membership bindings

Record ABAWD work activity → canopy-snap POST /v1/abawd/activity with the typed RecordActivityRequest. The form is validated before any upstream call (actions::parse_abawd_activity, #2385, #2411): typed ids, a first-of-month benefit month, and each hours figure a whole number from 0 to 744 (MAX_MONTHLY_HOURS, the hours in the longest month); an invalid value is the inline error, never zero hours. The form collects all five categories the request carries: hours worked, job search, training, community service and self-employment (#2430). The form names no person: it picks one of the household’s tracking windows (a closed one marked, for a late-reported month of its span), read from canopy-snap’s household list on the Determination tab (#2931). The posted window must be on that list (bound_resource::abawd_tracking), else the binding 403. The activity is recorded for the window’s member, who must still be a member of the posted household, else the not-a-member 403 (#2540). Both checks come before the write.

POST /actions/resolve-discrepancy

ProgramScope<Snap> + discrepancy-household binding

Resolve an IEVS income discrepancy → canopy-snap PUT /v1/verification/discrepancies/{id}/resolve; the household and discrepancy ids are parsed before any upstream call (#2385), and the discrepancy is bound to the posted household before the flip, as for the IEVS actions below (ievs::bound_discrepancy, #2540). The typed ResolveDiscrepancyRequest names the household that binding proved, for canopy-snap to check again (#3103). The form picks one of the household’s pending discrepancies from canopy-snap’s household list rather than taking a typed id (#2931). It forwards only the four resolutions its form offers (confirmed_additional_income, corrected_ievs_error, resolved_household_explanation, aged_out); any other status, an accept or a reject included, is refused before any read (#2965), since those outcomes have forms of their own. PRG ?notice=eligibility-changed.

POST /actions/income/{add,edit,remove}

resource

Author a worker income claim / /claims correction / close into the canopy-persons version corpus. Add and edit send the typed IncomeClaimRequest (POST /v1/persons/{id}/income/claims) and decode its ClaimResponse (#3408): the amount as a decimal, the effective date as valid_from, the edit's end date as valid_to (empty for an open-ended fact), self-attested, authored by the session worker, with origin worker_portal. A form value the claim cannot carry (an amount that is not a number, an effective or end date that is not a date) is refused with the editors' 422 fragment naming it, after the scope and membership gates and before any write (fact_editor::parse_form_value for an amount; parse_form_date for a date, which reads it by the editors' one date rule, parse_date, and names the expected format in its refusal).

POST /actions/asset/{add,edit}, POST /actions/expense/{add,edit}

resource

Asset and expense fact editors (#676); no asset remove yet. The expense and asset adds and edits send the typed ExpenseClaimRequest and AssetClaimRequest (POST /v1/persons/{id}/expenses/claims, …​/assets/claims) and decode their ClaimResponse (#3408), with the income editor's parsing and refusals: an amount or value that is not a number, an asset type outside canopy-persons' closed set, or an effective or end date that is not a date, is the editors' 422 fragment naming it, before any write.

POST /actions/address/{add,edit,remove}

resource + household-membership binding

Address claims (POST /v1/persons/{id}/addresses/claims, AddressClaimRequest); remove closes the fact as of the jurisdiction’s legal day (DELETE …/claims/{fact_id}?as_of=, ADR-027 append-only). A redacted (ADR-036) row is refused 403. So is an edit or remove of an existing address while the Address section withholds the household's addresses (an elected address_confidential or both, or an election that cannot be verified under the fail-closed default; #1887): the handlers make the render's decision from the same lookup, so a crafted POST cannot change a row the page shows read-only. Adding an address stays open, as the section still offers it, and no other fact editor is gated. The add and edit forms take the county from a select of the deployment's served counties (county_fips), labelled with the pack's admin_unit_label, or from a five-digit code box for an address in another State (other_county_fips); a residential address without a county the deployment takes, or with both fields filled, is a 422 with no canopy-persons call, and a mailing or substitute address may carry none (Rulesets › Served counties, #3376).

POST /actions/pregnancy/{add,end}

resource + household-membership binding

The Address section’s pregnancy actions (#3147, api/pregnancy.rs). Each member’s block lists the pregnancies the bundle’s pregnancies group serves, with the expected delivery date, the fetus count, whether the WIC family-size increase is waived (7 CFR 246.7(d)(2)(vii)) and the day it ended.

  • Add records a new, open pregnancy for a rostered member: POST /v1/persons/{id}/pregnancies with PregnancyClaimRequest, the value from the form, valid_from the posted day, authored by the worker with origin worker_portal. A fetus count outside 1 to 8 (MIN_FETUS_COUNT, MAX_FETUS_COUNT) is the editors' 422 before any write.

  • End records the day it ended (a birth or a loss): DELETE /v1/pregnancies/{fact_id}?end_date=&author_sub= (EndPregnancyParams).

  • Both bind the member to the posted household’s roster before any persons write, so a person off it is the not-a-member 403.

  • That path names no person, so end also reads the member’s pregnancies and must find the posted fact among them, or it is the 403 That pregnancy is not this member’s. A redacted (ADR-036) one is the sealed 403.

  • The section offers no add while a pregnancy is open, since canopy-persons holds one at a time (its 409 otherwise).

POST /actions/homelessness/{add,end}

resource

The Address section’s household homelessness actions (#3147, api/homelessness.rs). The section lists the periods the bundle’s homelessness group serves.

  • Add opens a period from the posted day: POST /v1/households/{id}/homelessness with HomelessnessClaimRequest, authored by the worker with origin worker_portal.

  • End closes the posted period on the posted day: DELETE /v1/households/{id}/homelessness/{fact_id}?end_date=&author_sub= (HomelessnessCloseParams). canopy-persons refuses a period of another household with a 404, answered as the 403 That homelessness period is not this household’s.

  • Both write beneath the household the participation gate authorized; no person is posted, so no roster binding applies.

  • The section offers no add while a period is open (one per household).

POST /actions/member/{add,edit,remove}, POST /actions/person/edit

resource + membership binding (#1523)

Member and demographics editors: create-and-attach, relationship correction on POST /v1/households/{id}/members/claims, membership close via DELETE …/members/claims/{fact_id}, PUT /v1/persons/{id} (SSN never posted). The person create and the demographics update send the typed CreatePerson and UpdatePerson and decode canopy-persons' Person (#3408): the date of birth is read by the editors' date rule before any upstream call, so text that is not a date is the 422 fragment naming it and no person is created or edited; a create whose answer does not decode fails the add before the membership claim. canopy-persons re-checks the binding (require_member_ownership). The relationship edit binds the posted fact to today’s roster first; the remove binds it through the close itself (#2661): canopy-persons refuses a fact of another household with a 404 before any mutation, answered as the not-a-member 403, and answers a fact of this household that is already closed with 204, so a repeated remove (a double submit, a retry) lands on the case as the remove instead of being refused by its own close. That widens what a remove can reach within the household the worker is authorized for: a stale or tampered remove naming a future-effective membership of the household, which the roster never lists, now closes it (canopy-persons' close supersedes the membership from today on, close_member_version), where the roster read used to refuse it; the relationship edit still refuses a membership that is not current. An unparseable member_id is the not-a-member 403 before any canopy-persons call (after the scope gate’s own reads).

POST /actions/parent/{add,edit,remove}

resource + membership binding (#1523)

The Persons tab’s parent editor (#3047, api/members/parents.rs). Each member’s row lists the parents in force today, read from the bundle’s parent_child group, with kind and window.

  • Add records a parent picked from the other roster members: POST /v1/persons/{child}/parents/claims with ParentChildClaimRequest, the child in the path and the parent in the body.

  • Edit corrects the kind or the window on the same fact_id, a valid-time correction.

  • Remove closes the fact as of the posted date, blank being the jurisdiction’s legal day: DELETE …/parents/claims/{fact_id} with CloseClaimParams.

  • Add and edit bind the child and the parent to the posted household’s roster before any form value is parsed. A parent off the roster is the not-a-member 403, so a worker records a parent from the roster only; a parent outside the household is #3082.

  • Remove binds only the child, because the close names no parent: a parent who has since left the household does not block it.

  • canopy-persons refuses a fact of another child with a 404, answered as the same 403. An unparseable fact_id is that 403 too.

POST /actions/ievs/{accept,reject}

ProgramScope<Snap> + discrepancy-household binding

Accept holds the worker-verified income as a canopy-persons proposal on the discrepancy’s subject (canopy-persons fixes source=ievs and origin=ievs:{id}, #2546), then flips the snap discrepancy to accepted_verified with the proposal’s fact as resolved_fact_id, which is what makes canopy-persons promote it; reject flips it to rejected with no canopy-persons write. Both refuse (403) a discrepancy whose application belongs to another household, and accept refuses (403) a subject who is not a member of the posted household, before any write (#2540); both send the bound household in ResolveDiscrepancyRequest for canopy-snap to check again (#3103). The proposal is the typed IncomeProposalRequest (#3408): the verified amount as a decimal, the effective date as valid_from, open-ended. A verified amount that is not a number, or an effective date that is not a date, is refused with the editors' 422 fragment naming it, after the binding and membership checks and before the proposal is written, so nothing is proposed and the discrepancy is not flipped.

POST /actions/documents/{accept,reject}

resource

Document review → canopy-applications; accept also resolves any pending verification the document was submitted against (?document_id= filter, then POST /v1/verifications/{id}/resolve with the typed ResolveVerificationRequest); each listed id is decoded as a typed VerificationId first, and a list that does not decode resolves nothing (#2412). The application, document and household ids are parsed before any upstream call (#2385), and the application read that authorizes the action must name the posted household — the case it redirects to — else 403 before any write (#2543).

POST /actions/documents/scan-override

resource

Release a quarantined-skipped document (ADR-042, #1006) → canopy-applications, behind the same parse and household binding.

POST /actions/snap/create-certification

ProgramScope<Snap>

canopy-renewals POST /v1/renewals/snap/certifications; determination and application ids resolved server-side; an in-force certification is refused.

POST /actions/snap/overpayment-recompute

ProgramScope<Snap>

Replay the frozen snapshot against corrected facts (#681); requested_by is the worker the delegation names; idempotent.

POST /actions/snap/create-enrollment, POST /actions/snap/issue-benefits

ProgramScope<Snap>

canopy-enrollment: open an enrollment for the current approved determination (filing date = the legal filing day, #1583); issue one benefit month against the latest active enrollment.

POST /actions/snap/file-appeal

ProgramScope<Snap>

canopy-appeals: file a fair-hearing appeal, optionally bound to one of the household’s open adverse actions (validated against its own set); filing date server-stamped.

POST /actions/snap/record-decision

ProgramScope<Snap> + appeal-household binding

canopy-appeals PUT /v1/appeals/{id}/decision after the BFF binds the appeal to the posted household (bound_resource::appeal) and checks it is SNAP and still pending; the typed RecordDecisionRequest names the household that binding proved, for canopy-appeals to check again (#3104). decision ∈ upheld_agency / reversed_household, decision_basis required.

POST /actions/snap/schedule-termination, POST /actions/snap/cancel-termination

ProgramScope<Snap>

canopy-enrollment POST /v1/adverse-actions (reason_code from [[snap.adverse_action.reasons]]; the PAMMS 3705 exemption fields are eligibility-specialist+); cancel fetches the action first (bound_resource::adverse_action), refuses a household mismatch with the not-found message, and sends the household its Bound id proved in CancelAdverseActionRequest (#3105).

POST /actions/snap/work-sanction, POST /actions/snap/work-sanction/lift

ProgramScope<Snap> + household-membership binding (finding) / sanction binding (lift)

canopy-snap POST /v1/work-sanctions (WORK_SANCTIONS) with the typed CreateWorkSanction, and POST /v1/work-sanctions/{id}/lift (WORK_SANCTION_LIFT) with LiftWorkSanction, under the worker's delegation (#3219, actions_snap::work_sanction). In the work-registration action's order: WritePermission, ProgramScope<Snap>, the form parsed with no I/O (parse_finding: violation, good_cause and effective_date; parse_lift: sanction_id, lift_reason and lifted_on, each token exactly canopy-snap's), then the finding's person on the posted household's roster, or the lift's sanction bound to the posted household (bound_resource::work_sanction, which finds it on canopy-snap's household read; a foreign one is the 403 fragment). canopy-snap's coded 422s render as server-owned copy (work_sanction_refusal_copy). Both land on the ABAWD tab, whose Work sanctions section (case_detail::snap_work_sanction) reads GET /v1/households/{household_id}/work-sanctions once and lists each finding — the member by the named roster, the violation and its number, the begin date and minimum period canopy-snap computed, and whether it is in force, lifted or not imposed — with the finding form and, when a sanction is in force, the lift form. A failed read says so and marks the tab Partial.

POST /actions/snap/abawd-regain, POST /actions/snap/abawd-discretionary-exemption

ProgramScope<Snap> + ABAWD-tracking binding + household-membership binding

canopy-snap POST /v1/abawd/tracking/{id}/regain (ABAWD_REGAIN) with the typed RegainEligibilityRequest, and POST /v1/abawd/discretionary-exemptions (ABAWD_DISCRETIONARY_EXEMPTIONS) with CreateDiscretionaryExemption, under the worker's delegation (#3220, actions_snap::abawd_eligibility). In the work-sanction lift's order: WritePermission, ProgramScope<Snap>, the form parsed with no I/O (parse_regain: tracking_id, period_start, period_end and whole hours from 0 to 744; parse_exemption: tracking_id and benefit_month, a month input's YYYY-MM or the first of the month), then the posted window found on canopy-snap's household tracking list (bound_resource::abawd_tracking; a foreign one is the 403 fragment) and its member proven on the household's roster (the not-a-member 403). The member is the window's, never a posted field. canopy-snap's coded 422s render as server-owned copy (abawd_eligibility_refusal_copy). Both land on the ABAWD tab, whose Regaining and discretionary exemptions section (case_detail::snap_abawd_eligibility, writers only) reads GET /v1/abawd/tracking?household_id= once and offers the regaining form for each active exhausted window and the exemption form for each active tracking, exhausted or regained one, each named by member, status and window. A failed read says so, offers no form and marks the tab Partial.

POST /actions/snap/work-registration

ProgramScope<Snap> + household-membership binding

canopy-snap POST /v1/work-registrations (WORK_REGISTRATIONS) with the typed CreateWorkRegistration, under the worker's delegation with no fallback to the service token; the body names no recorder, because canopy-snap records the delegation's subject (#3218, actions_snap::work_registration). It runs the CAPS fact actions' checks in the same order: WritePermission, ProgramScope<Snap>, then the form, then the person on the posted household's roster (the not-a-member 403 before the write). Its form fields are household_id, person_id (from the household's named roster), standing (exactly exempt, registrant or voluntary_registrant), exemption, exemption_expires, abawd_screening (blank for not screened, else exactly not_abawd, abawd or aged_abawd), abawd_exception, et_referred_on, effective_date and target_section; a blank optional field is absent. The exemption and exception selects are the booted pack's [[snap.work_registration.exemptions]] and [[snap.abawd.exceptions]] by label, a temporary exemption marked as lapsing (snap_work_registration::SnapWorkRegistrationVocabulary, the PolicyVocab member). Before any upstream call it refuses, inline, a malformed household id, a standing or screening outside the tokens, an exemption or exception that is not exactly one of the pack's codes, and a malformed date (parse_work_registration). canopy-web refuses to boot with SNAP enabled when either table is missing or empty, or holds a code that is not snake_case or repeats, or a blank label. canopy-snap judges the rest: its ten coded 422s (snap_date_out_of_range, snap_effective_date_in_future, snap_et_referral_in_future, snap_exemption_on_registrant, snap_exemption_missing, snap_unknown_exemption, snap_abawd_not_registrant, snap_exception_needs_not_abawd, snap_unknown_exception, snap_expiry_without_exemption) render as their own inline copy (work_registration_refusal_copy), never the upstream detail, and any other failure as the generic inline error. No log line carries the standing, the exemption or the screening. The action lands on the ABAWD tab. Below the tracking read, its Work registration and ABAWD screening section (case_detail::snap_work_registration) names every member from the named roster and reads canopy-snap's GET /v1/households/{household_id}/work-registrations (HOUSEHOLD_WORK_REGISTRATIONS, each member's newest registration effective on the legal today) once. Each member's row shows in words the standing with the exemption by its label and when it lapses, the employment and training referral, the ABAWD screening with the exception by its label, and the effective date; a code the pack no longer lists shows as its code. A member with no registration reads "Not screened". A failed registration read is a "couldn't load" cell on every row and a failed roster read one line; either marks the tab Partial.

Program-specific actions (#392)

All four ProgramScope<P> for their program. The interim-contact and change-report actions are household-level (#2409): canopy-renewals keeps no certification for these programs, so each program’s form is one form per action naming the case’s household and no certification, and the action posts to the program’s canopy_contracts_renewals::paths::PROGRAM_INTERIM_CONTACT / PROGRAM_CHANGE_REPORT (actions::program_report_path) with the typed ProgramInterimContactRequest / ProgramChangeReportRequest, whose household_id is the case’s (#2369, #2379). A form household_id that is not a household id is refused before any upstream call (Medicaid at 422, #1976), and the case redirect follows renewals' recorded row.

Route Behaviour → upstream

POST /actions/tanf/{interim-contact,change-report}

canopy-renewals POST /v1/renewals/tanf/{interim-contact,change-report}. The form asks for no reported income: the contract records none.

POST /actions/tanf/{work-activity,resolve-discrepancy}

canopy-tanf POST /v1/work-requirements/{person_id}/activities / POST /v1/verification/discrepancies/{id}/resolve; the household id and the person or discrepancy id are parsed before any upstream call, and the case redirect carries the parsed household id (#2385). The work activity sends the typed LogActivityRequest, validated first (actions_tanf::parse_work_activity, #2411). Its form fields are household_id, person_id, activity_type, hours_per_week, effective_date, an optional end_date and target_section. The checks are: an activity type that is one of the booted pack’s [[tanf.work_activities]] codes (#2313); weekly hours above 0 and at most 168 with at most one decimal; an effective date; and an optional end date not before it. Each failed check is an inline refusal naming the field, with no upstream call. An undeclared activity type’s refusal lists the codes the jurisdiction declares. The form’s activity select is rendered from the same rows, loaded at boot by tanf_work_activities::TanfWorkActivities. The rows are required when [jurisdiction].enabled_programs includes tanf and are not read otherwise; canopy-web refuses to boot when that list is missing or malformed, or when TANF is enabled and the table is missing or empty. canopy-tanf’s coded 422s hours_out_of_range and activity_span_inverted render the matching field’s copy (actions_tanf::coded_refusal_arm); any other upstream failure renders "Failed to record work activity". Its person must be a member of the posted household, else the not-a-member 403 before the write (#2540). The resolve reads the discrepancy from canopy-tanf (GET /v1/verification/discrepancies/{id}) and refuses (403) one whose household is not the posted one, before the write (#2543). It then sends the typed ResolveDiscrepancyRequest, whose household_id is the household that read proved, for canopy-tanf to check again (#2545); a blank note is sent as an empty one (actions_tanf::resolve_body). Its form picks one of the household’s pending discrepancies from canopy-tanf’s household list (#2931). The work-activity form picks the person from the household’s named roster, as the WIC form does (#2414).

POST /actions/tanf/work-standard-basis

canopy-tanf POST /v1/work-requirements/{person_id}/work-standard-basis (WORK_STANDARD_BASIS) with the typed RecordWorkStandardBasisRequest, on the worker's delegation with no fallback to the service token (#3022, actions_tanf::work_standard). The form sits in each on-file member's basis panel, for writers only. It posts household_id, person_id (the card's member), effective_date, single_custodial_parent (yes or no) and one custodial_child_ids per checked box, and prefills nothing. The children offered are every other roster member, each labelled with the name and the date of birth or "date of birth not on file". parse_work_standard_basis refuses before any I/O, collecting every field error into one 422: a household id that does not parse, a missing date, a radio other than yes or no, the member listed as their own child, and yes with no child. A member or child value that is not a person id is the not-a-member 403. One roster read (GET /v1/households/{id}) then proves the member and every child; anyone off it is the not-a-member 403, and a failed read is a 502. canopy-tanf's coded 422s render as field errors (coded_basis_arm): effective_date_out_of_range on effective_date, and custodial_children_required, custodial_child_is_subject and custodial_child_unknown (#3023) on custodial_child_ids. Its 403 is a 403, and anything else is the 502 "Not saved."; the upstream body is never echoed. A refusal is templates/cases/_work_standard_result.html in the member's role="status" live region; each field error carries data-field-error, which canopy-web.js binds to its input (aria-invalid, aria-describedby), as for the representatives actions. A recorded basis answers HX-Redirect to an htmx request, else a 303, to /cases/{household_id}?program=tanf&focus_section=work-req&notice=work-standard-recorded. The log line carries the ids and the worker's name, never the custody facts.

POST /actions/medicaid/{interim-contact,change-report}

canopy-renewals POST /v1/renewals/medicaid/{interim-contact,change-report}. The landing is the Medicaid view (#1972).

POST /actions/medicaid/cmd-update

canopy-persons PUT /v1/persons/{id} (the member’s disability_status), then canopy-medicaid POST /v1/cmd/ingest. The person write is the typed UpdatePerson with only disability_status set (#3408): every other field is null, which canopy-persons' update keeps as stored. Both go under the worker’s delegation, but canopy-persons records no author for a person update, so only the CMD event is attributed to the worker (#2415). Before either write the person must be a member of the posted household (#2540), and the application_id the re-determination order scopes to is read from canopy-applications: another household’s is 403, and one that requests no Medicaid program (chip counts, as Program::from_slug reads it everywhere) is a 422 that links the case’s Medicaid view, where the form carries the household’s Medicaid application (#2543). One whose Medicaid and CHIP rows record no determination is a 422 telling the worker to run the determination first, since the order re-determines the programs the application determined (#2319). If canopy-medicaid refuses the event after the fact is written (422 cmd_application_undetermined, when its record and canopy-applications' disagree), the action answers 409 with the same advice. The ingest body pairs the application with the household that read bound it to, and canopy-medicaid refuses an application its record files under another household (409 cmd_application_household_mismatch, #2545). That refusal also arrives after the fact is written, so the action answers 409: the disability status was saved, the change report was not, and resubmitting will not help.

POST /actions/caps/{interim-contact,change-report}

canopy-renewals POST /v1/renewals/caps/{interim-contact,change-report}.

POST /actions/caps/update-authorization

canopy-caps PUT /v1/authorizations/{id} with the typed UpdateAuthorizationRequest, validated first (actions_caps::parse_authorization_update, #2411): a blank field is absent (unchanged); an entered one must be whole weekly hours from 0 to 168, a weekly copayment in whole cents (copayment_weekly_cents), or a status among active / suspended / terminated, or a type of care (scholarship_type) that is exactly one of canopy-caps' ScholarshipType tokens; the form's select is built from them, with "(no change)" first (#3184). A non-blank note is sent for canopy-caps to record (#2428). The body names no actor. Each authorization card on the tab names its type of care, or "Not recorded".

POST /actions/caps/switch-provider

canopy-caps PUT /v1/authorizations/{id}/provider (unknown provider → 422) with the typed SwitchProviderRequest: the new provider id is parsed as a CapsProviderId before any upstream call or log (actions_caps::parse_provider_switch, #2413), and the body names no actor and no date: the switch takes effect at once (#2428). For both CAPS authorization writes the household and authorization ids are parsed before any upstream call, and the case redirect carries the parsed household id (#2385); the authorization is read, then its determination, and one whose determination is another household’s is 403 before the write (#2543). Each body’s household_id is the household that read proved (Bound::household_id), never the posted one, for canopy-caps to check again (#2545); its 409 authorization_household_mismatch renders the action’s generic failure fragment. Both CAPS forms pick the authorization from those the tab lists (option value the authorization id), and render only when one is listed, so the worker never types an authorization id (#2414); the new provider id is still typed (#2931).

POST /actions/caps/parent-activity

canopy-caps POST /v1/parent-activities (CREATE_PARENT_ACTIVITY) with the typed CreateParentActivity, under the worker's delegation with no fallback to the service token; the body names no recorder, because canopy-caps records the delegation's subject (#3184, actions_caps::parent_activity). It runs the WIC breastfeeding action's checks in the same order: WritePermission, ProgramScope<Caps>, then the form, then the person on the posted household's roster (the not-a-member 403 before the write). Its form fields are household_id, person_id (from the household's named roster), weekly_hours, the verified and unable_to_provide_care boxes, care_waiver_verification (blank for not verified, else exactly licensed_medical_statement or agency_documentation), effective_date and target_section. Before any upstream call it refuses, inline: a malformed household id, weekly hours that are not a whole number from 0 to 168, a verification outside the tokens, and a missing or impossible date (parse_parent_activity). canopy-caps judges the rest: its 422 caps_effective_date_in_future, 422 caps_date_out_of_range and 422 care_waiver_without_claim render as their own inline copy (actions_caps::fact_refusal_copy), and any other failure as the generic inline error. No log line carries the hours, the verification or the waiver.

POST /actions/caps/child-care-need

canopy-caps POST /v1/child-care-needs (CREATE_CHILD_CARE_NEED) with the typed CreateChildCareNeed, with the parent action's checks in its order and on the same delegation (#3184, actions_caps::care_need). Its form fields are household_id, person_id, scholarship_type (exactly one of the four ScholarshipType tokens), the has_documented_disability box, effective_date and target_section; a malformed household id, type of care or date is refused inline before any upstream call (parse_child_care_need), and canopy-caps' two date refusals render as their own copy. No log line carries the type of care or the disability. Both actions land on the Authorization tab. Its Parents and children section names the parents and children from the household bundle projecting parent_child alone (no SSN opened): the children are the members who are the child in a parent–child fact, the parents the facts' parents who are members. It reads LIST_PARENT_ACTIVITIES?person_id= per parent and LIST_CHILD_CARE_NEEDS?person_id= per child, and shows each newest row (the lists are newest effective first) in words: the hours and whether they are verified, the care waiver, the type of care and the disability, each with its effective date. A person with no row reads "No standing recorded" or "No need recorded". A failed read is a "couldn't load" cell, and a failed household read one line; either marks the tab Partial. A household whose facts name no parent says so.

POST /actions/caps/asset-certification

canopy-caps POST /v1/asset-certifications (CREATE_ASSET_CERTIFICATION) with the typed CreateAssetCertification, with the parent action's checks in its order and on the same delegation (#3546, actions_caps::asset_certification). Its form fields are household_id, person_id (the family member who certified, proven on the posted household's roster before the write), answer (exactly within or over; a blank is refused, never read as within the limit), certified_on and target_section; a malformed household id, answer or date is refused inline with no upstream call. canopy-caps' 422 caps_certified_on_in_future and 422 caps_date_out_of_range become server-owned copy. The Authorization tab shows the household's latest certification (what was certified, by whom, on which day) and does not judge whether it is current.

POST /actions/medicaid/cooperation-finding

canopy-medicaid POST /v1/cooperation-findings (CREATE_COOPERATION_FINDING) with the typed CreateCooperationFinding, under the worker's delegation with no fallback to the service token; the body names no recorder, because canopy-medicaid records the delegation's subject (#3191, actions_medicaid::cooperation). It runs the CAPS fact actions' checks in the same order: WritePermission, ProgramScope<Medicaid>, then the form, then the person on the posted household's roster (the not-a-member 403 before the write). Its form fields are household_id, person_id (from the household's named roster), kind (exactly medical_support or third_party_liability), status (exactly one of canopy-medicaid's five CooperationStatus tokens), effective_date and target_section. Before any upstream call it refuses, inline, a malformed household id, a kind or status outside the tokens, and a missing or impossible date (parse_cooperation_finding). canopy-medicaid judges the rest: its coded 422s render as their own inline copy (actions_medicaid::medicaid_fact_refusal_copy), and any other failure as the generic inline error. No log line carries the kind or the status.

POST /actions/medicaid/demonstration-activity

canopy-medicaid POST /v1/demonstration-activity-reports (CREATE_DEMONSTRATION_ACTIVITY_REPORT) with the typed CreateDemonstrationActivityReport, with the cooperation action's checks in its order and on the same delegation (#3205, actions_medicaid::demonstration_activity). Its form fields are household_id, person_id, activity, hours, period_start, period_end, verification (exactly verified or self_attested), effective_date and target_section. The activity select is the booted pack's [medicaid.adult_demonstration].activities by label (demonstration_activities::DemonstrationActivities, the PolicyVocab member), and the posted code must be exactly one of them before any upstream call, as must hours of 0 or more to one decimal place and three calendar dates (parse_demonstration_activity). canopy-medicaid judges the dates' range and order, the activity and the hours' bound; its six coded 422s (medicaid_date_out_of_range, medicaid_effective_date_in_future, medicaid_period_in_future, medicaid_period_end_before_start, medicaid_unknown_activity, medicaid_hours_out_of_range) render as their own copy. No log line carries the activity, the hours or the verification. Both actions land on the categories tab. Below the COA table, its Cooperation and qualifying activity section (case_detail::medicaid_tab::worker_facts) names every member from the named roster, reads LIST_COOPERATION_FINDINGS, GET_DEMONSTRATION_ACTIVITY_COUNT and LIST_DEMONSTRATION_ACTIVITY_REPORTS per member, and shows in words each kind's current finding (the newest effective) with its date, canopy-medicaid's counted hours against the threshold over the window with the verdict, and the reports inside the window by the activity's label and verification. A member with none reads "None recorded"; a disabled section reads "Not a condition in this jurisdiction". A failed read is a "couldn't load" cell and marks the tab Partial, and a failed roster read one line that marks it Error. The copy names no state and no program brand; a test holds the rendered section to the neutrality gate's identifier stems.

POST /actions/wic/{interim-contact,change-report}

canopy-renewals POST /v1/renewals/wic/{interim-contact,change-report}.

POST /actions/wic/schedule-appointment

canopy-wic POST /v1/wic/households/{household_id}/appointments (SCHEDULE_APPOINTMENT in canopy-contracts-wic) with the typed ScheduleAppointmentRequest, keyed on the parsed household id (#2381). Form fields: household_id, appointment_at, appointment_type, notes. appointment_at is the browser's datetime-local value, a wall clock with no zone (2026-10-15T10:00): it is read in the jurisdiction's legal frame and sent as its instant (#3581). Text that is not such a time, or a time the frame skips (the spring-forward hour), is refused inline before any call; a time the frame has twice (the fall-back hour) is the earlier instant, the SNAP interview action's rule.

POST /actions/wic/schedule-terminations

canopy-wic POST /v1/wic/households/{household_id}/terminations (SCHEDULE_TERMINATIONS) with the typed ScheduleTerminationsRequest (#2450). Form fields: household_id, reassessment_run (one determination id of the chosen run), reason_code, effective_on (blank for the earliest date) and idempotency_key (minted per render). Before any upstream call it refuses, inline, a run that is not an id, a reason that is not one of the booted pack’s [[wic.lifecycle.termination.reasons]] (loaded at boot by wic_termination_reasons::WicTerminationReasons, required when WIC is enabled), a malformed date and a key that is not a UUID (actions_wic_terminations::parse_schedule). The run is looked up on the household’s reassessment list and the body carries that run’s ids (bound_resource::wic_reassessment_run); a run on no run of the list is the binding’s 403. The form key is both the body idempotency_key and the Idempotency-Key header. Lands on /cases/{household_id}?program=wic&focus_section=determination.

POST /actions/wic/cancel-termination

canopy-wic POST /v1/participants/{id}/terminations/{termination_id}/cancel (CANCEL_TERMINATION) with CancelTerminationRequest { household_id } (#3107), posted from the panel’s confirmation dialog (#2450). The record must name the posted household (GET /v1/participants/{id}) and the termination must be on its list (bound_resource::wic_termination), else the binding’s 403 before the write, and the body carries the household the binding proved. Same landing. For both actions, every coded 409 and 422 canopy-wic’s two routes document (except termination_household_mismatch, which falls to the generic arm), the header layer’s idempotency_body_mismatch, and an uncoded 403 or 404 render server-owned copy (actions_wic_terminations::refusal_copy); the upstream’s own text never reaches the page.

POST /actions/wic/nutritional-risk

canopy-wic POST /v1/nutritional-risk-assessments with the typed CreateNutritionalRiskAssessment; the assessed person must be a member of the posted household, else the not-a-member 403 before the write, and the body carries the proven id (#2540). Its form fields are household_id, person_id, assessment_date, the four category boxes (anthropometric_risk, biochemical_risk, dietary_risk, medical_risk), one risk_codes value per checked risk-code box, notes and target_section; the handler reads them with axum_extra::extract::Form, which collects the repeated risk_codes (#2337). Before any upstream call it refuses, inline: a malformed date, a form with none of the four category boxes ticked (#3583), an empty risk-code selection, and any code that is not one of the booted pack’s [[wic.nutrition_risk_criteria]] rows, naming the code (actions_wic::parse_nutritional_risk). canopy-wic checks only that the list is non-empty, so the BFF is the only allowlist. The form’s boxes ("code — title") are rendered from the same rows, loaded at boot by wic_risk_criteria::WicRiskCriteria, which render_nutrition_tab passes to the tab. The rows are required when [jurisdiction].enabled_programs includes wic and are not read otherwise; canopy-web refuses to boot when that list is missing or malformed, or when WIC is enabled and the table is missing, empty, has a blank code or title, or repeats a code (Rulesets › WIC nutrition risk criteria). For both WIC actions a form household_id that is not a household id is the inline error before any upstream call, and the case redirect carries the parsed id (#2381). The form picks the person from the household’s named roster (household_head::picker_roster; a disabled "Roster unavailable" option when the read fails), never a typed id (#2414).

POST /actions/wic/breastfeeding-status

canopy-wic POST /v1/breastfeeding-statuses (CREATE_BREASTFEEDING_STATUS) with the typed CreateBreastfeedingStatus {person_id, status, effective_date}, under the worker's delegation; the body names no recorder, because canopy-wic records the delegation's subject (#3154). It runs the nutritional-risk action's checks in the same order: WritePermission, ProgramScope<Wic>, then the form, then the person on the posted household's roster (the not-a-member 403 before the write). Its form fields are household_id, person_id (from the same named-roster picker), status (exactly fully, partially or not_breastfeeding), effective_date and target_section. Before any upstream call it refuses, inline: a malformed household id, a status that is not one of the three tokens, and a missing or impossible date (actions_wic::breastfeeding::parse_breastfeeding_status). canopy-wic judges the date: its 422 wic_effective_date_in_future (after its legal today) and 422 wic_date_out_of_range (outside the years 1900 to 9999) render as their own inline copy, and any other failure as the generic inline error. A recorded status lands on the Nutrition tab, whose status table reads LIST_BREASTFEEDING_STATUSES?person_id= per member and shows the newest row (the list is newest effective first): the status and its effective date, "No status recorded" for a member with none, or a "couldn't load" row and a Partial tab when that member's read fails.

Ops and Studio

Route Scope Behaviour → upstream

POST /ops/scheduler/applications/run

not program-scoped; Supervisor / Admin

Manual applications-drain trigger (#1642) → POST /v1/applications/scheduler/run, the worker’s delegation (the origin re-checks the role); per-leg counters render in a role="status" region of the same worker-layout page (#3059). Another role gets a 403 banner, and a refused trigger a 502 one that links back to the trigger page.

POST /ops/quarantined-determinations/resolve

AuthorizedResource all-of the re-read envelope’s program; determination operators

Re-verify or dismiss one quarantined envelope → canopy-eligibility POST /v1/eligibility/quarantined-determinations/{id}/resolutions, the worker’s delegation; 303 back to the worklist (Quarantined-envelope worklist (#2061)).

POST /ops/held-determinations/adopt

AuthorizedResource all-of the re-read hold’s program; determination operators

Adopt the re-read hold’s operation → canopy-eligibility POST /v1/eligibility/determination-operations/{operation_id}/adoptions with {note}, the worker’s delegation; 303 back to the same page (Held-determination worklist (#3127)).

POST /ops/held-determinations/drop

AuthorizedResource all-of the re-read hold’s program; determination operators

Drop the re-read hold’s events → canopy-eligibility POST /v1/eligibility/held-determinations/{determination_id}/drops with {program, note}, the hold’s own program, the worker’s delegation; 303 back to the same page (Held-determination worklist (#3127)).

POST /studio/onboarding/step/{step}

StudioAdminOnly

Advance the composition onboarding wizard (session-stored WizardDraft), four steps, with no identity step: a jurisdiction’s identity provider is deployment configuration (ADR-050). A refused step keeps what was typed in the draft but revokes its own completion; the bundle is offered only once every step validates.

POST /studio/onboarding/cancel

StudioAdminOnly

Cancel the wizard and clear the draft. On Steps 1 to 3 the Cancel button sits in the step’s actions row but submits a separate form after the step form (form="studio-wizard-cancel", with its own _csrf), so the step form’s default button is Next and Enter in a field submits the step, never Cancel (#2352).

Studio pages, same gate: GET /studio (home), GET /studio/onboarding (start), GET /studio/onboarding/step/{step} (a wizard step), GET /studio/onboarding/bundle (the generated bundle, a zip attachment: built only when Steps 1–3 are complete and the stored draft passes every step’s validation again, re-run as a submission runs it; otherwise 303 to the first step that is not, #2353).

Quarantined-envelope worklist (#2061)

api/ops_quarantine.rs (copy in api/ops_quarantine/copy.rs) is the worker surface over canopy-eligibility’s quarantined envelopes (canopy-eligibility › Quarantined envelopes).

  • Gate. Both routes refuse, with a 403 fragment and no upstream call, a worker whose WorkerRole::is_determination_operator is false. For a single role that is exactly canopy_auth::DETERMINATION_OPERATOR_ROLES (eligibility_specialist, supervisor, admin); with several roles the portal’s role precedence can only narrow it. The resolve also takes WritePermission.

  • Bearer. canopy-eligibility’s quarantine routes admit a worker at DETERMINATION_OPERATOR_ROLES, so both routes call it on the worker’s delegation. A delegation that cannot be minted renders the worklist’s error state, or refuses the resolve 502 with nothing changed.

  • Worklist. One page of 50, keyset-paged (Next page / First page), scoped query-time by the worker’s programs= storage slugs. A captioned table: the full envelope id (the row header), program, reason, the claimed status headed Claimed status (unverified), the received time in the jurisdiction’s named zone, an Open case link, and a form per row with an Action fieldset (Re-verify / Dismiss) and a required note (1–500 characters). A failed read shows the error state, never an empty list; no rows shows the empty state.

  • Resolve. The handler parses the typed envelope id and action (422 otherwise), re-reads the envelope (GET /v1/eligibility/quarantined-determinations/{id}), and authorizes its program all-of against the worker’s scope (403 x-canopy-denial: program-scope out of scope). Only then does it post the resolution. Every upstream refusal maps by status and code to server-owned copy, and upstream text is never echoed: 403, 404, 422 invalid_note and each known 409 code get their own copy; a 409 with an unrecognized code renders generic copy at 409; anything else (a transport failure, a 5xx, an uncoded 409, another 422) is a 502.

  • Notices. Success answers 303 to /ops/quarantined-determinations?notice=… with one notice from a closed vocabulary: dismissed, reverified (a determination of record, recorded on its application), reverified-unrecorded (a determination of record that the application did not show within the projection wait; canopy-applications records it on its own), already-reverified (nothing changed), and still-quarantined with its new reason. Any other query value renders no banner.

  • Read-back. canopy-applications records a promotion on its application from eligibility's verdict (#3202). A promotion canopy-eligibility answered 201 Created for (this request wrote it) is read back from the application (Read after a determine): projected lands reverified, pending lands reverified-unrecorded, and a refusal renders as a 409 fragment with the refusal copy (the envelope is a determination of record, but the application did not record it). A 200 OK replay of an earlier promotion reads nothing back. The action writes nothing to canopy-applications.

Read after a determine

canopy-web never writes an application's determination (#3202): canopy-applications projects it from canopy-eligibility's determination.recorded.<program> verdict. After a determine returns, approve_application, run_determination and the quarantine promotion call await_projection (src/api/determination_projection.rs), which reads GET /v1/applications/{id} on the worker's delegation, every 150 ms, until each program the response names a terminal determination for carries one of that response's determination ids in determination_id (the sibling rule picks which), or a record_back_refusal naming one, or projection_wait_ms (CANOPY_WEB__PROJECTION_WAIT_MS, default 1000) runs out. A response that names no terminal determination waits for nothing. Three renders follow:

  • Projected — the action's success: the run's recomputed banner (or its redirect), the approve's redirect to the case, the promotion's reverified notice.

  • Refused — the #1707 copy, built server-side from the row's refusal code (refusal_copy): the run's failed-run alert, the approve's action-error fragment, the promotion's 409 fragment.

  • Pending — the wait ended first: a status alert, "Determination recorded.", saying the application will show it shortly (run and approve), or the promotion's reverified-unrecorded notice. It is never reported as a failure.

A determine that outlives determine_timeout_ms answers the still-running alert, which says the run may still finish and that its outcome appears on the application when it does (#3199); no re-run is asked for.

Held-determination worklist (#3127)

api/ops_held.rs (copy in api/ops_held/copy.rs, view model in api/ops_held/page.rs, template templates/ops/held_determinations.html) is the worker surface over canopy-eligibility’s held determinations: determinations a program service made that canopy-eligibility never recorded, whose events the service still holds past its warning age (canopy-eligibility › Held determination events, ADR-002 Amendment 8). It mounts from its own builder, ops_held::routes(), which api::routes() merges.

  • Gate. Every route refuses, with a 403 fragment and no upstream call, a worker whose WorkerRole::is_determination_operator is false. The two actions also take WritePermission.

  • Program scope. canopy-eligibility’s held routes admit any determination operator and check no program, so canopy-web holds the worker’s scope. The selector offers only the worker’s programs. A program outside the scope is the view gate’s 403 (x-canopy-denial: program-scope), and an unknown one its 422, before any read. An action authorizes the re-read hold’s own program all-of, never the form’s.

  • Bearer. Every call rides the worker’s delegation. A delegation that cannot be minted renders the worklist’s error state, or refuses the action 502 with nothing sent.

  • Worklist. A Program selector, then one page of 50, oldest first, keyset-paged (Next page / First page) on the cursor eligibility issued; a next that is not such a cursor is not linked. A captioned table: the full determination id (the row header), the program the service reports it under (chip on Medicaid’s list), the disposition, the operation id or a dash, the held-since time in the jurisdiction’s named zone, the held event count, and the action. An adoptable hold offers an Adopt and a Drop events form, a drop_only hold Drop events alone; each form is a labelled fieldset with a required note (1–500 characters). A recorded, resolved or quarantine_open hold offers no form, only a note on why; the quarantined one links /ops/quarantined-determinations. A failed read shows the error state, never an empty list; no rows shows the empty state.

  • Actions. The form carries the listed program, the page cursor, the determination id and the note. The handler parses them (422 for a malformed id or cursor), re-reads that one page, and finds the determination on it (409 when it is no longer there). It authorizes the hold’s program, then posts. Adopt posts {note} to the operation the re-read hold reports; a hold that reports none is a 409 before any write. Drop posts {program, note} with the hold’s own program. Neither body names a household.

  • Refusals. Every upstream refusal maps by status and code to server-owned copy (copy::refusal_copy), and upstream text is never echoed: 403, 404 (an adoption of an operation eligibility has no record of), 422 invalid_note, 502 program_unavailable, and each 409 code either route documents get their own copy. A 409 with an unrecognized code renders generic copy at 409; anything else is a 502.

  • Notices. Success answers 303 to the same program and page with notice=adopted or notice=dropped. Any other value renders no banner. A dropped hold reads resolved until the program service’s verdict consumer deletes its events, then leaves the list.

Security administration

admin_security.rs (admin_security::routes(), mounted in the protected router) is a security administrator’s surface over canopy-security’s admin routes (canopy-security API), called through canopy-auth’s AdminClient on the worker’s delegation for canopy-security, which canopy-security admits only for security_admin (ADR-049 Amendment 20).

  • Gate. Every route takes admin_security::SecurityAdminOnly, which admits a session holding security_admin whatever its case role, and answers the 403 page, calling nothing, otherwise. The nav’s Security administration link is shown to exactly those sessions (base.html, both copies; NavRole::security_admin).

  • Reads render the page; an admin error renders fixed copy at its status (403, 404, 409, 422, 429, else 503).

  • Writes parse the form’s reason (1–200 bytes, no control character) and the path’s id into canopy-auth’s checked types before anything is sent: a refused one answers 422 (reason, upstream pair, id in a form) or 400 (an id in the path), echoing nothing. A form whose bytes or percent-escapes are not UTF-8 answers 400 before it is parsed, and one over 16 KiB 413 (AdminForm). A write canopy-security recorded answers 303 back to its page with ?notice= from a closed set (created, suspended, lifted, revoked, linked, key_revoked, client_disabled, client_enabled, or unchanged when nothing changed). One canopy-security answered insufficient_user_authentication answers the handoff page to /auth/step-up?return_to=<the page>.

Method Path Does

GET

/admin/security

Lookup form; ?id= or ?issuer=&subject= redirects to the subject named

GET

/admin/security/subjects/new

Create form

POST

/admin/security/subjects

Create, unlinked; a blank id is minted (UUID v7)

GET

/admin/security/subjects/{id}

Links, suspension, sessions

POST

/admin/security/subjects/{id}/suspend

Suspend

POST

/admin/security/subjects/{id}/lift

Lift the suspension

POST

/admin/security/sessions/{id}/revoke

Revoke a session; the form’s subject names the page to return to

GET

/admin/security/links/new

Re-link form (?subject= fills the subject in)

POST

/admin/security/links

Link or re-link an upstream identity to a subject

GET

/admin/security/keys

Signing keys whose publish window has not ended

POST

/admin/security/keys/{kid}/revoke

Revoke a key

GET

/admin/security/clients

Every compiled client and its state

POST

/admin/security/clients/{client}/disable

Disable a client at runtime

POST

/admin/security/clients/{client}/enable

Lift a client’s runtime disablement

Device approval

device.rs (device::routes(), mounted in the protected router) is where a worker approves canopy-cli’s device flow (RFC 8628) and revokes the devices they approved (ADR-049 Amendment 21). Every route takes device::ApproverSession: any admitted session.

  • Code entry. POST /device asks canopy-identity to describe the device the code names, through canopy-auth’s NativeSessions, for the confirm page; POST /device/deny denies it. A code that does not parse and one canopy-identity knows no device for show the one message, 422; too many codes show canopy-identity’s wait, 429.

  • Approval. POST /device/approve starts a step-up sign-in whose grant is the device’s alone: a device_approval flow (the max_age step-up options) naming the worker’s web session, answered with the handoff page to the upstream. The sign-in callback completes it for that web session, served by its id because the upstream’s return carries no SameSite=Strict cookie, keeps the device’s native session in web_native_session, and hands off to /device/approved. A stale step-up restarts once with prompt=login; a code canopy-identity refuses, or a step-up signed in as someone else (approver_mismatch), renders the sign-in page with its refusal and keeps nothing.

  • Revocation. POST /device/sessions/{id}/revoke revokes the worker’s own device (its native session and upstream grant both) and answers 303 to /device/sessions?notice=revoked; a device that is not the worker’s answers 404 before anything is revoked.

  • Upkeep. Every replica sweeps the native sessions every 30 s (device::spawn_native_sweep), re-federating each from its own grant.

Method Path Does

GET

/device

Code form (?user_code= fills it in)

POST

/device

Describe the device, then the confirm page

POST

/device/deny

Deny it

POST

/device/approve

The step-up’s handoff to the upstream

GET

/device/approved

The approval landed

GET

/device/sessions

The worker’s approved devices

POST

/device/sessions/{id}/revoke

Revoke the worker’s own device

The identity edge

canopy-auth’s EdgeForwarder forwards canopy-identity’s public routes to canopy-security’s internal URL: POST /identity/token, POST /identity/revoke, POST /identity/device_authorization, GET /identity/jwks and GET /.well-known/oauth-authorization-server/identity. They are merged outside the session and CSRF layers, since their callers (canopy-cli, machine clients) carry their own credentials, and under the per-IP limit. The forwarder sets X-Forwarded-For to the client CANOPY_TRUSTED_PROXIES resolves (the ingress in front of canopy-web).

Other routes

Mounted in main.rs outside the protected router.

Route Description

GET /login

The sign-in page (AC-8): the jurisdiction’s system-use notice (jurisdiction.toml's [sign_in] system_use_notice) and a Continue link to /login/start, carrying the request’s return_to only in its normalised form (#2520). ?error=<code> renders the refusal’s banner: 403, or 503 for identity_unavailable. The codes are no_role, missing_primary_programs, malformed_primary_programs, no_username, subject_suspended, upstream_refused, auth_time_too_old, identity_unavailable, user_code_invalid, approver_mismatch (a device approval’s) and sign_in_failed (auth::Refusal); any other code renders the plain page, and no code is reflected. It writes nothing.

GET /login/start

Starts a sign-in: a web_login_flow row (15 minutes, bound to the OAuth state, naming the live session it replaces) and the flow cookie, then 303 to the upstream’s authorization endpoint. A plain navigation, never the answer to a form, so the CSP’s form-action cannot block it. Sends prompt=login when the browser carries the canopy_reauth cookie. A return_to is kept only as the normalised path and query auth::return_path::safe_return_path returns (at most 2 048 bytes, #2520); a refused target is not kept, and that sign-in lands on /. 503 when the store cannot record the flow or the upstream’s discovery cannot be read.

GET /auth/step-up?return_to=

Starts a step-up of the live session: a step_up flow asking the upstream for an authentication within the last 300 s (max_age), then 303 to it. Without a live session, 303 to /login keeping the return_to.

GET /auth/callback

Takes the flow its cookie names, once and only with that flow’s own state (a replay or a foreign state lands on /login and consumes nothing), and completes it by its kind. A sign-in or step-up redeems the code at the upstream, opens the session at canopy-identity, admits it (a recognized role and a usable program scope, ADR-044), and creates the session row under a fresh token and CSRF value, ending the session it replaces as superseded and revoking that session’s canopy-identity session; a sign-in whose replaced session was signed out meanwhile is refused to /login. A stale upstream authentication (canopy-identity’s auth_time_too_old, or an id_token older than a step-up’s max_age) restarts the flow once with prompt=login, as a handoff to the upstream; a second one, like every other refusal, renders the sign-in page with the refusal’s banner (403, or 503 for identity_unavailable), and a refused session is revoked at canopy-identity and its refresh token at the upstream. A device approval’s flow completes the approval (Device approval). A completed sign-in answers 200 text/html, never a redirect (#2509): the handoff page sets the session cookie and sends the browser on, by a meta refresh and a Continue link, to the flow’s stored return path (validated again) or /; nothing in the callback’s own request chooses the destination. The upstream’s redirect to the callback is cross-site when the upstream is on another registrable domain, and carries no SameSite=Strict cookie; the handoff’s navigation starts from canopy-web’s page, so it carries the new session cookie. A store that cannot take the flow or create the session answers 503, never a sign-in loop.

POST /logout

Sign-out (#2517), CSRF-checked: the _csrf form field or X-CSRF-Token header must carry the live session’s token, or the request is refused 403 and nothing changes. It deletes the browser’s pending flow and clears its cookie, then signs the session out through the engine: the row ended signed_out (when the cookie’s session was already superseded by a sign-in completing concurrently, the session that replaced it, following superseded_by), its canopy-identity session revoked, its upstream refresh token revoked, and the upstream’s end-session URL built when advertised (the revocation runs beside an end session too, #2905). The revocation is sent before the handoff answers; a refused or timed-out one is logged, naming no token, and the sign-out hands off all the same (#2903). It clears the session cookie and answers 200 text/html, a handoff page (Cache-Control: no-store, Referrer-Policy: no-referrer) to the upstream’s end_session_endpoint when advertised, else to /login with the canopy_reauth cookie set, so the next sign-in sends prompt=login. Never a redirect: the CSP’s form-action 'self' would block one that follows the form’s POST. A request naming no live session is not CSRF-checked: it still ends what its cookie’s superseding chain names and clears cookies. The base template’s two Sign out buttons are forms posting here, rendered only for a live session: the sign-in page and the 404 page extend _public_base.html, which shows a visitor without one no sign-out, worker nav, worker name, ⌘K palette or /sse stream, and the 404 page offers Sign in in place of its dashboard and case-search links (#2537). There is no GET /logout (405); the route-authz audit fails on one. A sign-out whose store cannot confirm the end answers 503 "Sign-out could not be confirmed. Try again."

POST /identity/{token,revoke,device_authorization}, GET /identity/jwks, GET /.well-known/oauth-authorization-server/identity

canopy-identity’s public routes, forwarded by EdgeForwarder (The identity edge).

GET /livez

Liveness probe — the static {"status":"ok"}, unconditional; the compose healthcheck probes it.

GET /readyz

Readiness probe — canopy-api’s readyz_check (#2117): 200 while SELECT 1 on the session pool succeeds, 503 with the fleet’s HealthResponse body when it fails; rabbitmq reads n/a (no MqHealth layered); redis reports the rate limiter’s backend when CANOPY_WEB__RATE_LIMIT_REDIS_URL is set, never gating. See Deployment Guide › health.

GET /theme.css

Jurisdiction theme stylesheet, served as a real stylesheet for strict CSP.

GET /api-doc/openapi.json

OpenAPI JSON for the composition surface only (CompositionApi); no Swagger UI (strict CSP).

/static/*

Static assets (ServeDir), outside the access-log middleware. Every response carries an explicit Cache-Control: public, max-age=3600 on a served file and on the 304 that revalidates it, no-store on a miss — never immutable, because the asset URLs are not content-hashed (#1411 owns that question). .woff2 is served uncompressed; the gzip predicate exempts font/woff* beside application/pdf and application/octet-stream (#1888).

test-clock routes

canopy_api::test_clock_router() is merged only in test-clock builds (ADR-033 §5).

anything else

errors::not_found_handler (404).

Error codes

Status Meaning

200

Page or fragment rendered (action refusals rendered as the inline _action_error.html fragment are 200 too); composition GET returned a document

204

Composition DELETE succeeded or was an idempotent no-op

303

Action redirect back to the originating page; /login/start and /auth/step-up to the upstream

400

Malformed action form or missing required field (run-determination without ?program= renders a banner instead)

401

No session on a composition JSON request

503

The session store could not be read or a stale session’s maintenance outlasted the page budget (any protected route, Retry-After: 5; the composition API’s session_store_unavailable envelope), a flow could not be recorded or taken, canopy-identity was unavailable to a sign-in, or a sign-out could not be confirmed

403

Session / CSRF / write-permission / role / program-scope / binding refusals (see Authorization model)

404

Unknown route, unknown household or application (including the empty participation union), unknown composition surface, RoleNotFound

412 / 428

Composition write precondition failed / missing

415

PATCH against a dashboard composition surface (user_delta_v1 is PUT-only)

422

composition_unresolvable: a composition PUT or PATCH (live, role or user layer) that would leave the surface unresolvable for a role it resolved for before the write (#1406). The loader's rule is named in details.kind (unknown_plugin, span_out_of_range, row_overflow, post_merge_shape, patch_failed, …) and the role in details.role; nothing is written and no audit event is emitted. A live write is checked for every role in idp.toml, a role write for that role, a user write for the caller's own view. A view that already failed to resolve before the write is not held to the check, so a broken surface can be repaired in steps

422

Composition UserDeltaError family; the action ladders' pre-write refusals (a SNAP-less case, a reason outside the closed vocabulary, no usable participation set)

429

Per-IP rate limit exceeded

500

Composition loading or template render failed; a refused fact write whose audit event could not be staged ([refused-fact-writes]); on the deadline-covered routes an upstream data failure renders the degraded state instead (the two audit-log downloads, the continuations panel and the two process-panel fragments answer 502 — see the 502 row)

502

Fail-closed fragments and proxies whose upstream authority could not be read (continuations panel, the process page's reopen and postponement panel fragments, rep history, document content)

Backend service clients

clients::ServiceClients (clients.rs) carries one InternalClient per upstream. serve_session binds a request’s roster to its outbound, so every call carries the worker’s delegation for its target; attributed writes obtain an AuthorizedClient from an authorization proof. The panel cache keys each entry by service, URL and the worker’s subject (#2647), so one worker’s cached read is never served to another.

Client Used for

persons

households, members, fact claims (income / asset / expense / address)

applications

queue and lists, processing, intake sections, documents, interviews, denials, pends, reopen and postponement records, representatives, the ops drain

eligibility

run-determination, case status, cross-program alerts, determinations, the quarantine worklist and resolve, the held worklist, adopt and drop

verification

verification requests, cancels, dashboard panel feeds

enrollment

enrollments, issuance, adverse actions, continuations

snap

ABAWD, work registrations, work sanctions, discrepancies, overpayment recompute, SNAP parameters

tanf

work activities, discrepancy resolution

medicaid

CMD ingest

caps

authorization updates, provider switch, parent activities, child care needs

wic

household appointments, nutritional-risk assessments, breastfeeding statuses

renewals

certifications, interim contacts, change reports, nudges

notices

notice history, PDFs, document render, palette search

appeals

filing, decisions

security

audit events, fact history, the worker directory sink

reporting

reporting reads (cross-program by design)

Security

  • Strict CSP — no 'unsafe-inline' or 'unsafe-eval' (csp.rs; Alpine.js CSP build, nonce-based styles).

  • CSRF token on every state-changing HTML request (csrf::csrf_middleware); the composition JSON sub-router relies on SameSite=Strict instead.

  • Session cookie __Host-canopy_session, HttpOnly, Secure, SameSite=Strict (load-bearing — the CSRF control for /v1/composition; never downgrade to Lax / None without adding a token layer there — web_session/cookie.rs). The cookie carries a 256-bit random token; the store holds only its SHA-256 (#2518).

  • Per-IP rate limiting (canopy_api::apply_rate_limit_redis): a replica-aware Redis fixed window when CANOPY_WEBRATE_LIMIT_REDIS_URL is set, degrading to the process-local governor on Redis failure — never to unlimited; rpm via CANOPY_WEBRATE_LIMIT_RPM (#1227).

  • Outbound calls present the worker’s delegation for their one target (ADR-049); the session’s credential never leaves the BFF. Each receiving service admits the delegation by the route’s compiled admission (ADR-049 Amendment 14).

  • Fail-closed admission (ADR-044): no session without canopy-identity’s federation, a recognized role and a usable program scope; every serve re-admits the session as canopy-identity last federated it, and a session that no longer admits is served as none.

Edit this page · default