Held Determination Events: list, decide, adopt or drop

For a determination operator (eligibility_specialist, supervisor or admin) answering the held-row alert: find each determination a program service still holds events for, decide what to do with it, adopt it when an order binds it or drop it when it will never be recorded, and confirm the events are released or gone. The design is ADR-002 Amendment 8; the routes are on the canopy-eligibility API page.

Symptom

A program service logs the held-row watch’s warning, and its canopy_mq_outbox_held_oldest_age_seconds gauge sits above CANOPY_MQ_HELD_AGE_WARN_SECS (default 7200, Configuration Reference):

held outbox rows exceed the age threshold — likely abandoned holds; release/drop belongs to the hold's creator (ADR-039 amendment, #1061)

oldest_hold_operation_id on that line is the determination id. Its completion events (a notice, an issuance, a renewal) are not published until canopy-eligibility records it, and it was never recorded: an orchestrator timeout, an order out of retries, an unresolved quarantine, or a direct caller.

Preconditions

  • A bearer for canopy-eligibility whose user holds an operator role (DETERMINATION_OPERATOR_ROLES). A system token is refused 403 service_class_on_user_only.

  • The base URL of canopy-eligibility: the URL cargo xtask dev status prints on the devstack, or the deployment’s.

  • The program whose service warned: snap, tanf, medicaid, chip, caps or wic. canopy-medicaid lists Medicaid and CHIP holds together.

Steps

  1. List. Read one page of the program’s holds, oldest first; repeat with after=<next> until a page has no next:

    curl -sS -H "Authorization: Bearer $TOKEN" "$ELIGIBILITY_URL/v1/eligibility/held-determinations?program=snap&limit=200"

    Each item names determination_id, program, operation_id (SNAP, Medicaid and CHIP holds from a dispatch), held_since, held_rows and a disposition. A 502 program_unavailable means the program service did not answer: check it first.

  2. Decide by the disposition:

    Disposition Action

    recorded

    Do not drop. canopy-eligibility recorded it, so its determination.recorded.<program> verdict should have released the events: check the program service’s verdict consumer (canopy-<service>.determination-verdicts) and eligibility’s outbox drainer.

    resolved

    Nothing. An operator already resolved it; the verdict is in flight and the hold leaves the list once the program service applies it.

    quarantine_open

    Resolve the quarantined envelope that claims it on the quarantine worklist: a reverify that promotes releases the events, a dismiss whose bytes verify drops them.

    adoptable

    An order binds it: adopt it by its operation_id (step 3). Drop it instead only when the adoption is refused or the case will be re-determined.

    drop_only

    Nothing binds it to an order: a direct caller’s, a TANF, CAPS or WIC determination, or one whose operation canopy-eligibility never claimed. Drop it.

  3. Adopt an adoptable item by its operation_id, saying why in 1 to 500 characters:

    curl -sS -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"note":"dispatch timed out; the signed verdict stands"}' "$ELIGIBILITY_URL/v1/eligibility/determination-operations/$OPERATION_ID/adoptions"

    canopy-eligibility reads the operation’s signed envelopes from the program service, verifies and binds each to the operation’s order, records them, and moves the program out of pending on the operation’s request. A 201 HeldResolutions lists one ledger row per determination; a Medicaid operation can adopt several subjects at once. Each 409 wrote nothing:

    • order_retrying, determination_in_flight, operation_in_flight: the order or a dispatch may still record it. Wait, then list again.

    • already_resolved, already_recorded: another operator or the dispatch got there first. List again.

    • operation_unsigned, request_unknown, operation_not_determined, envelope_malformed, signature_unverified, provenance_rejected, superseded, not_pending, envelope_conflict, duplicate_in_response, unrepresentable_envelope, anchor_unavailable: the envelope cannot become the determination of record. Drop it (step 4).

    • quarantined: a quarantined envelope claims it; resolve it on the quarantine worklist.

      A 404 means canopy-eligibility never claimed the operation (a direct caller’s determination): drop it. A 502 program_unavailable means the program service did not answer.

      An adoption, like a quarantine promotion, leaves the request’s status alone and stages no determination.completed (#3119). A consumer that settles on that event, such as canopy-medicaid's CMD settle, does not see the adopted outcome; that gap is #3119.

  4. Drop. Name the item’s own program and say why, in 1 to 500 characters:

    curl -sS -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"program":"snap","note":"direct caller, never recorded; case re-determined"}' "$ELIGIBILITY_URL/v1/eligibility/held-determinations/$DETERMINATION_ID/drops"

    A 201 HeldResolution is the ledger row. Each 409 wrote nothing:

    • not_held: the program does not report the id past its warning age, or reports it under another program (a CHIP hold named as medicaid). List again.

    • recorded, quarantine_open: decide by that disposition instead.

    • already_resolved: another operator resolved it.

    • determination_in_flight: its operation’s claim is live, or its order or cohort case may still record it. Wait for the order or run to finish, then list again.

Verify

  1. List the program again: an adopted or dropped determination shows resolved until the program service applies the verdict (it publishes the held events on an adoption’s recorded verdict and deletes them on a drop’s disowned verdict), then leaves the list.

  2. The resolution is in canopy-eligibility’s held_determination_resolutions ledger (action adopt with the operation and request, or drop; the operator’s subject as actor; the note) and in canopy-security’s audit as determination.held_resolved, with the operator as the actor. An adopted determination is also a determination of record, and its program has left programs_pending on the request’s combined result.

  3. The held-row gauge falls once no hold past the warning age remains.

Rollback

A drop cannot be undone: the program service deleted the events, and canopy-eligibility refuses to record the id again (pending envelope_conflict, detail determination_dropped). The application stays pending; re-determine it, which signs a new determination with its own events.

An adoption cannot be undone either: determinations of record are append-only and the released events are published. A later determination supersedes it; re-determine the case when the adopted verdict should not stand.

NOTE

History: #3065 added the list and the drop (ADR-002 Amendment 8), #3125 the adoption. The CLI commands are #3126, the canopy-web worklist #3127.

Edit this page · default