feat(uploads): choose the language of a recording; record it, show it, carry it to the engines (#61)
Form field (Swedish preselected, Other = auto) read before the file part and refused before anything is spooled if outside the closed set; stored on the row (migration 021, CHECK constraint, default sv for history); carried on the Job and the worker's context; shown on the status page. Feature scenarios and the coverage map are updated, and ADR-033/034 amended. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
-- Migration 021: the language an upload is transcribed as (tapir#61).
|
||||
--
|
||||
-- 'sv' Swedish: the engines are sent language=sv. Every row before this migration was
|
||||
-- transcribed that way (the request hard-coded it), so the default is true history.
|
||||
-- 'auto' Other: the engine detects the language and the Swedish-only engine is not used.
|
||||
--
|
||||
-- A closed set held by the table as well as by the form and the request code, so a second
|
||||
-- writer or a bug cannot store a value the engines are never meant to receive. The column
|
||||
-- sits on the already-FORCE'd, RLS-scoped uploaded_transcripts, so the exact-set isolation
|
||||
-- test is unaffected.
|
||||
ALTER TABLE uploaded_transcripts
|
||||
ADD COLUMN language TEXT NOT NULL DEFAULT 'sv'
|
||||
CONSTRAINT uploaded_transcripts_language_check CHECK (language IN ('sv', 'auto'));
|
||||
Reference in New Issue
Block a user