Overlap limit for whole spec 0.75, slot logs; STATE and roadmap: stage 2 data progress

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Kral
2026-10-05 12:04:11 +02:00
parent 61b903f7b3
commit 35f0eb0e0c
4 changed files with 31 additions and 4 deletions

View File

@@ -104,8 +104,8 @@ def run(part, parts, target, stop_ledger):
for idx, s in enumerate(plan["slots"]):
if idx % parts != part:
continue
if os.path.exists(os.path.join(POOL, s["id"], "generation.json")):
continue
if os.path.exists(os.path.join(POOL, "_logs", s["id"] + ".json")):
continue # done or failed: not tried again (delete the log to retry)
if accepted_count() >= plan["target"]:
print("TARGET reached", flush=True)
break
@@ -132,6 +132,11 @@ def run(part, parts, target, stop_ledger):
except Exception as e: # noqa: BLE001
log = {"id": s["id"], "error": str(e)[:500]}
log.update(error_kind=s.get("error_kind"), spent_total=spent())
os.makedirs(os.path.join(POOL, "_logs"), exist_ok=True)
json.dump(log, open(os.path.join(POOL, "_logs", s["id"] + ".json"), "w"), indent=1)
stray = os.path.join(POOL, "generation.json") # generate() writes here when no task dir exists
if os.path.exists(stray):
os.remove(stray)
print(json.dumps(log), flush=True)