feat(observatory): admit canonical recorded replay

This commit is contained in:
DCCONSTRUCTIONS
2026-08-30 19:21:27 +03:00
parent e6a9846167
commit 023151c186
32 changed files with 4069 additions and 342 deletions
+5 -1
View File
@@ -386,7 +386,11 @@ def finalized_replayable_recording_ids() -> tuple[str, ...]:
finalized: list[str] = []
cursor: str | None = None
while True:
page = session_store.list_recent(limit=100, cursor=cursor)
page = session_store.list_recent(
limit=100,
cursor=cursor,
include_capability_projections=False,
)
finalized.extend(
summary.session_id
for summary in page.items
+16 -2
View File
@@ -341,10 +341,16 @@ def build_session_router(
limit: int = Query(default=20, ge=1, le=100),
cursor: str | None = Query(default=None, max_length=128),
scope: Literal["all", "source", "laboratory"] = "all",
lab_contract: Literal["v1", "v2"] = "v1",
) -> dict[str, Any]:
try:
_refresh_catalog(catalog_refresher)
page = store.list_recent(limit=limit, cursor=cursor, scope=scope)
page = store.list_recent(
limit=limit,
cursor=cursor,
scope=scope,
include_capability_projections=lab_contract == "v2",
)
return {
"items": [
{
@@ -356,7 +362,15 @@ def build_session_router(
"modalities": list(item.modalities),
"duration_seconds": item.duration_seconds or 0.0,
"replayable": item.replayable,
**({"lab": item.lab.as_dict()} if item.lab is not None else {}),
**(
{
"lab": item.lab.as_dict(
include_replay_capability=lab_contract == "v2"
)
}
if item.lab is not None
else {}
),
**(
{
"preparation": _catalog_preparation_document(