From c4ca0ae29fa01fa6fed7d09821895468744d7ecb Mon Sep 17 00:00:00 2001 From: Hermes cc-worker Date: Fri, 3 Jul 2026 02:12:44 +0000 Subject: [PATCH] exam-marker: exam_templates.extraction_meta jsonb (P3 audit gate + provenance) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Applied to dev .94 2026-07-03. {engine, slug, audit:{cover_total,detected_total,status,anomaly}, counts}. Pending prod (.156) — gated. Co-Authored-By: Claude Opus 4.8 --- volumes/db/cc/76-exam-marker-extraction-meta.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 volumes/db/cc/76-exam-marker-extraction-meta.sql diff --git a/volumes/db/cc/76-exam-marker-extraction-meta.sql b/volumes/db/cc/76-exam-marker-extraction-meta.sql new file mode 100644 index 0000000..500f5dc --- /dev/null +++ b/volumes/db/cc/76-exam-marker-extraction-meta.sql @@ -0,0 +1,11 @@ +--========================================================================================== +-- 76. exam_templates.extraction_meta — trust signal + provenance from the extraction service (P3) +--========================================================================================== +-- Records, per template, how the recognition was produced and whether it reconciled: the audit +-- cover-total gate (cover_total vs detected_total, status, anomaly), the engine + slug used, and +-- region counts. Lets the setup UI show "extraction: cover 100 = detected 100 ✓" (or flag an under-read), +-- and lets the digital-text view resolve the paper's replica by slug. Nullable, defaults to {}. +alter table public.exam_templates add column if not exists extraction_meta jsonb not null default '{}'::jsonb; + +comment on column public.exam_templates.extraction_meta is + 'Extraction-service provenance + trust gate: {engine, slug, audit:{cover_total,detected_total,status,anomaly}, counts}.';