fix(lab): restore semantic overlay in M4.7
This commit is contained in:
@@ -173,9 +173,7 @@ def test_catalog_projects_exact_diagnostic_only_view(
|
||||
assert item["status"] == "diagnostic-semantic-slam-shadow"
|
||||
assert item["base_m4_result_id"] == M4_RESULT_ID
|
||||
assert item["provider"]["provider_id"] == "eomt-cityscapes-semantic-control/v1"
|
||||
assert item["temporal_binding"]["semantic_to_camera"] == (
|
||||
"exact-sequence-and-session-time"
|
||||
)
|
||||
assert item["temporal_binding"]["semantic_to_camera"] == ("exact-sequence-and-session-time")
|
||||
assert item["temporal_binding"]["physical_synchronization_proven"] is False
|
||||
assert [entry["label"] for entry in item["taxonomy"]] == ["ambiguous", "road"]
|
||||
assert item["acceptance"] == {
|
||||
@@ -191,6 +189,13 @@ def test_catalog_projects_exact_diagnostic_only_view(
|
||||
assert item["navigation_or_safety_accepted"] is False
|
||||
assert item["actuation_allowed"] is False
|
||||
|
||||
get_result = _endpoint(
|
||||
"/api/v1/laboratory/e47-semantic-slam/results/{result_id}",
|
||||
root,
|
||||
)
|
||||
exact = get_result(RESULT_ID)
|
||||
assert exact == item
|
||||
|
||||
|
||||
def test_timeline_chunk_preserves_point_index_space_and_unavailable_sentinel(
|
||||
publication: tuple[Path, Path],
|
||||
|
||||
@@ -25,8 +25,10 @@ def test_m47_lab_binds_worker_graph_to_exact_visual_replay(
|
||||
) -> None:
|
||||
graph_root = tmp_path / "graph"
|
||||
visual_root = tmp_path / "visual"
|
||||
semantic_root = tmp_path / "semantic"
|
||||
graph_root.mkdir()
|
||||
visual_root.mkdir()
|
||||
semantic_root.mkdir()
|
||||
runtime = {
|
||||
"schema_version": "missioncore.reference-graph-runtime-identity/v3",
|
||||
"worker_id": "worker-006",
|
||||
@@ -99,6 +101,20 @@ def test_m47_lab_binds_worker_graph_to_exact_visual_replay(
|
||||
},
|
||||
}
|
||||
visual_report = {"schema_version": "missioncore.perception-threat-replay-report/v2"}
|
||||
semantic_identity = {
|
||||
"base_m4_result_id": "m4-threat-replay-" + "6" * 64,
|
||||
"source_session_id": "20260720T065719Z_viewer_live",
|
||||
"semantic_frames_sha256": "7" * 64,
|
||||
"semantic_masks_sha256": "8" * 64,
|
||||
"taxonomy_sha256": "9" * 64,
|
||||
"counts": {"frames": {"total": 4489, "mask_available": 4489}},
|
||||
}
|
||||
semantic_manifest = {
|
||||
"schema_version": "missioncore.e47-semantic-slam-result/v1",
|
||||
"identity": semantic_identity,
|
||||
}
|
||||
semantic_report = {"schema_version": "missioncore.e47-semantic-slam-report/v1"}
|
||||
semantic_taxonomy = {"schema_version": "missioncore.e47-semantic-taxonomy/v1"}
|
||||
for root, documents in (
|
||||
(
|
||||
graph_root,
|
||||
@@ -112,6 +128,14 @@ def test_m47_lab_binds_worker_graph_to_exact_visual_replay(
|
||||
visual_root,
|
||||
{"manifest.json": visual_manifest, "report.json": visual_report},
|
||||
),
|
||||
(
|
||||
semantic_root,
|
||||
{
|
||||
"manifest.json": semantic_manifest,
|
||||
"report.json": semantic_report,
|
||||
"taxonomy.json": semantic_taxonomy,
|
||||
},
|
||||
),
|
||||
):
|
||||
for name, document in documents.items():
|
||||
_write_json(root / name, document)
|
||||
@@ -129,6 +153,12 @@ def test_m47_lab_binds_worker_graph_to_exact_visual_replay(
|
||||
manifest=visual_manifest,
|
||||
report=visual_report,
|
||||
)
|
||||
semantic = SimpleNamespace(
|
||||
result_id="e47-semantic-slam-" + "a" * 64,
|
||||
result_root=semantic_root,
|
||||
manifest=semantic_manifest,
|
||||
report=semantic_report,
|
||||
)
|
||||
monkeypatch.setattr(
|
||||
"k1link.laboratory.m47_reference_graph.read_reference_graph_result",
|
||||
lambda _: graph,
|
||||
@@ -137,16 +167,22 @@ def test_m47_lab_binds_worker_graph_to_exact_visual_replay(
|
||||
"k1link.laboratory.m47_reference_graph.read_threat_replay_result",
|
||||
lambda _: visual,
|
||||
)
|
||||
monkeypatch.setattr(
|
||||
"k1link.laboratory.m47_reference_graph.read_semantic_slam_replay_result",
|
||||
lambda _: semantic,
|
||||
)
|
||||
|
||||
runtime_root = tmp_path / "runtime"
|
||||
result = publish_m47_reference_graph_lab(
|
||||
graph_result_root=graph_root,
|
||||
visual_result_root=visual_root,
|
||||
semantic_result_root=semantic_root,
|
||||
output_root=runtime_root / "m47" / "reference-graph-labs",
|
||||
)
|
||||
|
||||
assert read_m47_reference_graph_lab(result.result_root) == result
|
||||
assert result.report["visual_evidence"]["linked_result_id"] == visual.result_id
|
||||
assert result.report["visual_evidence"]["semantic_result_id"] == semantic.result_id
|
||||
assert result.report["execution"]["worker_id"] == "worker-006"
|
||||
assert result.report["metrics"]["parity_mismatch_counts"] == mismatch_counts
|
||||
repository_root = Path(__file__).resolve().parents[1]
|
||||
@@ -157,11 +193,11 @@ def test_m47_lab_binds_worker_graph_to_exact_visual_replay(
|
||||
item for item in registry.definitions if item.work_id == "m47-reference-graph-shadow"
|
||||
)
|
||||
proof = verify_laboratory_evidence_result(definition, result.result_root)
|
||||
assert proof["artifact_count"] == 6
|
||||
assert proof["artifact_count"] == 9
|
||||
projected = LaboratoryEvidenceReportService(registry, lambda: runtime_root).read(
|
||||
definition.work_id,
|
||||
result.result_id,
|
||||
)
|
||||
assert projected["raw_report"]["schema_version"] == (
|
||||
"missioncore.reference-perception-graph-lab-report/v1"
|
||||
"missioncore.reference-perception-graph-lab-report/v2"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user