Restore complete LAB recordings from verified Worker publications

This commit is contained in:
DCCONSTRUCTIONS
2026-11-10 03:23:20 +03:00
parent a724a9796a
commit 1317f78672
11 changed files with 635 additions and 12 deletions
+10 -1
View File
@@ -18,6 +18,7 @@ from k1link import __version__
from k1link.artifact_gateway import configured_artifact_gateway
from k1link.laboratory.deletion_coordinator import LabDeletionCoordinator
from k1link.laboratory.local_presentations import LocalPresentations
from k1link.laboratory.replay_restore import WorkerReplayRestore
from k1link.laboratory.worker_gateway import (
LaboratoryGatewayConfiguration,
LaboratoryWorkerGateway,
@@ -997,7 +998,13 @@ async def device_plugin_events(websocket: WebSocket, plugin_id: str) -> None:
await websocket.close(code=1011, reason="Device plugin state stream failed")
local_presentation_copies = LocalPresentations(session_store.data_dir)
_replay_cache_binding = os.environ.get("MISSIONCORE_LAB_VIEW_CACHE_DIR", "").strip()
local_presentation_copies = LocalPresentations(
session_store.data_dir,
cache_data_dir=(
Path(_replay_cache_binding).expanduser().absolute() if _replay_cache_binding else None
),
)
lab_deletion_service = LabDeletionCoordinator(
store=session_store, queue=OBSERVATORY_RECORDED_JOB_QUEUE,
compositions=OBSERVATORY_AI_COMPOSITION_RUNS, copies=local_presentation_copies,
@@ -1017,6 +1024,8 @@ if session_artifact_gateway is not None and _ffmpeg is not None:
recording_source=_canonical_lab_recording_source,
ffmpeg_path=_ffmpeg,
local_copies=local_presentation_copies,
remote_replays=WorkerReplayRestore(laboratory_worker_gateway.configuration)
if laboratory_worker_gateway.configuration is not None else None,
),
composition_runs=OBSERVATORY_AI_COMPOSITION_RUNS,
queue=OBSERVATORY_RECORDED_JOB_QUEUE,