feat(eo): align correction EO on 3.6a format + Deepgram token + T1 presentation generation
Sprint 4a:
- correctEO aligned on CorrectionRapport format (revelation, diagnostic, criteres, conseil_nclc, erreurs_codes)
- nclc_cible parameter (default 9, accepts 9|10)
- Fire-and-forget modele + exercices jobs (same pattern as EE)
- EO-specific DeepSeek prompt (oral transcript tolerance, 4 TCF criteria)
- Gemini transcribeAudio: 30s timeout + 1 retry
- POST /presentations/generate: 5-field questionnaire → DeepSeek generates oral presentation (~220-260 words, NCLC 7-8)
- Migration 006_sprint_4a_eo.sql (documentation only — no audio storage)
Sprint 4b:
- POST /transcriptions/token: Deepgram temporary API key (600s TTL)
- Removed audio storage pipeline (audioStorage.ts, XOR validation, 14MB limit)
- Backend receives transcript text only, no audio files
- TD-10/TD-11 resolved (Sprint 3.6c), TD-16/17/18 resolved (4b cleanup)
Typecheck: OK · Tests: 241/241 ✅
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f5954e6d72
commit
7cac057062
18 changed files with 2907 additions and 911 deletions
38
supabase/migrations/006_sprint_4a_eo.sql
Normal file
38
supabase/migrations/006_sprint_4a_eo.sql
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
-- Sprint 4a → réorienté Sprint 4b — Audio backend abandonné.
|
||||
--
|
||||
-- HISTORIQUE :
|
||||
-- - Sprint 4a (état initial de cette migration) : créait des policies RLS sur
|
||||
-- `storage.objects` pour un bucket `audio-productions` destiné à stocker les
|
||||
-- enregistrements EO côté serveur, après transcription Gemini batch.
|
||||
-- - Sprint 4b (décision Hermann, 2026-04-25) : changement d'architecture.
|
||||
-- La transcription live est gérée par Deepgram en connexion DIRECTE depuis le
|
||||
-- navigateur via un token éphémère (cf. POST /transcriptions/token, route
|
||||
-- ajoutée Sprint 4b). L'audio brut est téléchargé en local par l'utilisateur
|
||||
-- et n'est PAS stocké côté serveur. Le backend reçoit uniquement le transcript
|
||||
-- texte final.
|
||||
--
|
||||
-- Cette migration nettoie les policies RLS Storage qui ont pu être créées en
|
||||
-- environnement de dev pendant le développement Sprint 4a. Elle est idempotente
|
||||
-- (DROP IF EXISTS) — sûre à rejouer en dev comme en prod.
|
||||
--
|
||||
-- Aucun bucket Supabase Storage n'est nécessaire pour le pipeline EO. Le champ
|
||||
-- `productions.audio_url` reste dans le schéma (héritage du projet initial)
|
||||
-- mais n'est plus alimenté.
|
||||
|
||||
DROP POLICY IF EXISTS "audio_productions_select_owner"
|
||||
ON storage.objects;
|
||||
|
||||
DROP POLICY IF EXISTS "audio_productions_insert_owner"
|
||||
ON storage.objects;
|
||||
|
||||
DROP POLICY IF EXISTS "audio_productions_update_owner"
|
||||
ON storage.objects;
|
||||
|
||||
DROP POLICY IF EXISTS "audio_productions_delete_owner"
|
||||
ON storage.objects;
|
||||
|
||||
-- Vérification post-migration (purement informative) :
|
||||
-- SELECT policyname FROM pg_policies
|
||||
-- WHERE schemaname = 'storage' AND tablename = 'objects'
|
||||
-- AND policyname LIKE 'audio_productions_%';
|
||||
-- → 0 ligne attendue.
|
||||
Loading…
Add table
Add a link
Reference in a new issue