refactor(lab): restore canonical RAV004 replay
This commit is contained in:
@@ -360,6 +360,15 @@ def _m48_recorded_camera_playback_source(
|
||||
return session_recorded_camera_frame_service.playback_source(session_id)
|
||||
|
||||
|
||||
def _canonical_lab_recording_source(session_id: str) -> tuple[Path, str] | None:
|
||||
"""Resolve one already-published immutable RRD without starting new work."""
|
||||
|
||||
snapshot = session_recording_preparation_manager.status(session_id)
|
||||
if snapshot is None or snapshot.state != "ready" or snapshot.recording is None:
|
||||
return None
|
||||
return snapshot.recording.path, snapshot.recording.sha256
|
||||
|
||||
|
||||
def refresh_observation_catalog() -> tuple[str, ...]:
|
||||
"""Discover completed or recoverable local evidence without copying payloads."""
|
||||
|
||||
@@ -1032,6 +1041,12 @@ app.include_router(
|
||||
/ "lab-v1-vegetation"
|
||||
/ "results"
|
||||
),
|
||||
canonical_recording_provider=_canonical_lab_recording_source,
|
||||
camera_frame_provider=(
|
||||
session_recorded_camera_frame_service.extract
|
||||
if session_recorded_camera_frame_service is not None
|
||||
else None
|
||||
),
|
||||
)
|
||||
)
|
||||
app.include_router(
|
||||
|
||||
Reference in New Issue
Block a user