From 774b0ae25a2dd70fe71862efa9aad7b74dfed7d4 Mon Sep 17 00:00:00 2001 From: KeelrLeek <156356974+KeelrLeek@users.noreply.github.com> Date: Mon, 5 Oct 2026 18:37:26 -0500 Subject: [PATCH] Logbook auto: run the stats rebuild in its own data dir so agents' compiles can't lock it --- harbor/logbook_auto.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/harbor/logbook_auto.py b/harbor/logbook_auto.py index 7fefb45..00d1c33 100644 --- a/harbor/logbook_auto.py +++ b/harbor/logbook_auto.py @@ -13,6 +13,7 @@ Milestones and narrative entries stay with people: they need judgement. State (the last commit seen) is kept in the logbook folder as auto.json.""" import json +import os import re import subprocess import sys @@ -81,7 +82,9 @@ def log_commits(project, repo, since, head): def rebuild_stats(project, repo, stats_repo, head): """Run the open-seas progress tools on the scratch copy and store their statistics and chart.""" tools = Path(stats_repo) / "tools" / "progress" - run = lambda *argv: subprocess.run([sys.executable, "-B", *map(str, argv)], cwd=str(stats_repo), + # its own data dir: the agents' compiles hold the shared decomp-build\pirates.h open + env = dict(os.environ, OPENSEAS_DATA=os.environ.get("HARBOR_LOGBOOK_DATA", r"R:\Workspace\Data\openseas-logbook")) + run = lambda *argv: subprocess.run([sys.executable, "-B", *map(str, argv)], cwd=str(stats_repo), env=env, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=900) sync = run(tools / "sync_decomp.py", "--decomp", repo) if sync.returncode != 0: