ADR-002: Black-Box Determination Contract
Status
Accepted
signature_quarantined status and Amendment 3’s quarantine-marked row and read-view adoption matcher.
determination.requested trigger) and designates the existing signed previous_determination_id (ADR-028 §57), plus a typed trigger enum, as the initial-vs-re-determination signal for that path. The Decision text is unchanged; see Amendment 1 §D2 for the async signing invariants and §D9 for the signal.
Context
Once program services are isolated (see ADR-001), a question arises about what the contract between program services and the eligibility orchestrator (canopy-eligibility) looks like.
Two broad approaches are possible:
-
The orchestrator is given access to the program service’s data and makes the determination itself.
-
The program service makes the determination internally and returns only the result.
The first approach — orchestrator-as-brain — is how most integrated eligibility systems are designed. It is also how the data isolation requirements are violated: once the orchestrator can query FTI, the logical isolation of canopy-tanf is defeated.
The second approach — program-as-black-box — follows directly from ADR-001 and has independent technical and legal advantages worth documenting explicitly.
Decision
Program services operate as black boxes with respect to the eligibility orchestrator.
The contract between a program service and canopy-eligibility is a signed determination object:
{
"program": "snap",
"household_id": "...",
"application_id": "...",
"determination": "approved",
"benefit_amount": 847.00,
"benefit_unit": "monthly_usd",
"effective_date": "2026-04-01",
"expiration_date": "2027-03-31",
"renewal_date": "2027-02-01",
"basis": "magi_gross_income_under_130pct_fpl",
"program_service_version": "1.4.2",
"determined_at": "2026-03-25T14:32:00Z",
"signature": "<detached JWS>"
}
The signature is a detached JWS (JSON Web Signature) produced by the program service’s private key.
canopy-eligibility verifies the signature before accepting the determination.
No program service may accept a determination that fails signature verification.
The orchestrator:
-
Submits an application context (household composition, self-reported income, program applied for) to each relevant program service
-
Receives signed determinations
-
Applies the federal eligibility hierarchy (EE15 — most advantageous group assignment) across determinations
-
Assembles the combined result for the applicant
The orchestrator does not:
-
Query program databases
-
Access verification data (FTI, SSA, IEVS)
-
Reconstruct the reasoning behind a determination
-
Override a determination without routing a new evaluation through the program service
Rationale
Legal
The black-box contract is the logical enforcement mechanism for ADR-001’s data isolation requirement. An orchestrator that can query program data defeats isolation in practice even if the isolation exists in principle. By making the contract a determination object rather than a data query, the boundary is architecturally enforced rather than policy-enforced.
An IRS Pub 1075 auditor can observe that canopy-eligibility receives a determination from canopy-tanf without receiving the FTI that produced it.
The audit boundary is clear and demonstrable.
Cryptographic integrity
The JWS signature on each determination object serves two purposes:
-
Tamper-evidence: No downstream service can modify a determination in transit or at rest without invalidating the signature. A SNAP determination that says "approved" cannot be changed to "denied" — or vice versa — without
canopy-snap's private key. -
Non-repudiation: The determination is attributable to a specific program service at a specific version. This matters for audit trails, appeals, and federal reporting — all of which require knowing which system made a determination and when.
This pattern is derived from the CRAIG project’s JWS intake signing (CRAIG ADR-010, external to this repository), which uses ECDSA P-256 detached JWS for partner-submitted intake reports.
The same cryptographic approach applies here with the program service as the signer and canopy-eligibility as the verifier.
Operational resilience
A program service can be deployed, updated, or restarted independently without affecting determinations already in flight. Signed determinations are immutable records — a canopy-snap deployment does not invalidate existing approved determinations.
Alternatives considered
Alternative 1: Orchestrator queries program databases directly Rejected. Defeats the data isolation guarantee of ADR-001. Also creates tight coupling between the orchestrator’s data model and each program’s schema, making independent program deployment impossible.
Alternative 2: Shared determination database, programs write, orchestrator reads A compromise — programs write determinations to a shared store, orchestrator reads from it. Rejected because a shared determination store becomes a target for cross-program data leakage: if the store contains TANF determinations alongside SNAP determinations, and the TANF determination includes any FTI-derived fields, the shared store is subject to Pub 1075 controls. The black-box contract keeps the determination object minimal by design.
Alternative 3: Unsigned determination objects Simpler to implement but rejected because it provides no tamper-evidence guarantee and no non-repudiation for appeals and audit purposes.
Consequences
-
Each program service generates and manages a signing key pair.
-
canopy-eligibilitymaintains a verification key registry — one public key per program service. -
Key rotation must be coordinated; key rotation plan documented separately.
-
Determination objects are append-only records. Once signed and accepted, they are not modified — only superseded by a new determination from a new evaluation.
-
The black-box contract means
canopy-eligibilitycannot explain why a program approved or denied without querying the program service for a human-readable explanation separately — which the program service may provide via a/determination/{id}/explanationendpoint that returns narrative, not data.
Amendment 1 — Async/bulk determination variant (mass-change machinery) (scale audit epic &73, #1237, 2026-07-27)
Status unchanged (still Accepted; amendments extend, they do not supersede). The 2026-07-25 scale-readiness
audit (epic &73) found (H6) that a determination is only ever triggered by a synchronous, single-attempt, ~30-call
HTTP fan-out per household inside one interactive request lifetime
(services/canopy-eligibility/src/orchestrator.rs:1398-1412) — there is no queued/bulk path and no async trigger.
So a mandatory mass change — the canonical case is the annual 7 CFR 273.12(e) COLA rebudgeting that re-determines
every ongoing SNAP case (canopy-policy pins snap-cola to Oct 1 with grace_days=0, so the ruleset flips on time
but nothing applies it to the caseload; GA ≈ 800K households ≈ 6.7h of saturated synchronous fan-out best-case) —
has no contract-level home, and a naive bulk driver would collide with the one-pending-slot invariant and starve
live interactive determinations. This amendment adds the async/bulk determination variant: a queued
determination.requested trigger, the async-path signing invariants, stable idempotency, durable
checkpoint/resume, bounded retry, one-pending-slot deferral, and — reusing the existing signed
previous_determination_id (ADR-028 §57) as the supersession linkage plus a typed trigger enum as the
classifier — an initial-vs-re-determination signal. The synchronous signed-determination Decision (§Decision) is left byte-immutable — the per-program
signed determination object and its detached-JWS trust boundary are unchanged; what this amendment adds is
when/how a determination is triggered and the lifecycle/dedup/retry semantics around it.
Erratum (2026-09-21, as-built): the enrollment apply-semantics this amendment hands to a later issue shipped with the snap-redetermination-adoption plan, and not as §D9 sketched them. canopy-eligibility classifies a SNAP re-determination by its arrival path plus two fail-closed reads — canopy-enrollment’s live row (GET /v1/enrollments/live?household_id=&as_of=) and canopy-renewals' in-force certification — and signs a basis kind: interim_change (the worker re-run, anchored by the household’s report date), order_continuation (an order’s as_of) and mass_change_cola (the October run’s as_of) are the continuation class canopy-enrollment applies IN PLACE through its U-CONT-a arm (#1659), and recert_approval (an in-period renewal decision) schedules a successor enrollment that starts the day after the old period ends; neither the trigger enum nor previous_determination_id is read by the classifier (services/canopy-eligibility/src/derivation.rs, enrollment_state.rs). The 7 CFR 273.13 reduction path is the continuation arm’s staged action (services/canopy-enrollment/src/adverse_actions.rs, stage_continuation_action), not #1002’s remainder, and the #1130 one-live park is the DEFECT fence only — no re-determination of a live household reaches it. Read §Settled decisions 2–3, §D9 and §Consequences below with this line; the sentences that name the later issue are the 2026-07-27 record. The Medicaid 42 CFR 431.211 advance-notice gap is #2207.
Erratum (2026-09-25, as-built): §D2’s last sentence is superseded by Amendment 5. An envelope that does not verify is no longer stored as a signature_quarantined determination: it is written to quarantined_determinations, never to program_determinations, and the program’s result stays pending with no benefit counted.
This amendment pins the contract (D1–D10), the invariants, and the acceptance criteria; the implementation
children own the byte-level. #1213 (the mass-change / October-COLA driver) builds the determination.requested
consumer, the bulk-enqueue admin surface (cohort selection, dry-run then enact), the durable checkpoint/resume
tables, bounded concurrency, and the per-dispatch idempotency keys; #1133 owns enrollment apply-semantics for an
already-enrolled re-determination. Everything beyond the shipped synchronous path is not built yet — the
clauses are normative (MUST/SHALL), not as-built. This amendment governs the determination contract only; how
enrollment applies a re-determination (adjust-in-place vs supersede under the #1130 one-live-enrollment fence,
and the 7 CFR 273.13 reduction-type adverse-action routing) is #1133 and is explicitly out of scope (§D9,
§Consequences).
Settled decisions
-
The async path reuses the exact synchronous signer — no "system" key. Every determination on the async path is signed with the same boot-acquired per-program signing key, the same ADR-036 key-derived
kid, and the samesigning_key_historyregistration as the interactive path, and runs the full ADR-028 seal-hash-then-sign ritual. A separate "system" signing key would make the orchestrator’s per-Program verification registry treat every async determination as unknown and quarantine it (§D2). -
The signal reuses the existing signed
previous_determination_id(ADR-028 §57) — this amendment introduces no new field. The determination envelope already carries a signedprevious_determination_id: Option<DeterminationId>(ADR-028 §57, part ofcanonical_signing_payload); this amendment designates it the async supersession linkage #1133 uses to pick which live enrollment to adjust/supersede. Because itsNoneis tri-valued (a first determination, a legacy row, or a program not yet implementing supersession),Nonealone is NOT a sound initial-vs-re-determination signal — the authoritative classifier is a typed trigger/reason enum (§D9), withprevious_determination_idcarrying the linkage. Both are inside the signed JWS payload, so neither can be stripped or spoofed by envelope/routing metadata (§D9). -
An already-enrolled household’s re-determination is a first-class, expected contract outcome — not a defect, not a DLQ candidate. The current enrollment PARK (
services/canopy-enrollment/src/auto_enroll.rs:143-171) and the create-API 409 are documented as the bridge until #1133 implements adjust-vs-supersede (§D9). -
The Decision text is left byte-immutable — this amendment extends, it does not supersede.
The async/bulk determination contract (children own the byte-level)
D1 — Async trigger: a determination.requested command event. The async path is triggered by a new
determination.requested routing key — a request/COMMAND event, explicitly distinct from the existing
determination.completed* fact events. No such key exists today. It MUST carry a typed payload defined in a
contracts crate (never inline JSON): cohort_run_id, the subject (application_id, household_id), the
programs, the pinned as_of + corpus/ruleset hash (§D8), the typed trigger classification (§D9), and the stable
idempotency key or its derivation inputs (§D4). It MUST obey the ADR-004 no-PII/no-FTI event allowlist (ids
status + scalars only). canopy-eligibility owns the producer AND the bulk consumer; the consumer is the enqueue
trigger only and calls the existing POST /v1/eligibility/determine (canopy-eligibility’s synchronous
orchestration entry — which internally fans out to each program’s signed /v1/determine, applies the EE15
hierarchy, holds the one-pending-slot 409, and assembles the CombinedResult) — so the signed-determination path
is reused unchanged. mq obligations: the consumer lands in-tree before the producer activates (binding-first, #1089) or an
xtask/mq-topology-allow.toml entry with a reason; canopy-eligibility's topic-write ACL in
devstack/rabbitmq/definitions.json MUST be extended to the key (#1122) or the broker ACCESS_REFUSEs the
publish; the consumer MUST be idempotent (ADR-018 at-least-once; event_inbox PK dedupe).
D2 — JWS signing/verification is byte-identical on the system-initiated path. The determination JWS binds only
determination content + the ADR-028 snapshot_hash and carries NO per-request auth identity; verification is a
pure function of (Program, kid, canonical bytes), so trust semantics are identical whether a determination is
interactive or system-initiated. The async path MUST reuse the same boot-acquired program signing key + key-derived
kid (ADR-036) and the same signing_key_history registration, and MUST run the full seal-hash-then-sign ritual
(assemble the ADR-028 snapshot; AEAD-seal leaves under a per-determination DEK from the KEK; set snapshot_hash
before signing; preserve the byte-stability invariants — micros truncation, money rescale-2, JCS
canonicalization). It MUST NOT introduce a separate "system" signing key. Verify-before-accept/persist/count is
preserved: an unverified determination is signature_quarantined and excluded from totals.
D3 — accessed_by for the FTI audit chain (not a signed field). The accessed_by actor feeds the ADR-014 FTI
hash-chain (NOT the signature) and is MANDATORY for FTI-bearing programs (no ADR-028 snapshot without a chain
row). A system-initiated run has no inbound worker, so the contract defines a well-defined principal: a real
originating-worker actor when the batch was human-queued, else a reserved system principal encoding the
cohort_run/job id (e.g. system:cola-redetermination:<cohort_run_id>) — never an empty or misleading "the
service did it". This reaffirms the ADR-019 separation: the actor JWT (aud=canopy-internal-actor) and the
determination JWS (typ=canopy-determination+jwt) are distinct token systems, keys, and registries; omitting the
actor JWT has zero effect on determination verifiability.
D4 — Stable, deterministic idempotency key. The per-dispatch Idempotency-Key MUST be a deterministic
hash(cohort_run_id, application/household_id, program, as_of/corpus) — stable across resend and
checkpoint-resume (a replay hits the #1003 middleware), yet distinct across cohort-runs and across the COLA
ruleset flip (so a post-COLA determination is not a false replay of the pre-COLA one). This replaces the
orchestrator’s freshly-generated (non-stable) per-dispatch UUID-v7. Two layers, and the durable one lives in the driver: the HTTP
idempotency middleware (#1003) is transport resend-safety only (24h TTL; at-least-once on
crash-after-side-effect) and MUST NOT be the durable dedup layer; determination persistence MUST be idempotent on
a stable natural key so a replayed unit UPSERTs/supersedes rather than duplicating (consistent with the
append-only/supersede consequence, §Consequences).
D5 — Durable, driver-owned checkpoint/resume. The driver owns durable checkpoint state — a cohort-run row
per-case item rows — mirroring the renewals NOT EXISTS + ON CONFLICT domain-state idiom, surviving
multi-hour / 800K-case runs and restarts; cohort selection via a persisted keyset cursor (the
ADR-001 Amendment 1 B2 shape); a per-unit state
machine (pending/dispatched/succeeded/failed-terminal/failed-retryable); and a single-active-run guard
via advisory-lock leader election. This is contract-visible only insofar as each emitted determination is
independently signed + idempotent — the exact table/schema is #1213’s byte-level.
D6 — Bounded retry + failure classification. Off the request path the deliberate single-attempt-no-retry
rationale (don’t amplify a synchronous ~30-call fan-out) no longer applies. The driver MUST apply bounded
retry-with-backoff + a per-job deadline + dead-letter/park, with a terminal-vs-transient split mirroring
DryRunError: 4xx = terminal (do not retry); 5xx/transport = transient (bounded retry then DLQ). A
re-determination-not-yet-done MUST NOT be converted into a terminal synthetic pending_verification
worker-queue item; and pending_verification items MUST be deduped on (application, household,
verification_type) (the verifications table has no dedup key today).
D7 — One-pending-slot interaction + interactive priority. idx_unique_pending_request (at most one live
eligibility run per (application_id, household_id)) stays the race-safe backstop that maps to a 409. A bulk
member that finds the slot held by a live interactive determination MUST skip-and-requeue (defer with
bounded backoff) — never clobber, never surface a 409 to a worker; interactive > bulk. The driver enforces this
priority as a fast-path yield before it races the INSERT, with the DB index as the backstop for a lost race.
Bulk runs MUST use bounded concurrency (a semaphore / a separate low-priority lane) so a caseload-wide drain
cannot starve the interactive fan-out (audit H6). A queued/deferred representation MUST exist so a slot-busy
member is "waiting" rather than forced into the run-or-fail closed set; prefer an idempotent enqueue keyed on
(application_id, household_id) that collapses duplicate submits into the existing handle instead of a raw 409.
D8 — as_of / corpus pinned once per cohort-run. The as_of date + the target corpus/ruleset MUST be resolved
once per cohort-run and stamped on every dispatch, so all cases score the same COLA-effective day and ruleset
(ADR-028/ADR-034), and folded into the idempotency key (§D4) so pre-/post-COLA determinations are correctly
distinct. requested_by + the inbound authz decision MUST be captured at enqueue (the caller’s session/clock is
absent at worker time); the ADR-019 service-token boundary already survives async (the orchestrator dispatches
with a service identity, not the caller bearer).
D9 — Initial-vs-re-determination signal + supersession linkage (reuses ADR-028 §57). The determination envelope
already carries a signed previous_determination_id: Option<DeterminationId> (ADR-028 §57, part of
canonical_signing_payload, skip_serializing_if so an absent value keeps the canonical bytes identical). This
amendment introduces no new field — it designates that existing signed field the async supersession linkage
#1133 uses to pick which live enrollment to adjust/supersede, and pins how the async path uses it: on a
re-determination the producer MUST set previous_determination_id = Some(prior) before signing, so the
signature binds the chain link (tamper-evident + non-repudiable; an envelope/routing-only field could be stripped
or spoofed). Its None is tri-valued (a first determination, a legacy row, or a program not yet implementing
supersession), so None alone MUST NOT be read as "initial"; the authoritative initial-vs-re-determination
classifier is a typed trigger/reason enum (cola|fpl|ruleset-migration|change-report|renewal|worker-initiated)
carried as signed provenance (also driving downstream 273.13-vs-benign routing). An already-enrolled
re-determination is BLESSED as a first-class expected outcome (today it PARKs at enrollment / 409s — the bridge
until #1133); effective_date is carried faithfully but the contract does NOT force immediate application (the
notice-timing shift is #1133, with the 7 CFR 273.13 reduction path as #1002’s remainder). The completion events
(determination.completed.snap + the orchestrator determination.completed) extend additively with the
trigger classification so notices' status-based routing still resolves.
D10 — Completion / notification edge. Async submit becomes 202 + a request_id handle (vs today’s
200-carries-result); determination.completed is designated the authoritative push edge and MUST be made
atomic with the CombinedResult write (closing the #477 non-atomic best-effort gap). The existing
GET requests/{id}, /determinations, /results/{application_id} poll endpoints are retained — a hybrid
poll+event model.
Consequences
-
A mass change (COLA / FPL / ruleset-migration) becomes N new immutable signed determinations that supersede, never mutate, their priors at caseload scale — preserving the append-only consequence (§Consequences) unchanged.
-
The black-box signed-determination trust boundary is identical on the async path; verification stays a pure function of
(Program, kid, canonical bytes), and no separate "system" key is introduced. -
Bulk runs never starve or clobber live interactive determinations (one-pending-slot deferral + bounded concurrency).
-
The doc flip surfaces the already-returned-but-undocumented 409 on
POST /v1/eligibility/determineand the async collision-deferral behavior indocs/modules/ROOT/pages/api/canopy-eligibility.adoc. -
Enrollment apply-semantics (#1133) and the driver implementation (#1213) ride separate MRs; this amendment is the contract keystone both build against. The eligibility one-pending-determination-slot (
idx_unique_pending_request, existing; interaction owned by #1213) and the enrollment one-live-enrollment-per-household #1130 fence (#1133) are distinct layers and MUST NOT be conflated.
Amendment 2 — The D4/D8 policy identity is the composite target (#1467, 2026-08-14)
Status unchanged (still Accepted). In-document amendment to Amendment 1’s D4 + D8 wording: both said "corpus" where
the policy identity is really the composite {corpus_hash, params_digest, effective_period}
(canopy_types::policy_target::PolicyTarget — ADR-028 Amendment 6). The corpus alone cannot witness an annual COLA:
the rules loader deliberately skips parameter JSONs, so a parameters-only change under an unchanged corpus would
neither perturb the D4 idempotency key nor be visible in the D8 pin.
-
D4: the deterministic key’s policy component is the composite target, not
as_of/corpus— a post-COLA determination differs from its pre-COLA twin byparams_digesteven when the corpus is unchanged. -
D8: what is resolved once per cohort-run and stamped on every dispatch is the composite target. The corpus half comes from canopy-rules
GET /v1/corpus(#1469); the parameters half from the program service’sGET /v1/params/provenance(#1467). Dispatches carry it asexpected_policy_target— the program service answers 409policy_target_mismatchBEFORE any evaluation or write, and (whenemit_policy_attestationis enabled) binds the same target into the signed envelope, which the #1213 core’s dispatcher MUST validate on return (its signed-provenance check — a later plan step; #1479 tracks persisting the returned target eligibility-side).
Related: #1467, ADR-028 Amendment 6, the #1213 COLA program plan.
Amendment 3 — The bulk core as built: epochs, the results ledger, and recorded refinements (#1213, 2026-08-16)
Status unchanged (still Accepted). Amendment 1’s D1–D10 shipped in the #1213 core MR with two structural refinements and eight recorded deviations, all reviewed in the core plan round (rev 4).
Erratum (2026-09-25, as-built): two statements below are superseded by Amendment 5. A
provenance-rejected envelope is no longer persisted quarantine-marked (signature_verified=false and a
labelled basis) in program_determinations; it lands in quarantined_determinations with reason
provenance_rejected. Refinement 5’s read-view matcher is gone: a successor is adopted only after its
signed bytes, read from canopy-snap, verify and bind.
Structural. (1) Delivery generations vs program epochs. dispatch_generation fences DELIVERY only
(event, x-canopy-bulk-generation self-call header, consumer CAS); the program_epoch is the logical
execution epoch — it alone enters the per-program idempotency key and the results ledger, and it bumps only
on a non-definitive completion or an operator re-arm (enact / retry-failures). A delivery re-arm therefore
replays the SAME key: crash recovery converges through the idempotency cache or the ledger instead of
re-executing into a consumed supersession slot. (2) cohort_case_results is the durable D4 layer,
inserted in the SAME transaction as the program-determination row on the bulk arm — recovery reads THIS
ledger at any generation, never eligibility-request status.
Recorded refinements (as built). 1. No idempotency-key header on the bulk self-call (H19: replays must
surface as guarded-state 409s). 2. The durable dedup layer is the deterministic per-program key + the
ledger, not HTTP middleware. 3. D7 is serialized admission (one per-household advisory lock on BOTH paths)
plus consumer yields — bulk try-locks and never blocks interactive. 4. The D1 payload is ids-only; the
durable case row is the source and the CAS validates run/case/generation/phase. 5. Superseded pre-flip
re-runs narrowed to adopt-or-skip: a successor matching baseline + trigger + the pinned parameter
set (digest + window) is adopted (adopted=true on the ledger; the read view exposes neither corpus nor
evaluated_as_of, so the matcher is deliberately narrower than the live H2 binding — re-baselining is
#1482). 6. Terminal request rows leave the partial indexes automatically and are retained as audit
anchors. 7. Resume matches definitive results by (case, program, epoch) via the ledger. 8.
BulkDispatchContext carries NO generation — the frozen body stays byte-stable across re-arms.
Sequencing. #1473 (snap stages its post-determination events in the determination-persist transaction) landed FIRST as its own MR — a bulk success whose NOA/enrollment/ELE events could silently vanish would have made every bulk enact unsafe.
Core-MR deviations from the frozen plan text (all reviewed in-MR): BulkRunAccepted names the field
run_id (the plan draft said request_id); cohort_cases gained successor_determination_id (B9
requires the foreign successor queryable on the failures surface); provenance-rejected envelopes persist
quarantine-marked (signature_verified=false + a labelled basis) so a signed-but-wrong-pins verdict can
never read as ordinary; enact and retry-failures each grant a FRESH deadline window from the configured
default (the create-time deadline bounds the preview phase); run creation refuses an empty cohort (422
cohort_empty — a zero-case run would wedge in previewing).
Related: #1213, #1473, #1480–#1483, the
#1213 COLA program plan, and the
bulk COLA scaling runbook.
Amendment 4 — The single-case Order arm (#1504/#575, epic &77, 2026-08-18)
Amendment 1’s D1 field list is now the literal wire shape: determination.requested
is an internally-tagged two-arm enum — Cohort (the #1213 cohort-case projection,
unchanged semantics) and Order, carrying the full D1 list verbatim: a
RequestOrigin {source, ref_id} requester identity, the subject
(application_id/household_id), programs, the pinned as_of (D8), the signed
D9 trigger, and requested_by captured at enqueue.
-
Producers extend beyond eligibility: a program service reporting a change (canopy-medicaid’s CMD subsystem first) publishes the Order; the broker topic-write ACL extends per producer. Eligibility remains the sole consumer.
-
The durable order substrate realizes D4/D5/D6 for one-case work:
determination_ordersmaterializes idempotently onUNIQUE (origin_source, origin_ref); settles fence on the claim’s own timestamp token; retry is backoff-scheduled (60s doubling, 1h cap, jitter) through an always-on 1-minute sweep — never hot MQ redelivery — with a deliberately-larger attempt cap (12) so slot-conflict chains cannot terminalize a legal re-determination quickly; the D4 deterministic dispatch key ishash("canopy-order-dispatch-v1\0" ‖ origin ‖ program ‖ epoch)(KAT-pinned) and crash recovery ADOPTS the latest DEFINITIVE completed run by origin instead of re-executing. -
The D10 push edge carries the correlation:
DeterminationCompletedV1additively gains anoriginecho, so the requester settles its own row — pure event choreography, no requester-side HTTP retry loop. -
Boot consequence: the
determination.requestedconsumers attach on every canopy-eligibility boot (no longer gated onbulk_runs_enabled);CANOPY_MQ_PREFETCH_COUNT=1is a fleet-wide boot requirement. -
The Decision text and Amendments 1–3 are left byte-immutable — this amendment extends, it does not supersede.
Amendment 5 — Determination quarantine, the resolution ledger and the typed status (#2061, #628, #1984, epic &86, 2026-09-25)
Status unchanged (still Accepted). The Decision says the orchestrator verifies a determination before it
accepts it. This amendment records what the orchestrator stores when it accepts one, what it stores when it
refuses one, and how an operator resolves a refused one. It supersedes Amendment 1 §D2’s
signature_quarantined status, and Amendment 3’s quarantine-marked row and its read-view adoption matcher
(refinement 5). The plan is
determination quarantine and status vocabulary.
Erratum (2026-10-21, as-built): the CHIP paragraph below, and the binding rule’s "its claimed program is the
signing program", are superseded by Amendment 6. canopy-medicaid signs program: chip for a
CHIP dispatch, the key program picks only the verifying key, and the binding compares the claimed program with
the dispatched one. A Medicaid or CHIP envelope also binds only the operation its dispatch claimed.
Erratum (2026-10-28): the resolution ledger’s "the program service’s own events are left as they were" is superseded by Amendment 7. A promotion records the determination, which releases the events the program service held for it; a dismissal of an envelope whose stored bytes verify drops them.
Two tables.
-
program_determinationsholds determinations of record only: envelopes that verified and bound to the dispatch that asked for them. -
Every other envelope lands in
quarantined_determinations, under an id canopy-eligibility mints (UUID v7). The envelope’s claimed id is kept in its own column,claimed_determination_id, which is deliberately not unique, so a tampered first landing can no longer take the genuine envelope’s primary key. For D-2c bytes that do not parse as an envelope, it holds the id the bytes were fetched under. -
Neither table’s status or basis is ever overwritten with an orchestrator verdict.
Exact signed bytes. Both dispatch paths (interactive/order and bulk) compute
SignableDetermination::canonical_signing_payload() once. That one buffer is the payload the signature is
verified over and the value stored as signed_payload BYTEA NOT NULL, in whichever table the envelope lands.
-
Projection pin. A determination of record is kept only if its typed columns, as the INSERT returns them inside the uncommitted transaction, re-canonicalize to
signed_payload. Otherwise the result isContractViolation(unrepresentable_envelope) and the transaction rolls back, so a database coercion (aNUMERIC(10,2)rounding, a microsecond truncation) can never leave a row that fails to re-verify. -
An envelope whose canonical bytes cannot be built, or whose signature holds a NUL, is
ContractViolationwith no row in either table.
Trusted routing, claimed values. On both tables program, eligibility_request_id, application_id and
household_id are canopy-eligibility’s own values: the request and program it dispatched, or the bulk case.
Apart from claimed_determination_id, the program service’s claimed values live only in the stored bytes. A
verified envelope binds when its
claimed program is the signing program, its claimed application and household equal the trusted ones, and a
SNAP or TANF envelope names no subject. The bulk arm also requires this case’s supersession link and the
run’s pins (trigger, policy target, evaluation date, and the claimed operation id and basis when present). A
verified envelope that does not bind is quarantined as provenance_rejected.
CHIP. canopy-medicaid serves a chip dispatch and signs as medicaid. The dispatch registry therefore
names each program’s signing program (ProgramServiceRegistry::signing_program: chip → medicaid, every
other program itself). A CHIP envelope is verified and bound as medicaid and recorded with the trusted
program chip (the served-program gap is #2319).
The verifier’s classes. VerifyingKeyRegistry::verify_with_history returns a SignatureCheck rather than
Result<bool>, so a key that could not be resolved is no longer confused with a signature that does not
verify. In-memory keys are keyed by (program, kid), the kid being derive_kid over the key’s LF SPKI PEM
(the kid the program’s boot signer stamps). Each outcome maps to one QuarantineReason:
SignatureCheck |
QuarantineReason |
When |
|---|---|---|
|
|
the JWS is empty or not a detached JWS, or its header carries no string |
|
|
the kid lacks the |
|
|
the history provider failed, or served an unparseable PEM |
|
|
the key for the exact kid was resolved and the signature does not verify |
|
|
the signature verified and the envelope does not bind (above) |
Erratum (2026-10-22, as-built): Malformed also covers a header whose alg is not ES256 or whose typ is not canopy-determination+jwt, absent included (#2953). The verifier refuses either before resolving a key, and canopy-eligibility quarantines it as signature_malformed.
A CHECK closes quarantine_reason to these five tokens. Each quarantine row written increments
canopy_eligibility_determinations_quarantined_total{program,reason}. On the interactive/order path a
signature failure pends the program with failure code signature_quarantined (the key may yet resolve), and
a binding failure pends it contract_violation. The bulk arm settles the case the same way:
SignatureQuarantined is retryable and ContractViolation is terminal.
The conflict rule. The insert is ON CONFLICT (id) DO NOTHING and reports whether it inserted. Success is
decided from the persisted row, never from the incoming envelope:
-
the id was recorded by an earlier request with the same
signed_payload,signature,program,application_id,household_idandperson_id→ success, answered from the persisted row (eligibility_request_idis not compared, because a legitimate re-land arrives on a new request); -
the id holds a different envelope → the new terminal failure
EnvelopeConflict(envelope_conflict); the persisted row stands; -
the same request already recorded the id (the program repeated the envelope in one response) →
EnvelopeConflict(duplicate_in_response); the first copy is recorded and counted once.
On the interactive path an EnvelopeConflict leaves the program pending, with no determination_id and
nothing added to the total. On the bulk arm it rolls back with no case result, and insert_case_result
returns the ledger row, whose determination_id must match (otherwise ledger_holds_another_determination).
Responses and cohort results are built from the persisted row.
Reads. Household reads, the newest-per-program read, case status, both alert feeds and the applicant
portal read program_determinations, so they see determinations of record by construction. The alert
partial indexes lose their signature_verified term and filter status IN ('denied', 'sanctioned').
The resolution ledger. Determination operators — DETERMINATION_OPERATOR_ROLES (eligibility_specialist,
supervisor, admin), user-only, so a service bearer is refused — list the open interactive quarantined
envelopes, read one with its newest 20 resolutions, and reverify or dismiss it.
-
A resolution is one transaction: a compare-and-set on the envelope’s
revision, an append-onlyquarantine_resolutionsrow (the verified actor, the role that admitted them, a note), and adetermination.quarantine_resolvedoutbox row. A lost race writes nothing. -
A reverify checks the stored bytes against the stored signature under the trusted program’s signing key and re-runs the binding. If both pass, it records the envelope’s own signed verdict through the same projection pin and conflict rule, and moves that program from pending in the request’s combined result. It re-evaluates no facts. The operation’s outcome, the request’s status and the program service’s own events are left as they were.
-
Order- and bulk-owned envelopes are not resolvable here: their own ledgers own them.
-
State is derived, never stored:
reverified,dismissed,superseded(a newer row for the same household, program and subject exists in either table), otherwiseopen.
Routes, gates and refusal codes: the canopy-eligibility API page; the worker surface is canopy-web’s quarantined-envelope worklist, which records a promotion back to the application only when its own request wrote it.
D-2c adoption against SNAP’s signed bytes (#1984). canopy-snap stores the exact bytes it signed
(snap_determinations.signed_payload) and serves them verbatim at GET /v1/determinations/{id}/envelope.
When a bulk dispatch meets supersession_conflict, or operation_already_determined for the case’s own
operation (whose determination supersedes the baseline, #2251), the arm follows the baseline’s superseded_by_id, reads
the successor’s envelope under its service identity, and runs it through the same intake. The fetched bytes
must be exactly the canonical bytes of the envelope they parse to.
-
Verified and bound → a determination of record, ledgered
adopted = true. -
Verified, on this case’s chain, carrying no claimed operation id or another one, and scored for another run → a foreign successor, skipped as
UpstreamSuperseded. -
Signature not verified → quarantined (owner
bulk); the case failsSignatureQuarantined(retryable). -
Bytes that are not a canonical envelope → quarantined as
signature_malformed; an envelope that is not the fetched successor or not this case’s determination, or one carrying this case’s own claimed operation id yet disagreeing with the run’s pins → quarantined asprovenance_rejected. Either way the case failsContractViolation(terminal). -
A 404 from the envelope read fails the case terminal (
successor_envelope_missing).
The typed status (#628). A determination’s status is the producing program’s signed verdict, and nothing
else: canopy_reference::DeterminationStatus is approved | denied | sanctioned. Every determination table
(eligibility, SNAP, TANF, Medicaid, CAPS, WIC) carries a CHECK over those three tokens. The orchestrator’s
ProgramResult.status is ProgramOutcome: the three verdicts plus pending_verification and
input_unsatisfiable, which have no determination behind them.
Consequences
-
A determination of record re-verifies from its own row, and every row the orchestrator wrote is one whose signature verified. The demo seed signs its rows with each program’s devstack key over the row’s own
signed_payload, so they verify too (#2320). -
A quarantined envelope never shares a table or key with a determination of record.
-
Refusals are typed at every layer: the verifier’s
SignatureCheck, the storedQuarantineReason, the program result’s failure code. -
Resolving a quarantine re-evaluates no facts. An operator either promotes the program’s own signed verdict or dismisses it, and every resolution is ledgered with a verified actor. The Medicaid-side requeue, which rewrote a signed status under a service token, is deleted.
-
This amendment extends the Decision, whose text is left byte-immutable. It supersedes only the Amendment 1 and Amendment 3 statements its dated errata name; Amendments 1–4 are otherwise unchanged.
Amendment 6 — CHIP is its own signed program; a Medicaid-served envelope binds its operation (#2319, epic &135, 2026-10-21)
Status unchanged (still Accepted). Amendment 5 had canopy-medicaid sign every CHIP determination as
medicaid, so a PeachCare approval could arrive on a Medicaid dispatch. It also bound no operation for either
program. This amendment records the maintainer’s rulings on #2319, as built. It supersedes Amendment 5’s CHIP
paragraph and the program clause of its binding rule (see the erratum there). The plan is
CHIP is its own signed program.
Erratum (2026-10-24, as-built): the last bullet of Operation binding below is superseded (#2947). canopy-snap signs back the claimed operation (#1648), and a SNAP envelope now binds as a Medicaid-served one does. On the interactive and order paths, a SNAP envelope naming another operation, or none, is quarantined provenance_rejected (operation_id) and the program pends contract_violation; the WARN-and-record branch is removed. An adopted envelope is still the operation’s own, and a reverify binds the row’s dispatched_operation_id. TANF, CAPS and WIC sign no operation and are not held to one.
Erratum (2026-10-30, as-built): canopy-tanf also signs back the claimed operation and keeps one determination per operation (#3116); the previous erratum’s last sentence is superseded for TANF. A replay of a determined operation answers the stored envelope and writes nothing, so a TANF envelope binds as a SNAP or Medicaid-served one does: one naming another operation, or none, is quarantined provenance_rejected (operation_id). canopy-tanf serves no operation read, so its 409 operation_already_determined, which only a concurrent execution of the operation gets, pends as upstream_conflict until a retry is answered the stored envelope. A TANF quarantine row written before #3116 holds an envelope that signs no operation, so its reverify fails provenance_rejected and an operator dismisses it. CAPS and WIC sign no operation and are not held to one. The maintainer ruled on 2026-10-29 that signing and deduping the operation is a precondition of dispatch. map_context therefore builds a body only for a program in signs_its_operation (services/canopy-eligibility/src/quarantine.rs), and a unit test over every Program fails otherwise, so CAPS or WIC cannot be wired into the orchestrator before their services sign and dedupe their operation.
Erratum (2026-10-31, as-built): canopy-wic also signs back the claimed operation and keeps one determination per operation and participant (#3158), and the orchestrator now dispatches WIC (#3153); the previous errata’s sentences on CAPS and WIC hold for CAPS alone. signs_its_operation includes WIC, so a WIC envelope naming another operation, or none, is quarantined provenance_rejected (operation_id). Like canopy-tanf, canopy-wic serves no operation read: its 409 operation_already_determined pends as upstream_conflict until a retry is answered the stored envelopes, and a WIC hold stays drop-only.
Erratum (2026-11-01, as-built): canopy-caps also signs back the claimed operation and keeps one determination per operation and child (#3185); the previous errata’s sentences on CAPS no longer hold, so every program’s service now signs its operation. signs_its_operation includes CAPS, so a CAPS envelope naming another operation, or none, is quarantined provenance_rejected (operation_id). Like canopy-wic, canopy-caps serves no operation read: its 409 operation_already_determined is answered only to a concurrent execution, a retry is answered the stored envelopes, and a CAPS hold stays drop-only. The orchestrator’s CAPS dispatch is #3186.
Erratum (2026-11-01, as-built): the orchestrator dispatches CAPS (#3186). With every program’s service signing its operation, the binding quarantines any envelope that does not sign the dispatch’s operation as provenance_rejected before recording reads its anchor, so recording’s former anchor_unavailable answer for an envelope naming no operation cannot occur. promotion::dispatch_anchor treats one as a broken invariant, a 500 (#3197). anchor_unavailable now means only that the operation claim the envelope names does not exist.
Key program, claimed program. ProgramServiceRegistry::key_program (chip → medicaid, every other program
itself) names the program whose key verifies a dispatch’s envelope, and it is used for nothing else. canopy-medicaid signs
the program it served: program: chip for a CHIP dispatch, under its medicaid kid. A verified envelope binds
when its claimed program is the dispatched program. A CHIP envelope that claims medicaid is quarantined
provenance_rejected (program). A determination of record rebuilds its envelope with the row’s trusted
program, so a CHIP row re-verifies from its own signed_payload under the medicaid key.
Operation binding. canopy-medicaid signs the operation canopy-eligibility claimed for the dispatch (#2673).
For a program canopy-medicaid serves (medicaid, chip), a verified envelope binds only when its signed
operation_id is the dispatch’s claimed operation. An envelope naming another operation, or none, is quarantined
provenance_rejected (operation_id), and a dispatch that claimed no operation binds no envelope.
-
quarantined_determinations.dispatched_operation_idrecords the claimed operation, so a reverify binds the same operation the intake did. -
A row written before this amendment has none. Its reverify fails
provenance_rejected, and an operator dismisses it. -
SNAP’s interactive path still records an envelope whose signed operation differs from the claim, with a WARN (#2947). The bulk arm pins it, as Amendment 5 says.
Each slot attests its own program (canopy-medicaid). The full cascade still evaluates every class of assistance for every subject (PAMMS 2052); the served program’s slot decides from it:
-
The Medicaid slot assigns only Medicaid-track groups: the EE15 hierarchy over the eligible groups whose track is not
chip. PeachCare is never a Medicaid approval. -
The CHIP slot is denied
medicaid_eligiblewhenever the Medicaid slot would assign any group. A child eligible for Medicaid is not a targeted low-income child (42 USC 1397jj(b)(1)©; 42 CFR 457.310(b)(2)). Otherwise the CHIP slot takes the hierarchy over the CHIP-track groups. -
A screened-out CHIP slot’s per-group evidence is a separate ruleset pass with
medicaid_eligible: true. No other group’s cascade reason changes.
Inputs and projections. SOLQ enrichment runs when any program canopy-medicaid serves is requested, so a
CHIP-only run screens on the same SSA facts. The combined result’s medicaid_assigned_group reads both
programs' determinations of record, at intake and at a quarantine promotion, so a PeachCare-only child keeps
a coverage group.
Consequences
-
A paired Medicaid/CHIP run yields two signed decisions per subject, at most one of them an approval, and a Notice of Action for each (ruling 6; canopy-notices routes on the served program, #2943).
-
A CHIP row written before this amendment keeps the bytes it signed as
medicaid. The rebuild uses the row’s trusted program, so a pre-amendment CHIP row no longer re-canonicalizes. Medicaid is not live and devstacks reseed (ruling 7), so no such row is carried forward. -
This amendment extends the Decision, whose text is left byte-immutable. It supersedes only the Amendment 5 statements its dated erratum names; Amendments 1–5 are otherwise unchanged.
Amendment 7 — Publication waits for verification (#2322, 2026-10-28)
Status unchanged (still Accepted). A program service staged its completion events (determination.completed.snap,
tanf.determined, medicaid.determined, caps.determined, wic.determination_completed) before it replied to
canopy-eligibility, so canopy-enrollment, canopy-notices, canopy-renewals and canopy-web could act on an envelope
that canopy-eligibility then quarantined. This amendment records the maintainer’s rulings on #2322. The plan is
downstream services act only on determinations of record.
Erratum (2026-10-30, as-built): two statements below are superseded by Amendment 8. DeterminationDisownedV1 no longer carries a quarantined_id and a DisownReason; it carries a DisownBasis tagged by reason, and an operator drop is a third reason, operator_dropped, naming its ledger row. The second D8 invariant, that only an envelope whose signature verified drops events, admits that operator drop too, which checks no signature.
The options (D1). Moving consumers to an eligibility-authored outcome (A) would make eligibility author program
semantics, which ADR-001 and ADR-035 forbid. Having each consumer verify (B) misses the binding, so a
provenance_rejected envelope would still be acted on. Acting provisionally and reversing © cannot recall a mailed
notice or an issuance. A per-request carrier on determination.completed (D′) would make one program wait on a
sibling’s pending member. The chosen option is D: the program holds, eligibility’s verdict releases or drops.
The verdict contract (D2). crates/canopy-contracts-eligibility/src/verdicts.rs defines
determination.recorded.<program> and determination.disowned.<program> for snap, tanf, medicaid, chip,
caps and wic (recorded_key, disowned_key). DeterminationRecordedV1 names the determination, the dispatched
program, the request, application, household and subject. DeterminationDisownedV1 names the determination, the
program, the quarantine row and a DisownReason (provenance_rejected or dismissed). The hold is
canopy_mq::hold_for: the determination id at generation 0, since a determination id is minted once per persist and
never re-attempted (D9).
Recording stages the verdict (D3). store::record_determination_on takes the caller’s transaction and, on
RecordOutcome::Recorded, stages determination.recorded.<program> from the persisted row. Every path that records a
determination therefore stages the verdict: interactive and order intake, the #2673 read-back adoption, the bulk arm
and a quarantine promotion. An identical re-land is recorded again and stages its verdict again.
Quarantine stages the disown (D4). quarantine::quarantine_bytes takes a transaction. For provenance_rejected,
whose signature verified (Amendment 5), it stages determination.disowned.<program> naming the claimed id and the new
row. An operator dismissal checks the stored bytes' signature in quarantine_ops::prepare, with no lock held, as a
reverify does. quarantine_ops::apply stages disowned{dismissed} only when that check passed. Bytes whose signature
never verified name nothing trustworthy, so no verdict is staged and their events stay held.
The consumer (D5). Each program service runs src/verdict_subscriber.rs on canopy-<service>.determination-verdicts,
bound to its programs' keys (canopy-medicaid serves medicaid and chip). In the inbox transaction it calls
canopy_mq::release_held on recorded and canopy_mq::drop_held on disowned, and records the verdict in its
determination_verdicts table, where recorded is final. A key that is no verdict parks; a malformed payload or a
program the service does not determine dead-letters. The broker ACL admits the twelve keys for canopy-eligibility’s
login alone.
Holding (D6). Every outbox row a determination stages, its completion event and the companions staged with it, is
held under hold_for(determination_id), through Publisher::publish_tx_held or canopy_mq::stage_outbox_tx_held.
The holding lands with #3064; until then a verdict matches no held row.
A later quarantine (D7). Amendment 5 never demotes a determination of record, so a released event never meets a
later quarantine. A promotion releases late; a dismissal of a verifying envelope drops; anything else stays held, and
ADR-039’s held-row gauge (canopy_mq_outbox_held_*) reports it. canopy-tanf and canopy-medicaid stage after their
persist commit, so their verdict can arrive first: the staging site reads determination_verdicts and releases its own
rows when a recorded verdict is already there.
Invariants (D8). A program completion event publishes only if canopy-eligibility recorded, or promoted, a verified, bound envelope with that determination id. Only an envelope whose signature verified ever drops events. Consumers, notice manifests and the envelope are unchanged.
Rulings (2026-10-28, on #2322).
-
Option D, the only one that gates on the binding and leaves consumers, manifests and the envelope untouched.
-
Events drop only when the signature verified:
provenance_rejectedat intake, or a dismissal whose stored bytes verify. -
All five programs hold the same way. A direct caller’s determination never publishes, because no determination of record exists (#3065 is the operator path).
-
The decision lives here, with an "Amended by" note on ADR-039 (a second hold owner); the envelope contract does not change.
Consequences
-
A determination that is never recorded publishes nothing: an orchestrator timeout, an exhausted order, an unresolved quarantine, a direct caller. It fails closed, and the held-row gauge signals it (#3065).
-
A staging failure after canopy-tanf’s or canopy-medicaid’s persist commit (#477) leaves nothing to release; the consumer logs a zero row count.
-
Program-local state written beside the determination (#3066) and reads of program rows that skip the events (#3067) are outside the hold.
-
This amendment extends the Decision, whose text is left byte-immutable. It supersedes only the Amendment 5 statement its dated erratum names; Amendments 1–6 are otherwise unchanged.
Amendment 8 — An operator adopts or drops held events (#3065, 2026-10-30)
Status unchanged (still Accepted). Amendment 7 holds a determination’s completion events until canopy-eligibility records it, so a determination that is never recorded holds them for good: an orchestrator timeout, an order out of retries, an unresolved quarantine, a direct caller. This amendment records the maintainer’s rulings on #3065. The plan is adopt or drop a determination’s held events.
Rulings (2026-10-29, on #3065).
-
Q1, release is adopt. canopy-eligibility fetches the program’s signed envelope, verifies the signature and its binding to the original order, and records it as the determination of record. The existing verdict consumer releases the events. Dropping and re-running was rejected: it makes a second determination whose date and inputs can differ.
-
Q2, no order means drop only. A direct caller’s determination has no order to bind to, and an envelope whose signature never verified binds nothing. Either is dropped, never adopted.
-
Q3, operation signing is a precondition of dispatch (#3116). Adopt covers every dispatched program whose envelope signs its operation: SNAP and Medicaid/CHIP now, TANF when #3116 lands. CAPS and WIC holds come only from direct callers.
-
Q4, ADR-007 parity. The operations ship on the API, the CLI and the canopy-web worklist.
-
Q5, a dropped determination is never recordable.
store::record_determination_ontakes the advisory lock(3065, hashtext(determination_id))and refuses an id the ledger dropped (RecordOutcome::Dropped, pendingenvelope_conflictwith detaildetermination_dropped). The drop takes the same lock first, so of a drop and a record of one id exactly one commits.
Discovery. Each program service lists its holds past its own warning age (GET /v1/held-determinations), admitting
only canopy-eligibility’s onward delegation of a determination operator. GET /v1/eligibility/held-determinations
reads one program’s page as the operator and gives each hold a HeldDisposition from eligibility’s tables:
recorded, resolved, quarantine_open, adoptable (the program signs and serves its operation, and eligibility
claimed the reported operation), else drop_only.
Drop. POST /v1/eligibility/held-determinations/{determination_id}/drops looks the hold up on the named program,
then, in one transaction under the Q5 lock, refuses recorded, quarantine_open, already_resolved and
determination_in_flight. It writes a held_determination_resolutions row, stages determination.disowned.<program>
with the operator basis, and stages determination.held_resolved. No signature is checked (Q2): a drop only
suppresses events, and a re-determination recovers the case.
The disown payload. DeterminationDisownedV1 { determination_id, program, basis } flattens a DisownBasis tagged
by reason: provenance_rejected { quarantined_id }, dismissed { quarantined_id } or
operator_dropped { resolution_id }. It replaces Amendment 7’s quarantined_id and DisownReason, so a basis
naming another reason’s record cannot be written. The routing keys and the broker ACL are unchanged, and the program
services' consumers read the determination id alone, so their code is unchanged.
Audit. determination.held_resolved (DeterminationHeldResolvedV1) names the ledger row, the action, the program,
the determination and, for an adopt, the operation and request. Its resolved_by is the operator’s Actor from the
bearer, which canopy-security’s # subscriber records as the audit row’s actor. The broker ACL admits the key for
canopy-eligibility’s login alone.
Invariants. Amendment 7’s first D8 invariant stands. Its second becomes: events drop only when a verified envelope
was quarantined provenance_rejected or dismissed, or when a determination operator dropped them after review.
ADR-039 is unchanged: canopy-eligibility owns no new hold.
Consequences
-
A determination never recorded can be settled: adopted when an order binds it (#3125), dropped otherwise. The ledger and canopy-security’s audit record who acted and why.
-
An operator who drops a genuine determination leaves the application pending; a re-determination recovers it.
-
An adopt, like a promotion, re-emits no
determination.completed(#3119). -
This amendment extends the Decision, whose text is left byte-immutable. It supersedes only the Amendment 7 statements its dated erratum names; Amendments 1–6 are otherwise unchanged.
Amendment 9 — A signed verdict can carry an operator advisory (#3324, 2026-11-09)
Status unchanged. Plan snap-standard-categorical-eligibility U3 needs to tell a worker that a SNAP verdict might have been different had a fact been known. The household is denied, and one or more members' TANF-cash or SSI facts are unknown, though the household would have been standard categorically eligible had those members been recipients. The program knows this; the orchestrator and the worker’s determination tab do not.
Decision
-
The envelope carries advisories.
SignableDeterminationgainsadvisories: Vec<DeterminationAdvisory>. Each entry is a typed, tagged variant ({ "kind": "ce_facts_unknown", "person_ids": […] }), andCeFactsUnknownis the only variant today. -
It is signed. The program service sets it before signing, so the signature covers it, like
triggerandpolicy_target. An advisory can be neither forged nor dropped between the program and the worker. -
Old signatures are untouched. The field is
skip_serializing_ifempty, andbuild()leaves it empty, so every envelope without an advisory keeps its RFC 8785 bytes and its signature. The pinned canonical payloads are unchanged. -
Verifier-tolerant first (the ADR-028 deploy-ordering doctrine). canopy-eligibility records the field before any program emits it:
program_determinations.advisories(JSONB, NULL = none). The row rebuild reads it, so a verdict carrying one is recorded, not refused as unrepresentable (Amendment 5). canopy-snap emits it in the plan’s U3b.
Consequences
-
An advisory is evidence, not a verdict: no outcome, order or event branches on it.
-
A program adding a variant adds it to
DeterminationAdvisory. The orchestrator stores the list as signed and never interprets it. -
This amendment extends the Decision, whose text is left byte-immutable; Amendments 1–8 are unchanged.
Amendment 10 — Every signed verdict names its configuration (#3261, 2026-11-10)
Status unchanged. ADR-051 moves a deployment's policy into signed git layers and rules that every determination is stamped with what the service loaded.
Decision
-
The envelope carries
config_stamp.SignableDeterminationgains a requiredconfig_stamp: a non-empty list of{ name, sha }, one per configuration layer, lowest precedence first. The program service sets it from the snapshot it loaded at boot, before signing, so the signature covers it, besidepolicy_target. -
It is required, with no default. An envelope without the field, or with an empty list, does not parse, so it is refused before its signature is checked. Every canonical payload gains the field; the pinned payloads and the pinned signature moved with it. No earlier signature survives, which before 1.0 costs a re-seed.
-
canopy-eligibility records it.
program_determinations.config_stamp(JSONB NOT NULL) holds the envelope's value. The row rebuild reads it, so a row is inserted only when it reproduces the signed bytes with the stamp in them (Amendment 5), and the determination list relays it. -
A cohort run pins it.
cohort_runs.expected_config_stampfreezes the stamp canopy-snap reports at creation (GET /v1/params/provenance). Enact refuses with 409config_stamp_driftwhen canopy-snap has since moved to another configuration, and a case's envelope signed under another stamp fails the run's provenance binding (provenance_rejected: config_stamp), as one scored under another policy target does.
Consequences
-
The stamp is provenance, not a verdict input: the orchestrator compares it for a cohort run and otherwise stores it as signed.
-
A replica that restarts onto a new configuration commit mid-run produces envelopes the run refuses. That is the intent: a run's preview and its enactment are scored under one configuration. The recovery is the run's existing one, a new run.
-
This amendment extends the Decision, whose text is left byte-immutable; Amendments 1–9 are unchanged.
Amendment 11 — A fourth verdict: withheld (#3437, 2026-11-18)
canopy_reference::DeterminationStatus gains withheld: the person meets the program's rules and a jurisdiction's extension module did not admit them (ADR-052). It is a verdict of record, signed like the others. It authorizes nothing: no enrollment, no benefit, no coverage dates. It is not a denial, so the worker screens draw and count it apart from the denied and never word it as ineligibility. One projection has no third state: an application's program row records it as denied with withheld first in its codes, as it does a sanction. And canopy-notices refuses a withheld determination the pack has no letter for instead of skipping it. The statement above that the vocabulary is approved | denied | sanctioned is superseded here. No program service writes withheld until an extension point exists.
Amendment 12 — A signed verdict names the extension module that took part (#3453, 2026-11-18)
SignableDetermination gains an optional signed member, extension (canopy_types::extension::ExtensionRecord): the module's name, version and code digest, the extension points that ran, the decisions it answered and its own label and reason for the outcome (ADR-052). It is omitted when no module took part, so every existing signature verifies unchanged. canopy-eligibility stores it in program_determinations.extension and rebuilds the envelope from the row with it. No program service sets it yet.