fix(m4): retain compact obstacle evidence
This commit is contained in:
@@ -63,7 +63,7 @@ test("M4.6 decodes accepted dual-evidence result without physical authority", as
|
||||
},
|
||||
metrics: {
|
||||
decisions: { threat: 8010, "not-threat": 6610, unknown: 60832 },
|
||||
evidence: { "camera-only": 10158, "current-metric": 27299, "stale-or-held": 37995 },
|
||||
evidence: { "camera-only": 10158, "current-metric": 28081, "rolling-map-retained": 70989, "stale-or-held": 38025 },
|
||||
fixtures: { critical: 4, critical_false_not_threat: 0, passed: 9, total: 9 },
|
||||
runtime: {
|
||||
frames_per_second: 116.4,
|
||||
@@ -99,7 +99,7 @@ test("M4.6 decodes accepted dual-evidence result without physical authority", as
|
||||
}), { status: 200 }),
|
||||
});
|
||||
assert.equal(result.resultId, resultId);
|
||||
assert.equal(result.metrics.evidence.currentMetric, 27299);
|
||||
assert.equal(result.metrics.evidence.currentMetric, 28081);
|
||||
assert.equal(result.metrics.fixtures.criticalFalseNotThreat, 0);
|
||||
assert.equal(result.metrics.bodyFrame.qualified, 3861);
|
||||
assert.equal(result.metrics.bodyFrame.cameraForwardAlignmentDeg.p95, 8.439);
|
||||
@@ -112,6 +112,7 @@ test("M4.6 binds exact CAMERA and metric 3D evidence to one replay frame", async
|
||||
fetcher: async () => new Response(JSON.stringify({
|
||||
schema_version: "missioncore.perception-threat-visual-frame/v1",
|
||||
result_id: resultId,
|
||||
camera_url: `/api/v1/laboratory/m4-threat/results/${resultId}/visuals/1/camera`,
|
||||
ordinal: 1,
|
||||
sequence: 20,
|
||||
frame_id: "frame-000020",
|
||||
@@ -146,6 +147,7 @@ test("M4.6 binds exact CAMERA and metric 3D evidence to one replay frame", async
|
||||
}), { status: 200 }),
|
||||
});
|
||||
assert.equal(frame.sequence, 20);
|
||||
assert.match(frame.cameraUrl, /\/visuals\/1\/camera$/);
|
||||
assert.equal(frame.metricObstacles[0].assessment.decision, "threat");
|
||||
assert.equal(frame.cameraProposals[0].threatDecision, "unknown");
|
||||
assert.equal(frame.pointCloudSampleCount, 2);
|
||||
@@ -156,6 +158,7 @@ test("M4.6 v2 keeps CURRENT INCREMENT separate from ROLLING MAP", async () => {
|
||||
fetcher: async () => new Response(JSON.stringify({
|
||||
schema_version: "missioncore.perception-threat-visual-frame/v2",
|
||||
result_id: resultId,
|
||||
camera_url: `/api/v1/laboratory/m4-threat/results/${resultId}/visuals/14/camera`,
|
||||
ordinal: 14,
|
||||
sequence: 1880,
|
||||
frame_id: "frame-001880",
|
||||
@@ -231,18 +234,21 @@ test("M4.6 full video preserves camera-only unknown and nearest-frame selection"
|
||||
assert.equal(selectM4ThreatVideoFrame(overlay.frames, 35.50).frameIndex, 1);
|
||||
});
|
||||
|
||||
test("M4.6 viewer reuses shared video and metric evidence renderers", async () => {
|
||||
const [visual, videoScene, metricScene] = await Promise.all([
|
||||
test("M4.6 viewer reuses shared camera, video and metric evidence renderers", async () => {
|
||||
const [visual, imageScene, videoScene, metricScene] = await Promise.all([
|
||||
readFile(new URL("../src/workspaces/laboratory/M4ReplayThreatVisual.tsx", import.meta.url), "utf8"),
|
||||
readFile(new URL("../src/components/laboratory/RecordedEvidenceImageScene.tsx", import.meta.url), "utf8"),
|
||||
readFile(new URL("../src/components/laboratory/RecordedEvidenceVideoScene.tsx", import.meta.url), "utf8"),
|
||||
readFile(new URL("../src/components/laboratory/LaboratoryMetricEvidenceScene.tsx", import.meta.url), "utf8"),
|
||||
]);
|
||||
assert.match(visual, /<RecordedEvidenceVideoScene/);
|
||||
assert.match(visual, /<RecordedEvidenceImageScene/);
|
||||
assert.match(visual, /<LaboratoryMetricEvidenceScene/);
|
||||
assert.match(visual, /label: "VIDEO"/);
|
||||
assert.match(visual, /label: "CAMERA"/);
|
||||
assert.match(visual, /label: "3D"/);
|
||||
assert.match(videoScene, /<RecordedFmp4Player/);
|
||||
assert.match(imageScene, /<RecordedEvidenceBoxOverlay/);
|
||||
assert.match(metricScene, /OrbitControls/);
|
||||
assert.match(metricScene, /CURRENT INCREMENT/);
|
||||
assert.match(metricScene, /ROLLING MAP/);
|
||||
|
||||
Reference in New Issue
Block a user