From 0b6874a3dd7c1bc3e76eea004c838774b2d217d6 Mon Sep 17 00:00:00 2001 From: Hermes cc-worker Date: Thu, 2 Jul 2026 23:47:34 +0000 Subject: [PATCH] exam-marker: exam_response_areas.meta jsonb for extraction-service recognition detail (P2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Applied to dev Supabase .94 2026-07-02. Holds OMR box geometry, select_n, unit/quantity, n_options from the extraction service. Additive + nullable. Pending prod (.156) apply — gated. Co-Authored-By: Claude Opus 4.8 --- volumes/db/cc/75-exam-marker-region-meta.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 volumes/db/cc/75-exam-marker-region-meta.sql diff --git a/volumes/db/cc/75-exam-marker-region-meta.sql b/volumes/db/cc/75-exam-marker-region-meta.sql new file mode 100644 index 0000000..defc993 --- /dev/null +++ b/volumes/db/cc/75-exam-marker-region-meta.sql @@ -0,0 +1,12 @@ +--========================================================================================== +-- 75. exam_response_areas.meta — rich recognition payload from the extraction service (P2) +--========================================================================================== +-- The extraction service (docling-exam-spike analyse contract) returns richer per-region detail than +-- the thin first-pass could: per-option OMR box geometry + fill (boxes[]), select_n ("tick 2 of 5"), +-- n_options, the expected unit/quantity for single-line answers, and the data_table an MC question reads. +-- These have no dedicated columns; keep them in a jsonb sidecar so the canvas can render tick boxes / +-- units / MC option counts without a column per attribute. Nullable, defaults to {}. +alter table public.exam_response_areas add column if not exists meta jsonb not null default '{}'::jsonb; + +comment on column public.exam_response_areas.meta is + 'Extraction-service recognition detail: {n_lines, unit, quantity, n_boxes, n_options, select_n, box_form, boxes:[{x0,y0,x1,y1,fill}], table:{grid,n_cells}}. Rendered by the canvas; not authoritative for marking.';