From 81d2d016ffdd02f2e87e47fe1ee77e571d7b3279 Mon Sep 17 00:00:00 2001 From: Dom Date: Wed, 18 Mar 2026 11:30:04 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20replay=20Windows=20r=C3=A9par=C3=A9=20?= =?UTF-8?q?=E2=80=94=20machine=5Freplay=5Ftarget=20restaur=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Le fix sécurité avait supprimé _machine_replay_target qui est nécessaire pour router les actions vers la bonne session agent. Session_id vide dans le frontend = auto-détection serveur. Co-Authored-By: Claude Opus 4.6 (1M context) --- agent_v0/server_v1/api_stream.py | 4 ++-- .../frontend_v4/src/components/ExecutionControls.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/agent_v0/server_v1/api_stream.py b/agent_v0/server_v1/api_stream.py index a61d1cbf5..e3be254e3 100644 --- a/agent_v0/server_v1/api_stream.py +++ b/agent_v0/server_v1/api_stream.py @@ -101,10 +101,10 @@ _pending_lock = threading.Lock() _replay_lock = threading.Lock() # session_id -> liste d'actions en attente (FIFO) _replay_queues: Dict[str, List[Dict[str, Any]]] = defaultdict(list) -# replay_id -> état du replay (workflow_id, session_id, status, progress) -_replay_states: Dict[str, Dict[str, Any]] = {} # machine_id -> session_id (mapping pour le replay ciblé par machine) _machine_replay_target: Dict[str, str] = {} +# replay_id -> état du replay (workflow_id, session_id, status, progress) +_replay_states: Dict[str, Dict[str, Any]] = {} class StreamEvent(BaseModel): diff --git a/visual_workflow_builder/frontend_v4/src/components/ExecutionControls.tsx b/visual_workflow_builder/frontend_v4/src/components/ExecutionControls.tsx index 383dcee4a..fa4c51b50 100644 --- a/visual_workflow_builder/frontend_v4/src/components/ExecutionControls.tsx +++ b/visual_workflow_builder/frontend_v4/src/components/ExecutionControls.tsx @@ -39,7 +39,7 @@ export default function ExecutionControls({ execution, onStart, onStop }: Props) headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ workflow_id: workflowId, - session_id: `replay_${Date.now()}`, + session_id: '', // vide = auto-détection de la session agent active actions: steps.map((step: any, i: number) => ({ action_id: step.id || `action_${i}`, type: step.action_type,