evaluator_retired without judging the documents. Use it only when you cannot restore their pinned rule and accept losing potential Matches.
A Match records a document meeting an alert; a Delivery sends that Match to the alert’s destination.
Prerequisites
- An operator key with
plugins:adminand grants for the Organization and Corpora you inspect or retire. A Corpus is a collection of documents; those grants bound the work and receipts you can see. - The exact plugin id and version from the plugin registry, and a reason for abandoning its evaluations.
curlandjqinstalled (curl --version,jq --version), your API address inQUIVR_API_URL, and that key inQUIVR_OPERATOR_KEY.
Steps
-
Inspect the backlog:
Each item names
plugin_id,version,pending,erroring,unavailableandretired. Requestlimitup to 500; passnext_afterasafterfor the next page. This cursor is the lastplugin_id@versionreturned. Counts describe recorded work, not current endpoint health: a restored endpoint can have recorded errors until evaluation runs again. -
Dry-run a bounded retirement:
-
Inspect the selected
itemsandleasedcount. Only pending evaluations whose latest error isevaluator_unavailableand whose leases have expired can close. A lease is Quivr’s temporary reservation for a worker: live leases, other errors and work not yet dispatched are excluded. -
Send the same request with
dry_run: falsewhen you accept the loss. A dry run changes nothing, stores no receipt and reserves no key, so its key may be reused. The batch limit defaults to 100 and cannot exceed 500. -
Read
GET /v0/admin/subscriptions/evaluation-retirements/{retirement_id}and preserve the receipt. It requires grants covering the original request’s Corpus scope, even for an empty batch; a missing or hidden receipt returns404. -
Let Quivr turn older document changes into evaluations for the Subscriptions they affect, and let live leases expire. Repeat preview/real batches with new keys until
pendingandunavailableare zero. Resolve other errors separately, and check the registry’ssubscriptionsandpinned_workbefore removing the old build. Retirement is a batch, not a permanent policy against that version.
Check it worked
Read the receipt and inspect the backlog again. Selected items haveevaluator_retired; unrelated work retains its history. A new arrival needs a new batch and key.
Each item retains
subscription_id, subscription_version_id, sequence, corpus_id, record_id and record_version_id. A real item’s event is evaluation.retired, with resource.kind=evaluation_retirement and resource.id=retirement_id.
Within an Organization, replaying a real key with the same normalized request and Corpus scope returns the original receipt and counts. Changing the request or scope returns 409 idempotency_conflict. Even an empty real batch reserves its key; later arrivals need a new key.
Next
- Upgrade an alert rule to move Subscriptions still pinning the old version.
- Check the drain before stopping the old process.