fix(lab): seal RAV004 spatial replay transport
This commit is contained in:
@@ -22,6 +22,7 @@ from k1link.laboratory.evidence_report import verify_laboratory_evidence_result
|
||||
from k1link.laboratory.vegetation_policy_review import seal_vegetation_policy_review
|
||||
from k1link.laboratory.vegetation_shadow_lab import seal_vegetation_shadow_lab
|
||||
from k1link.web.vegetation_shadow_lab_api import (
|
||||
_canonical_route_playback_chunk_descriptor,
|
||||
_mask_component_boxes,
|
||||
_route_tgs_anchor_payload,
|
||||
build_vegetation_shadow_lab_router,
|
||||
@@ -42,6 +43,25 @@ def test_semantic_component_boxes_keep_distinct_objects_separate() -> None:
|
||||
]
|
||||
|
||||
|
||||
def test_route_playback_chunk_descriptor_seals_only_requested_binary_window() -> None:
|
||||
points = np.arange(18, dtype="<f4").reshape(6, 3)
|
||||
descriptor = _canonical_route_playback_chunk_descriptor(
|
||||
"/api/v1/laboratory/vegetation-shadow",
|
||||
f"lab-v1-vegetation-shadow-{'a' * 64}",
|
||||
memoryview(points).cast("B"),
|
||||
(0, 1, 1, 3, 6),
|
||||
0,
|
||||
)
|
||||
|
||||
assert descriptor is not None
|
||||
assert descriptor["start"] == 0
|
||||
assert descriptor["count"] == 4
|
||||
assert descriptor["point_count"] == 6
|
||||
assert descriptor["bytes"] == points.nbytes
|
||||
assert descriptor["shape"] == [6, 3]
|
||||
assert len(str(descriptor["sha256"])) == 64
|
||||
|
||||
|
||||
def test_route_tgs_anchor_payload_preserves_metric_evidence(tmp_path: Path) -> None:
|
||||
path = tmp_path / "tgs-evidence.npz"
|
||||
point_counts = np.arange(1, 11, dtype=np.int64)
|
||||
|
||||
Reference in New Issue
Block a user