Unknown vocabulary administration

Meat Ontology aggregates only fragments classified as unsupported_vocabulary by successful Resolve and Explore calls. Known vocabulary that was not selected, syntactic residue, and structured values such as numbers or units remain visible in resolver diagnostics but do not enter this queue. These are operational curation records, not published ontology knowledge. All admin endpoints require a service credential with taxonomy:admin.

Clients are responsible for extracting and sanitizing the product phrase before calling Resolve or Explore. Meat Ontology stores unsupported fragments and the latest sanitized sample phrase needed to recheck context-dependent vocabulary, including the latest supplied locale, market, scheme, species, or commodity resolution context. It does not receive unrelated source-record context.

Counting semantics

The aggregate key is normalized fragment plus locale. requestCount increases once per successful request containing that key; occurrenceCount increases for every emitted occurrence. Production and evaluation traffic are counted separately, while the total fields preserve both. The write and per-client attribution are transactional and complete before the corresponding Resolve or Explore response succeeds.

A new item begins as open. Curators may move it to in_review or ignored. A recheck moves an active item to known when the current resolver no longer emits unsupported text for it. Known items are absent from the default active queue. If a later request emits the item again, it reopens; ignored items remain ignored while their counts continue to increase.

Interpreting product-scoped attribute residue

Some controlled attributes are valid only after a compatible product core resolves. For example, oystercut can become oyster: retained on a poultry thigh or whole leg, but must not be asserted on pork, breast, wing, or an unresolved product. An open queue item for a delivered scoped attribute therefore does not, by itself, mean its alias or release failed.

Use the latest sample phrase to separate three cases:

  1. The product core did not resolve. Fix or supply the missing product vocabulary or context; do not make the attribute global just to drain the queue.
  2. The product resolved outside the attribute's scope. Treat the row as a wrong-resolution suspect. For example, Pork Legs oystercut must not be automatically tagged as Pork Leg while leaving poultry-only vocabulary behind.
  3. The product resolved inside the scope but a spelling or inflection remains. Add the reviewed surface form, such as plural oystercuts, and recheck the item after deployment.

Preserve these residuals until their product-level cause is addressed; globally ignoring or relabeling them as known removes a useful safety signal. Historical request and occurrence counts also remain after a successful recheck, so use status plus the last-checked resolver watermark—not a zero lifetime count—to confirm remediation.

List the queue

GET /v1/admin/unknown-vocabulary?status=active&limit=100
Authorization: Bearer mtk_<prefix>.<secret>

Supported filters are status (active, open, in_review, known, ignored, or all), trafficClass (production, evaluation, or all), locale, and query. Production is the default so evaluation sweeps do not drive curation priority. Use the opaque nextCursor for the next page. Results are ordered by the selected traffic class's request count and then most recent observation.

{
  "taxonomyRelease": {
    "id": "0198a000-0000-7000-8000-000000000301",
    "version": "0.4.27",
    "publishedAt": "2026-08-19T10:00:00.000Z",
    "publishedBy": "taxonomy-publisher",
    "contentChecksum": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
  },
  "unknownVocabulary": [
    {
      "id": "0198a000-0000-7000-8000-000000004202",
      "displayText": "4D regional trim",
      "normalizedText": "4 d regional trim",
      "lastSampleText": "Pork shoulder 4D regional trim",
      "locale": "en",
      "status": "open",
      "requestCount": 17,
      "occurrenceCount": 17,
      "productionRequestCount": 15,
      "productionOccurrenceCount": 15,
      "evaluationRequestCount": 2,
      "evaluationOccurrenceCount": 2,
      "firstSeenAt": "2026-08-18T08:00:00.000Z",
      "lastSeenAt": "2026-08-19T12:00:00.000Z",
      "firstSeenRelease": { "id": "0198a000-0000-7000-8000-000000000301", "version": "0.4.27" },
      "lastSeenRelease": { "id": "0198a000-0000-7000-8000-000000000301", "version": "0.4.27" },
      "lastOperation": "resolve",
      "lastContext": { "locale": "en", "species": "Domestic pig" }
    }
  ],
  "summary": { "active": 1, "ignored": 0, "known": 0, "total": 1 }
}

Let a client inspect its own observations

Give a consumer the taxonomy:vocabulary:read scope and call:

GET /v1/unknown-vocabulary?status=active&limit=100
Authorization: Bearer mtk_<prefix>.<secret>

The response has the same shape as the admin list, but counts, sample text, context, and timestamps come only from the authenticated API client's source rows. It cannot inspect another client's observations or perform curation actions. A client normally combines this scope with taxonomy:resolve; traffic produced before per-client attribution was introduced is visible only in the admin aggregate.

Recheck every active item

POST /v1/admin/unknown-vocabulary/recheck
Authorization: Bearer mtk_<prefix>.<secret>
Content-Type: application/json

{ "actorId": "curator@example.com" }

The response reports checked, recognized, and remainingActive. Rechecks are explicit admin operations; resolver requests, queue reads, deployments, and release publication do not trigger a full-queue recheck.

Change or delete one item

POST /v1/admin/unknown-vocabulary/0198a000-0000-7000-8000-000000004202
Authorization: Bearer mtk_<prefix>.<secret>
Content-Type: application/json

{
  "actorId": "curator@example.com",
  "action": "ignore",
  "reason": "Supplier shorthand outside taxonomy scope"
}

action is ignore, mark_in_review, reopen, recognize_non_product, or delete:

A successful delete returns the deleted item ID and "status": "deleted". Deletion cannot be undone. Adding reviewed ontology knowledge still uses the normal append-only draft, independent review, and release-publication workflow.