baseline: setup failure is not recorded as a result; repair_stats tolerates a missing trajectory

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
This commit is contained in:
Kral
2026-10-04 12:07:33 +02:00
parent d15e190f72
commit 5532a5b226
2 changed files with 6 additions and 0 deletions

View File

@@ -96,6 +96,8 @@ def repair_stats(path):
import hashlib
last = None # (object, md5, failed)
after = changed = 0
if not os.path.exists(path): # setup failed: no agent run, no trajectory
return {"pushes_after_error": None, "pushes_changed_after_error": None, "repair_rate": None}
for line in open(path):
e = json.loads(line)
if e.get("tool") != "sap_push_source" or (e["result"].startswith("Tool ") and e["is_error"]):