feat(stream): dispatch extract_dossier -> handler serveur
Some checks failed
tests / Lint (ruff + black) (push) Failing after 2m3s
tests / Tests unitaires (sans GPU) (push) Failing after 1m51s
tests / Tests sécurité (critique) (push) Has been skipped

Câble le type d'action 'extract_dossier' dans get_next_action (api_stream)
vers _handle_extract_dossier_action (replay_engine). La brique 3 (OCR ->
gate -> persist dossier VWB) était committée mais non atteignable au runtime
faute de dispatch. Import + elif dédié, timeout 180s, exécuteur non bloquant.

Note: le handler utilise encore l'ancienne chaîne (extract_grid + gate maison).
Le remplacement par l'extraction ancrée (map_roles/vlm_client) est une modif
séparée côté replay_engine (ma zone).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dom
2026-07-01 11:05:22 +02:00
parent f09b8b8cfd
commit 2a1b1ed80e

View File

@@ -423,6 +423,7 @@ from .replay_engine import (
_SERVER_SIDE_ACTION_TYPES,
_handle_extract_text_action,
_handle_extract_table_action,
_handle_extract_dossier_action,
_handle_t2a_decision_action,
_handle_llm_generate_action,
_handle_concat_text_vars_action,
@@ -4443,6 +4444,15 @@ async def get_next_action(session_id: str, machine_id: str = "default"):
),
timeout=180,
)
elif type_ == "extract_dossier":
await asyncio.wait_for(
loop.run_in_executor(
None,
_handle_extract_dossier_action,
action, owning_replay, session_id,
),
timeout=180,
)
elif type_ == "t2a_decision":
await asyncio.wait_for(
loop.run_in_executor(