feat: finalize corrected-route planning and Rerun recording review

This commit is contained in:
DCCONSTRUCTIONS
2026-09-22 10:10:03 +03:00
parent c804d89b18
commit 2e5d52521f
132 changed files with 14141 additions and 898 deletions
+9 -1
View File
@@ -37,10 +37,15 @@ logger = logging.getLogger(__name__)
class PlanningLiveTests:
def __init__(self, drafts, sources, compute_lock):
def __init__(self, drafts, sources, compute_lock, *, capture_recorder=None):
self.drafts, self.sources, self.compute_lock = drafts, sources, compute_lock
self.root = drafts.database.parent / "live-tests"
self.root.mkdir(exist_ok=True)
self.capture_recorder = capture_recorder
if capture_recorder is not None:
from .capture_catalog import reconcile_planning_captures
reconcile_planning_captures(self.root, capture_recorder)
self.lock = threading.RLock()
self.run = None
self.sample = None
@@ -177,6 +182,9 @@ class PlanningLiveTests:
def update(self, **values):
with self.lock:
capture = values.get("query_session_id")
if capture and self.capture_recorder is not None:
self.capture_recorder(capture, self.run["id"])
self.run.update(values)
self.revision += 1
self.persist()