Runner: flush du transcript ligne par ligne
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 changed file +1 −0
modified
runner/runner.py
+1 −0
@@ -237,6 +237,7 @@ def run_mission(m: MissionIn) -> None: | ||
| 237 | 237 | with transcript.open("w") as tf: |
| 238 | 238 | for line in proc.stdout: # type: ignore[union-attr] |
| 239 | 239 | tf.write(line) |
| 240 | + tf.flush() # le transcript doit survivre à une mort brutale du runner | |
| 240 | 241 | if time.time() > deadline: |
| 241 | 242 | proc.kill() |
| 242 | 243 | post_event(m.callback_url, {"type": "error", "data": {"error": f"durée max atteinte ({m.timeout_seconds // 60} min) — session interrompue"}}) |
| 243 | 244 | |