fix(lab): restore semantic overlay in M4.7
This commit is contained in:
@@ -9,6 +9,7 @@ let fetchM47ReferenceGraphLab;
|
||||
const resultId = `m47-reference-graph-lab-${"a".repeat(64)}`;
|
||||
const graphResultId = `m47-reference-graph-${"b".repeat(64)}`;
|
||||
const visualResultId = `m4-threat-replay-${"c".repeat(64)}`;
|
||||
const semanticResultId = `e47-semantic-slam-${"d".repeat(64)}`;
|
||||
|
||||
before(async () => {
|
||||
server = await createServer({
|
||||
@@ -81,6 +82,62 @@ function m4Result() {
|
||||
};
|
||||
}
|
||||
|
||||
function semanticResult() {
|
||||
return {
|
||||
schema_version: "missioncore.e47-semantic-slam-view/v1",
|
||||
result_id: semanticResultId,
|
||||
created_at_utc: "2026-08-06T08:13:48.601Z",
|
||||
status: "diagnostic-semantic-slam-shadow",
|
||||
profile_id: "ravnoves00-eomt-kb4-slam-shadow/v1",
|
||||
base_m4_result_id: visualResultId,
|
||||
semantic_result_id: `result-${"e".repeat(64)}`,
|
||||
geometry_result_id: `m4-geometry-replay-${"f".repeat(64)}`,
|
||||
source_pack_id: `e10-lidar-pack-${"1".repeat(64)}`,
|
||||
calibration_content_sha256: "2".repeat(64),
|
||||
provider: {
|
||||
provider_id: "eomt-cityscapes-semantic-control/v1",
|
||||
model_id: "cityscapes-semantic-eomt",
|
||||
model_revision: "3".repeat(40),
|
||||
model_weights_sha256: "4".repeat(64),
|
||||
preprocess_id: "raw-kb4-valid-fov-semantic/v1",
|
||||
},
|
||||
temporal_binding: {
|
||||
semantic_to_camera: "exact-sequence-and-session-time",
|
||||
camera_to_lidar: "accepted-e6-nearest-host-arrival-best-effort",
|
||||
clock_basis: "recorded-host-monotonic-arrival",
|
||||
maximum_lidar_camera_delta_ms: 100,
|
||||
maximum_pose_point_delta_ms: 100,
|
||||
physical_synchronization_proven: false,
|
||||
},
|
||||
taxonomy: [{
|
||||
class_id: 1,
|
||||
label: "road",
|
||||
disposition: "labeled",
|
||||
color_rgb: [128, 64, 128],
|
||||
}],
|
||||
metrics: {
|
||||
frames: { total: 4489, mask_available: 4489, source_available: 3928 },
|
||||
points: { total: 1, projected: 1, labeled: 1, ambiguous: 0, unprojected: 0, absent: 0 },
|
||||
observations: { total: 1, labeled: 1, ambiguous: 0, unprojected: 0, absent: 0 },
|
||||
runtime: { elapsed_ms: 1000, frames_per_second: 4.489 },
|
||||
},
|
||||
acceptance: {
|
||||
artifact_contract_passed: true,
|
||||
frame_accounting_passed: true,
|
||||
point_accounting_passed: true,
|
||||
observation_binding_passed: true,
|
||||
temporal_binding_passed: true,
|
||||
independent_semantic_truth_passed: false,
|
||||
provider_promoted: false,
|
||||
},
|
||||
limitations: ["diagnostic only"],
|
||||
ground_truth: false,
|
||||
semantic_authority: "diagnostic-only",
|
||||
navigation_or_safety_accepted: false,
|
||||
actuation_allowed: false,
|
||||
};
|
||||
}
|
||||
|
||||
function evidenceReport() {
|
||||
const mismatch = {
|
||||
source_binding: 0,
|
||||
@@ -92,7 +149,7 @@ function evidenceReport() {
|
||||
threat_assessments: 0,
|
||||
};
|
||||
const raw = {
|
||||
schema_version: "missioncore.reference-perception-graph-lab-report/v1",
|
||||
schema_version: "missioncore.reference-perception-graph-lab-report/v2",
|
||||
result_id: resultId,
|
||||
source: { graph_result_id: graphResultId },
|
||||
method: { graph_id: "reference-perception-graph/v2" },
|
||||
@@ -122,8 +179,11 @@ function evidenceReport() {
|
||||
},
|
||||
visual_evidence: {
|
||||
linked_result_id: visualResultId,
|
||||
semantic_result_id: semanticResultId,
|
||||
shared_recorded_clock: true,
|
||||
video_camera_3d_plan_available: true,
|
||||
camera_semantic_overlay_available: true,
|
||||
semantic_binding: "exact-sequence-and-session-time",
|
||||
},
|
||||
limitations: ["recorded replay only"],
|
||||
};
|
||||
@@ -134,13 +194,13 @@ function evidenceReport() {
|
||||
created_at_utc: "2026-08-23T18:00:16.061Z",
|
||||
access: "read-only",
|
||||
proof: {
|
||||
document_schema_version: "missioncore.reference-perception-graph-lab/v1",
|
||||
document_schema_version: "missioncore.reference-perception-graph-lab/v2",
|
||||
document_sha256: "3".repeat(64),
|
||||
identity_sha256: "a".repeat(64),
|
||||
report_schema_version: raw.schema_version,
|
||||
report_sha256: "4".repeat(64),
|
||||
artifact_count: 6,
|
||||
verified_artifact_count: 6,
|
||||
artifact_count: 9,
|
||||
verified_artifact_count: 9,
|
||||
},
|
||||
completeness: { identity: "recorded" },
|
||||
identity: { authority: raw.authority },
|
||||
@@ -167,14 +227,16 @@ test("M4.7 binds exact Worker graph proof to the synchronized M4.6 visual", asyn
|
||||
fetcher: async (input) => {
|
||||
const path = String(input);
|
||||
requests.push(path);
|
||||
return new Response(JSON.stringify(
|
||||
path.includes("/evidence-reports/") ? evidenceReport() : m4Result(),
|
||||
), { status: 200 });
|
||||
const payload = path.includes("/evidence-reports/")
|
||||
? evidenceReport()
|
||||
: path.includes("/e47-semantic-slam/") ? semanticResult() : m4Result();
|
||||
return new Response(JSON.stringify(payload), { status: 200 });
|
||||
},
|
||||
});
|
||||
|
||||
assert.equal(result.graphResultId, graphResultId);
|
||||
assert.equal(result.visual.resultId, visualResultId);
|
||||
assert.equal(result.semantic.resultId, semanticResultId);
|
||||
assert.equal(result.worker.id, "worker-006");
|
||||
assert.equal(result.frames.delivered, 4489);
|
||||
assert.deepEqual(Object.values(result.parityMismatchCounts), Array(7).fill(0));
|
||||
@@ -182,6 +244,7 @@ test("M4.7 binds exact Worker graph proof to the synchronized M4.6 visual", asyn
|
||||
assert.deepEqual(requests, [
|
||||
`/api/v1/laboratory/evidence-reports/m47-reference-graph-shadow/${resultId}`,
|
||||
`/api/v1/laboratory/m4-threat/results/${visualResultId}`,
|
||||
`/api/v1/laboratory/e47-semantic-slam/results/${semanticResultId}`,
|
||||
]);
|
||||
});
|
||||
|
||||
@@ -198,6 +261,9 @@ test("M4.7 keeps exact visual binding during a rolling API deployment", async ()
|
||||
if (path.endsWith(`/${visualResultId}`)) {
|
||||
return new Response(null, { status: 404 });
|
||||
}
|
||||
if (path.includes("/e47-semantic-slam/")) {
|
||||
return new Response(JSON.stringify(semanticResult()), { status: 200 });
|
||||
}
|
||||
return new Response(JSON.stringify({
|
||||
schema_version: "missioncore.m4-threat-replay-catalog/v1",
|
||||
items: [m4Result()],
|
||||
@@ -210,5 +276,6 @@ test("M4.7 keeps exact visual binding during a rolling API deployment", async ()
|
||||
`/api/v1/laboratory/evidence-reports/m47-reference-graph-shadow/${resultId}`,
|
||||
`/api/v1/laboratory/m4-threat/results/${visualResultId}`,
|
||||
"/api/v1/laboratory/m4-threat/results?limit=10",
|
||||
`/api/v1/laboratory/e47-semantic-slam/results/${semanticResultId}`,
|
||||
]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user