From e838f6bb6ddca706f9569770e993f61330633b26 Mon Sep 17 00:00:00 2001 From: Mathias Date: Thu, 1 Oct 2026 23:21:52 +0200 Subject: [PATCH] feat(store): migration 019 -- uploaded_transcripts.reconciliation JSONB, NULL for a single engine so the page cannot claim a second opinion. On the already FORCE'd, RLS-scoped table, so the exact-set isolation test is unaffected. Up and down are one commit: golang-migrate pairs them. Co-Authored-By: Claude Sonnet 5.5 --- .../019_uploaded_transcripts_reconciliation.down.sql | 1 + .../019_uploaded_transcripts_reconciliation.up.sql | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 internal/adapters/store/migrations/019_uploaded_transcripts_reconciliation.down.sql create mode 100644 internal/adapters/store/migrations/019_uploaded_transcripts_reconciliation.up.sql diff --git a/internal/adapters/store/migrations/019_uploaded_transcripts_reconciliation.down.sql b/internal/adapters/store/migrations/019_uploaded_transcripts_reconciliation.down.sql new file mode 100644 index 0000000..46eba75 --- /dev/null +++ b/internal/adapters/store/migrations/019_uploaded_transcripts_reconciliation.down.sql @@ -0,0 +1 @@ +ALTER TABLE uploaded_transcripts DROP COLUMN reconciliation; diff --git a/internal/adapters/store/migrations/019_uploaded_transcripts_reconciliation.up.sql b/internal/adapters/store/migrations/019_uploaded_transcripts_reconciliation.up.sql new file mode 100644 index 0000000..433870a --- /dev/null +++ b/internal/adapters/store/migrations/019_uploaded_transcripts_reconciliation.up.sql @@ -0,0 +1,12 @@ +-- Migration 019: how a merged transcript came about (ADR-034). +-- +-- When two engines transcribed the same audio and a local model chose between their +-- disagreements, this records the status, the exact counts, and a bounded list of the +-- contested spots (changed or unsure, each with a position and both readings) so the +-- page can say what was done and the user can check the uncertain spots against the +-- audio. NULL means a single engine: no second opinion, and the page must not claim one. +-- +-- It lives on the already-FORCE'd, RLS-scoped uploaded_transcripts, so the exact-set +-- isolation test is unaffected. The contested spots hold fragments of the private +-- transcript, which is why they are here and nowhere else. +ALTER TABLE uploaded_transcripts ADD COLUMN reconciliation JSONB;