fix(perception): bound LAB replay to AI window
This commit is contained in:
@@ -849,6 +849,38 @@ def test_lab_instance_publication_is_idempotent_but_provenance_is_immutable(
|
||||
store.publish_lab_instance(**{**parameters, "config_sha256": "0" * 64})
|
||||
|
||||
|
||||
def test_bounded_lab_instance_excludes_unbounded_recorded_media(
|
||||
tmp_path: Path,
|
||||
) -> None:
|
||||
repository = tmp_path / "repo"
|
||||
sessions = repository / "sessions"
|
||||
source = make_legacy_session(sessions, "20260716T205632Z_viewer_live")
|
||||
make_recorded_camera_source(source)
|
||||
store = SessionStore(repository, data_dir=tmp_path / "data")
|
||||
store.reconcile_archive(xgrids_k1_archive_source(sessions))
|
||||
assert store.list_recorded_media(source.name)
|
||||
|
||||
binding = store.publish_lab_instance(
|
||||
session_id="lab-e21-window-d0201712",
|
||||
source_session_id=source.name,
|
||||
display_name="LAB E21.2 · bounded 60s",
|
||||
lab_id="LAB E21.2",
|
||||
result_kind="e21-realtime-envelope",
|
||||
result_id="e10-integrated-perception-" + "1" * 64,
|
||||
source_result_id="e21-realtime-envelope-" + "2" * 64,
|
||||
config_sha256="3" * 64,
|
||||
run_created_at_utc="2026-07-23T15:55:15.548Z",
|
||||
duration_seconds=59.962,
|
||||
include_recorded_media=False,
|
||||
provenance={"timeline_scope": "bounded"},
|
||||
)
|
||||
|
||||
detail = store.get_session(binding.session_id)
|
||||
assert detail.summary.duration_seconds == pytest.approx(59.962)
|
||||
assert store.list_recorded_media(binding.session_id) == ()
|
||||
assert store.prepare_replay(binding.session_id).primary_artifact.path.is_file()
|
||||
|
||||
|
||||
def test_delete_session_rejects_a_catalog_target_outside_its_allowed_root(
|
||||
tmp_path: Path,
|
||||
) -> None:
|
||||
|
||||
Reference in New Issue
Block a user