feat(navigation): brique login visuel OCR-ancre + action navigate au replay
Some checks failed
tests / Lint (ruff + black) (push) Failing after 1m52s
tests / Tests unitaires (sans GPU) (push) Failing after 1m58s
tests / Tests sécurité (critique) (push) Has been skipped

- core/navigation/ : visual_verifier (presence=OCR, role=VLM ancre sur tokens),
  grounding (OCR-anchor first, VLM fallback, cache coords valide par la vue),
  visual_login (verify_before/after, DETTE-023), action_resolver (pont runtime)
- api_stream/replay_engine : dispatch action navigate server-side,
  never-fail -> needs_review, import depuis core.navigation (boot 5005 garanti)
- 131 tests verts (wiring boot, e2e handler, unit modules)

Chantier Qwen 01-02/07/2026, revue croisee Claude (plan deploy v2).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Dom
2026-07-02 10:31:44 +02:00
parent ab78ae390a
commit f9a0531325
13 changed files with 2998 additions and 0 deletions

View File

@@ -436,6 +436,9 @@ from .replay_engine import (
_notify_error_callback as _notify_error_callback_impl,
)
# Navigate handler — import direct depuis core/navigation (pas via replay_engine)
from core.navigation import _handle_navigate_action
# Wrappers pour les fonctions replay_engine qui accèdent aux variables globales du module.
@@ -4453,6 +4456,15 @@ async def get_next_action(session_id: str, machine_id: str = "default"):
),
timeout=180,
)
elif type_ == "navigate":
await asyncio.wait_for(
loop.run_in_executor(
None,
_handle_navigate_action,
action, owning_replay, session_id,
),
timeout=180,
)
elif type_ == "t2a_decision":
await asyncio.wait_for(
loop.run_in_executor(

View File

@@ -41,6 +41,7 @@ _ALLOWED_ACTION_TYPES = {
"extract_text", # OCR serveur sur dernier heartbeat → variable workflow
"extract_table", # OCR serveur + filtre regex → liste structurée (boucle)
"extract_dossier", # OCR grille structurée → dossier patient persisté (brique 3)
"navigate", # Navigation visuelle → coords login/recherche (brique navigation)
"extract_text_scroll", # Marker côté graphe — expansé en sous-actions par _edge_to_normalized_actions
"_concat_text_vars", # Action serveur interne (générée par expansion extract_text_scroll)
"t2a_decision", # Analyse LLM facturation T2A → variable workflow
@@ -55,6 +56,7 @@ _SERVER_SIDE_ACTION_TYPES = {
"extract_text",
"extract_table",
"extract_dossier",
"navigate",
"t2a_decision",
"llm_generate",
"_concat_text_vars",