feat(lab): present chronological perception evidence

This commit is contained in:
DCCONSTRUCTIONS
2026-08-05 07:49:49 +03:00
parent 12c8a2d74c
commit 7a72a206f1
102 changed files with 20122 additions and 222 deletions
@@ -8,6 +8,20 @@ let fetchAdvancedLaboratoryResults;
let fetchAdvancedLaboratoryIndex;
let fetchAdvancedLaboratoryResult;
let AdvancedLaboratoryContractError;
let buildLaboratoryCatalog;
let buildLaboratoryProfiles;
let experimentOptionsForProfile;
let workOptionsForExperiment;
let fetchL34RightYoloxTruthIsland;
let fetchL34RightYoloxTruthIslandFrame;
let fetchL34AAssistedYoloxErrorAudit;
let fetchL34AAuditCase;
let fetchL34AnnotationSourceCatalog;
let fetchL34AnnotationSourceFrame;
let fetchL34AnnotationSeedFrame;
let fetchL34AnnotationLabels;
let createL34AnnotationSession;
let saveL34AnnotationSession;
const authority = {
commands_enabled: false,
@@ -25,6 +39,198 @@ function catalog(item) {
};
}
function l34() {
return {
result_id: `l34-right-yolox-truth-island-freeze-${"5".repeat(64)}`,
created_at_utc: "2026-08-01T00:30:00Z",
status: "predictions-frozen-awaiting-independent-truth",
profile_id: "RAVNOVES00_RIGHT_YOLOX_TRUTH_ISLAND_V1",
pipeline_id: "kb4-core3-yolox-eomt-k1-lidar-e23-temporal/v1",
source_session_id: "20260720T065719Z_viewer_live",
camera_source_id: "sensor.camera.right",
candidate: {
architecture: "YOLOX-S",
model_sha256: "c".repeat(64),
minimum_score: 0.25,
l33_result_id: `l33-camera-first-detector-review-${"3".repeat(64)}`,
},
truth_island: {
result_id: `e46-detector-truth-island-${"4".repeat(64)}`,
truth_state: "labels-unavailable",
},
metrics: {
frame_count: 32,
temporal_group_count: 20,
prediction_count: 268,
frames_with_predictions: 32,
class_counts: { car: 234, heavy_vehicle: 22, person: 7 },
accuracy_metrics_available: false,
},
frames: Array.from({ length: 32 }, (_, index) => ({
truth_island_sequence: index + 1,
image_id: index + 1,
frame_index: 1248 + index,
group_id: index === 0 ? "clip-stroller-person" : `anchor-${index + 1}`,
prediction_count: index < 12 ? 9 : 8,
maximum_score: 0.91,
})),
decision: {
candidate_predictions_frozen: true,
truth_labels_read: false,
candidate_accepted: false,
model_retraining_authorized: false,
next_gate: "two-independent-reviewer-truth-release",
},
limitations: ["right-camera recorded replay only"],
access: "read-only",
};
}
function l34a() {
const caseSummary = (index) => ({
truth_island_sequence: index + 1,
image_id: index + 2,
frame_index: 70 + index,
group_id: index === 4 ? "clip-stroller-person" : `anchor-${index + 1}`,
session_seconds: 10 + index,
source_image_sha256: "a".repeat(64),
summary: {
prediction_count: 8,
reference_count: 9,
true_positive: 7,
false_positive: 1,
false_negative: 2,
class_mismatch: index === 4 ? 1 : 0,
duplicate_false_positive: index === 14 ? 1 : 0,
unmatched_false_positive: index === 14 ? 0 : 1,
unmatched_false_negative: 1,
severity_score: index === 4 ? 5 : 3,
},
});
return {
result_id: `l34a-assisted-yolox-error-audit-${"6".repeat(64)}`,
created_at_utc: "2026-08-02T12:45:00Z",
status: "completed-assisted-candidate-error-audit-not-truth",
profile_id: "l34a-assisted-yolox-error-audit/v1",
pipeline_id: "ravnoves00-right-yolox-assisted-error-audit/v1",
source_session_id: "RAVNOVES00",
camera_source_id: "sensor.camera.right",
assisted_annotation: {
session_id: `l34-annotation-session-${"7".repeat(64)}`,
session_sha256: "8".repeat(64),
revision: 1,
updated_at_utc: "2026-08-02T12:38:19Z",
independent_truth_eligible: false,
},
metrics: {
frame_count: 32,
prediction_count: 268,
reference_count: 278,
true_positive: 234,
false_positive: 34,
false_negative: 44,
class_mismatch: 7,
duplicate_false_positive: 5,
unmatched_false_positive: 22,
unmatched_false_negative: 37,
precision_iou50: 234 / 268,
recall_iou50: 234 / 278,
f1_iou50: 6 / 7,
error_case_count: 26,
custom_reference_count: 9,
per_class: {
car: {
reference_count: 219,
true_positive: 210,
false_positive: 20,
false_negative: 9,
precision_iou50: 210 / 230,
recall_iou50: 210 / 219,
},
},
},
cases: Array.from({ length: 32 }, (_, index) => caseSummary(index)),
case_order: Array.from({ length: 32 }, (_, index) => index + 1),
decision: {
assisted_alignment_available: true,
blind_accuracy_available: false,
postprocessing_issue_confirmed: true,
ontology_gap_confirmed: true,
candidate_accepted: false,
model_retraining_authorized: false,
l35_blind_gate_open: false,
next_action: "visual engineering audit only",
},
limitations: ["candidate-seeded review is not truth"],
authority: {
ground_truth: false,
candidate_accepted: false,
commands_enabled: false,
navigation_or_safety_accepted: false,
},
ground_truth: false,
access: "read-only",
};
}
function annotationSession({ revision = 0, state = "draft", frames = [] } = {}) {
return {
schema_version: "missioncore.l34-annotation-session/v3",
session_id: `l34-annotation-session-${"7".repeat(64)}`,
result_id: l34().result_id,
truth_island_id: `e46-detector-truth-island-${"4".repeat(64)}`,
contract_id: "l34-assisted-candidate-review/v1",
title: "Разметка · LAB L3.4 · Рецензент 1",
reviewer_slot: 1,
revision,
state,
created_at_utc: "2026-08-01T08:00:00.000Z",
updated_at_utc: "2026-08-01T08:00:00.000Z",
blindness: {
candidate_identity_seen: true,
model_prelabels_seen: true,
model_predictions_seen: true,
model_scores_seen: false,
},
assistance: {
mode: "frozen-candidate-seeded",
independent_truth_eligible: false,
},
authority: {
ground_truth: false,
candidate_accepted: false,
commands_enabled: false,
navigation_or_safety_accepted: false,
},
progress: {
reviewed_frame_count: frames.length,
frame_count: 32,
object_count: frames.reduce((total, frame) => total + frame.objects.length, 0),
complete: frames.length === 32,
},
frames,
};
}
function l34dBlindAnnotationSession({ revision = 0, state = "draft", frames = [] } = {}) {
return {
...annotationSession({ revision, state, frames }),
result_id: `l34d-cumulative-postprocessing-candidate-${"d".repeat(64)}`,
contract_id: "l34d-prediction-hidden-review/v1",
title: "Разметка · LAB L3.4D · Рецензент 1",
blindness: {
candidate_identity_seen: true,
model_prelabels_seen: false,
model_predictions_seen: false,
model_scores_seen: false,
},
assistance: {
mode: "prediction-hidden-manual",
independent_truth_eligible: false,
},
};
}
function e31() {
return {
result_id: `e31-source-qualification-${"1".repeat(64)}`,
@@ -643,12 +849,573 @@ before(async () => {
fetchAdvancedLaboratoryIndex,
fetchAdvancedLaboratoryResult,
} = await server.ssrLoadModule("/src/core/laboratory/advancedIndex.ts"));
({
buildLaboratoryCatalog,
buildLaboratoryProfiles,
experimentOptionsForProfile,
workOptionsForExperiment,
} = await server.ssrLoadModule(
"/src/workspaces/laboratory/laboratoryArchiveProfiles.ts",
));
({
fetchL34RightYoloxTruthIsland,
fetchL34RightYoloxTruthIslandFrame,
} = await server.ssrLoadModule(
"/src/core/laboratory/l34RightYoloxTruthIsland.ts",
));
({
fetchL34AAssistedYoloxErrorAudit,
fetchL34AAuditCase,
} = await server.ssrLoadModule(
"/src/core/laboratory/l34aAssistedYoloxErrorAudit.ts",
));
({
fetchL34AnnotationSourceCatalog,
fetchL34AnnotationSourceFrame,
fetchL34AnnotationSeedFrame,
fetchL34AnnotationLabels,
createL34AnnotationSession,
saveL34AnnotationSession,
} = await server.ssrLoadModule(
"/src/core/laboratory/l34Annotation.ts",
));
});
after(async () => {
await server?.close();
});
test("LAB catalog is pipeline-scoped and ordered by real run time", () => {
const catalog = buildLaboratoryCatalog({
rigLabel: "K1",
knownWorks: [],
advancedIndex: [
{
workId: "e40-perception-product-gate",
resultId: `e40-perception-product-gate-${"4".repeat(64)}`,
createdAtUtc: "2026-07-28T11:07:52.003Z",
},
{
workId: "l32-pointpillars-camera-review",
resultId: `l32-pointpillars-camera-review-${"2".repeat(64)}`,
createdAtUtc: "2026-07-31T13:11:00.469Z",
},
{
workId: "l33-camera-first-detector-review",
resultId: `l33-camera-first-detector-review-${"3".repeat(64)}`,
createdAtUtc: "2026-07-31T21:08:08.728Z",
},
],
publishedWorks: [],
});
const profiles = buildLaboratoryProfiles(catalog);
assert.deepEqual(profiles.map(({ id }) => id), [
"rig-right-yolox-lidar-range-v1",
"rig-pointpillars-transfer-v1",
"rig-ravnoves-perception-gate-v1",
]);
assert.equal(
profiles[0].label,
"2026-08-01 00:08:08 MSK · K1 RIGHT · YOLOX camera-first + LiDAR range",
);
const experiments = experimentOptionsForProfile(profiles[0].id, catalog);
assert.equal(
experiments[0].label,
"2026-08-01 00:08:08 MSK · Detector admission + metric range",
);
assert.equal(
workOptionsForExperiment(profiles[0].id, experiments[0].id, catalog)[0].label,
"2026-08-01 00:08:08 MSK · L3.3 · Detector review + LiDAR range",
);
});
test("E46E is exposed as the newest independent NVIDIA pipeline", () => {
const catalog = buildLaboratoryCatalog({
rigLabel: "K1",
knownWorks: [],
advancedIndex: [
{
workId: "e46d-temporal-failure-audit",
resultId: `e46d-temporal-failure-audit-${"d".repeat(64)}`,
createdAtUtc: "2026-08-04T07:49:43.801363Z",
},
{
workId: "e46e-ready-stack",
resultId: `e46e-ready-stack-${"e".repeat(64)}`,
createdAtUtc: "2026-08-04T11:12:18.354Z",
},
],
publishedWorks: [],
});
const profiles = buildLaboratoryProfiles(catalog);
assert.equal(profiles[0].id, "rig-nvidia-ready-stack-v1");
assert.equal(
profiles[0].label,
"2026-08-04 14:12:18 MSK · K1 RIGHT · NVIDIA RT-DETR + NvDCF ready stack",
);
const experiments = experimentOptionsForProfile(profiles[0].id, catalog);
assert.deepEqual(experiments, [{
id: "nvidia-ready-stack-bakeoff-r1",
label: "2026-08-04 14:12:18 MSK · NVIDIA ready-stack bake-off R1",
}]);
assert.deepEqual(
workOptionsForExperiment(profiles[0].id, experiments[0].id, catalog),
[{
id: "e46e-ready-stack",
label: "2026-08-04 14:12:18 MSK · E46E · TrafficCamNet RT-DETR + NvDCF · full replay",
}],
);
});
test("E46J is the newest pipeline and exposes its exact Moscow timestamp", () => {
const catalog = buildLaboratoryCatalog({
rigLabel: "K1",
knownWorks: [],
advancedIndex: [
{
workId: "e46i-grounding-dino-full-replay",
resultId: `e46i-grounding-dino-full-replay-${"i".repeat(64)}`,
createdAtUtc: "2026-08-04T16:17:39.318Z",
},
{
workId: "e46j-raw-fisheye-realtime",
resultId: `e46j-raw-fisheye-realtime-${"a".repeat(64)}`,
createdAtUtc: "2026-08-04T19:37:51.841Z",
},
],
publishedWorks: [],
});
const profiles = buildLaboratoryProfiles(catalog);
assert.equal(profiles[0].id, "rig-right-raw-fisheye-yolox-realtime-v1");
assert.equal(
profiles[0].label,
"2026-08-04 22:37:51 MSK · K1 RIGHT · raw KB4 fisheye + YOLOX-S",
);
const experiments = experimentOptionsForProfile(profiles[0].id, catalog);
assert.equal(
experiments[0].label,
"2026-08-04 22:37:51 MSK · Raw fisheye one-pass realtime qualification R1",
);
assert.equal(
workOptionsForExperiment(profiles[0].id, experiments[0].id, catalog)[0].label,
"2026-08-04 22:37:51 MSK · E46J · full raw fisheye · realtime capacity passed",
);
});
test("decodes L3.4 only as a right-camera replay candidate awaiting truth", async () => {
const decoded = await fetchL34RightYoloxTruthIsland({
fetcher: async () => new Response(JSON.stringify({
schema_version: "missioncore.l34-right-yolox-truth-island-catalog/v1",
configured: true,
items: [l34()],
candidate_total: 1,
invalid_total: 0,
access: "read-only",
}), { status: 200 }),
});
assert.equal(decoded.cameraSourceId, "sensor.camera.right");
assert.equal(decoded.metrics.predictionCount, 268);
assert.equal(decoded.metrics.accuracyMetricsAvailable, false);
assert.equal(decoded.decision.candidateAccepted, false);
assert.equal(decoded.frames[0].groupId, "clip-stroller-person");
await assert.rejects(
() => fetchL34RightYoloxTruthIsland({
fetcher: async () => new Response(JSON.stringify({
schema_version: "missioncore.l34-right-yolox-truth-island-catalog/v1",
items: [{ ...l34(), camera_source_id: "sensor.camera.left" }],
access: "read-only",
}), { status: 200 }),
}),
/camera_source_id/,
);
});
test("binds an L3.4 visual frame to exact camera bytes and frozen boxes", async () => {
const resultId = l34().result_id;
const frame = await fetchL34RightYoloxTruthIslandFrame(resultId, 5, {
fetcher: async () => new Response(JSON.stringify({
schema_version: "missioncore.l34-right-yolox-truth-island-frame/v1",
result_id: resultId,
truth_island_sequence: 5,
image_id: 15,
frame_index: 1248,
group_id: "clip-stroller-person",
role: "temporal",
session_seconds: 160.142857292,
camera: {
width: 800,
height: 600,
byte_length: 479279,
sha256: "a".repeat(64),
},
prediction_rows_sha256: "b".repeat(64),
predictions: [{
label: "person",
score: 0.731547654,
bbox_xyxy: [230.005722, 311.645813, 317.241974, 421.966339],
}],
truth_labels_read: false,
access: "read-only",
}), { status: 200 }),
});
assert.equal(frame.cameraUrl, `/api/v1/laboratory/l34/results/${resultId}/frames/5/camera`);
assert.equal(frame.predictions[0].label, "person");
assert.deepEqual(frame.predictions[0].bboxXyxy, [
230.005722, 311.645813, 317.241974, 421.966339,
]);
assert.equal(frame.truthLabelsRead, false);
});
test("decodes L3.4A only as assisted diagnostic alignment", async () => {
const payload = l34a();
const decoded = await fetchL34AAssistedYoloxErrorAudit({
fetcher: async () => new Response(JSON.stringify({
schema_version: "missioncore.l34a-assisted-yolox-error-catalog/v1",
configured: true,
items: [payload],
candidate_total: 1,
invalid_total: 0,
access: "read-only",
}), { status: 200 }),
});
assert.equal(decoded.metrics.truePositive, 234);
assert.equal(decoded.metrics.duplicateFalsePositive, 5);
assert.equal(decoded.metrics.customReferenceCount, 9);
assert.equal(decoded.groundTruth, false);
assert.equal(decoded.decision.blindAccuracyAvailable, false);
assert.equal(decoded.decision.l35BlindGateOpen, false);
});
test("binds each L3.4A visual case to prediction and assisted-reference layers", async () => {
const resultId = l34a().result_id;
const decoded = await fetchL34AAuditCase(resultId, 5, {
fetcher: async () => new Response(JSON.stringify({
schema_version: "missioncore.l34a-assisted-yolox-error-case/v1",
result_id: resultId,
truth_island_sequence: 5,
image_id: 15,
frame_index: 1248,
group_id: "clip-stroller-person",
session_seconds: 160.1,
source_image_sha256: "a".repeat(64),
camera: { width: 800, height: 600 },
predictions: [{
prediction_index: 1,
category: "motorcycle",
score: 0.66,
box_xyxy: [190, 302, 335, 467],
verdict: "class_mismatch",
matched_object_id: "stroller-1",
match_iou: 0.78,
}],
annotations: [{
object_id: "stroller-1",
category: "unmapped",
proposed_label: "Детская коляска",
display_category: "unmapped:Детская коляска",
origin: "manual",
box_xyxy: [190, 302, 335, 467],
occluded: false,
truncated: false,
verdict: "class_mismatch",
matched_prediction_index: 1,
match_iou: 0.78,
}],
matches: [],
summary: {
prediction_count: 1,
reference_count: 1,
true_positive: 0,
false_positive: 1,
false_negative: 1,
class_mismatch: 1,
duplicate_false_positive: 0,
unmatched_false_positive: 0,
unmatched_false_negative: 0,
severity_score: 3,
},
ground_truth: false,
access: "read-only",
}), { status: 200 }),
});
assert.equal(decoded.predictions[0].verdict, "class_mismatch");
assert.equal(decoded.annotations[0].displayCategory, "unmapped:Детская коляска");
assert.equal(decoded.cameraUrl, `/api/v1/laboratory/l34a/results/${resultId}/cases/5/camera`);
assert.equal(decoded.groundTruth, false);
});
test("opens L3.4 annotation from a prediction-free source contract", async () => {
const resultId = l34().result_id;
const catalogPayload = {
schema_version: "missioncore.l34-annotation-source-catalog/v2",
result_id: resultId,
truth_island_id: `e46-detector-truth-island-${"4".repeat(64)}`,
contract: {
contract_id: "e46-detector-blind-review/v1",
classes: [
"person",
"bicycle",
"motorcycle",
"car",
"heavy_vehicle",
"static_obstacle",
"animal",
],
unmapped_class: {
value: "unmapped",
proposed_label_required: true,
normalization_state: "pending-adjudication",
},
},
frames: [{
truth_island_sequence: 5,
image_id: 15,
frame_index: 1248,
group_id: "clip-stroller-person",
role: "temporal",
session_seconds: 160.142857292,
camera: { width: 800, height: 600, sha256: "a".repeat(64) },
}],
frame_count: 1,
model_material_included: false,
access: "annotation-source-read-only",
};
const decoded = await fetchL34AnnotationSourceCatalog(resultId, {
fetcher: async () => new Response(JSON.stringify(catalogPayload), { status: 200 }),
});
assert.equal(decoded.frames[0].frameIndex, 1248);
assert.equal(decoded.modelMaterialIncluded, false);
assert.equal(JSON.stringify(decoded).includes("prediction"), false);
const frame = await fetchL34AnnotationSourceFrame(resultId, 5, {
fetcher: async () => new Response(JSON.stringify({
schema_version: "missioncore.l34-annotation-source/v1",
result_id: resultId,
...catalogPayload.frames[0],
camera_url: `/api/v1/laboratory/l34/results/${resultId}/annotation-source/frames/5/camera`,
model_material_included: false,
access: "annotation-source-read-only",
}), { status: 200 }),
});
assert.match(frame.cameraUrl, /annotation-source\/frames\/5\/camera$/);
const seed = await fetchL34AnnotationSeedFrame(resultId, 5, {
fetcher: async () => new Response(JSON.stringify({
schema_version: "missioncore.l34-annotation-seed/v1",
result_id: resultId,
truth_island_sequence: 5,
source_sha256: "a".repeat(64),
objects: [{
object_id: "seed-5-1",
category: "person",
proposed_label: null,
origin: "frozen_candidate_seed",
box_xyxy: [10, 20, 30, 40],
occluded: false,
truncated: false,
}],
assistance: {
mode: "frozen-candidate-seeded",
independent_truth_eligible: false,
},
model_material_included: true,
access: "assisted-annotation-seed-read-only",
}), { status: 200 }),
});
assert.equal(seed.objects[0].origin, "frozen_candidate_seed");
assert.equal(JSON.stringify(seed).includes("score"), false);
const labels = await fetchL34AnnotationLabels(resultId, {
fetcher: async () => new Response(JSON.stringify({
schema_version: "missioncore.l34-annotation-label-catalog/v1",
result_id: resultId,
items: [{
value: "Детская коляска",
normalization_state: "pending-adjudication",
}],
total: 1,
access: "assisted-annotation-taxonomy",
}), { status: 200 }),
});
assert.equal(labels[0].value, "Детская коляска");
await assert.rejects(
() => fetchL34AnnotationSourceCatalog(resultId, {
fetcher: async () => new Response(JSON.stringify({
...catalogPayload,
model_material_included: true,
}), { status: 200 }),
}),
/model material/,
);
});
test("opens L3.4D as prediction-hidden manual labeling without a seed endpoint", async () => {
const resultId = `l34d-cumulative-postprocessing-candidate-${"d".repeat(64)}`;
let requestedUrl = "";
const decoded = await fetchL34AnnotationSourceCatalog(resultId, {
fetcher: async (input) => {
requestedUrl = String(input);
return new Response(JSON.stringify({
schema_version: "missioncore.l34-annotation-source-catalog/v2",
result_id: resultId,
truth_island_id: `e46-detector-truth-island-${"4".repeat(64)}`,
contract: {
contract_id: "l34d-prediction-hidden-review/v1",
classes: [
"person",
"bicycle",
"motorcycle",
"car",
"heavy_vehicle",
"static_obstacle",
"animal",
],
unmapped_class: {
value: "unmapped",
proposed_label_required: true,
normalization_state: "pending-adjudication",
},
},
candidate_binding: {
result_id: resultId,
source_l34_result_id: `l34-right-yolox-truth-island-freeze-${"b".repeat(64)}`,
},
frames: [{
truth_island_sequence: 1,
image_id: 15,
frame_index: 1248,
group_id: "clip-stroller-person",
role: "temporal",
session_seconds: 160.142857292,
camera: { width: 800, height: 600, sha256: "a".repeat(64) },
}],
frame_count: 1,
model_material_included: false,
candidate_predictions_included: false,
prelabels_included: false,
access: "prediction-hidden-annotation-source-read-only",
}), { status: 200 });
},
});
assert.match(requestedUrl, /\/laboratory\/l34d\/results\//);
assert.equal(decoded.workflow, "prediction-hidden");
assert.equal(decoded.contractId, "l34d-prediction-hidden-review/v1");
await assert.rejects(
() => fetchL34AnnotationSeedFrame(resultId, 1, {
fetcher: async () => {
throw new Error("blind workflow must not request a seed");
},
}),
/не предоставляет предразметку/,
);
const created = await createL34AnnotationSession(resultId, {
fetcher: async (input) => {
assert.match(String(input), /\/laboratory\/l34d\/results\//);
return new Response(JSON.stringify(l34dBlindAnnotationSession()), { status: 200 });
},
});
assert.equal(created.assistance.mode, "prediction-hidden-manual");
assert.equal(created.contractId, "l34d-prediction-hidden-review/v1");
});
test("creates and saves a revisioned annotation draft without truth authority", async () => {
let requestBody;
const created = await createL34AnnotationSession(l34().result_id, {
fetcher: async (_input, init) => {
requestBody = JSON.parse(init.body);
return new Response(JSON.stringify(annotationSession()), { status: 200 });
},
});
assert.match(requestBody.idempotency_key, /^create:/);
assert.equal(created.progress.complete, false);
const frames = [{
truthIslandSequence: 5,
reviewed: true,
hardNegative: false,
objects: [{
objectId: "box-1",
category: "person",
proposedLabel: null,
origin: "frozen_candidate_seed",
boxXyxy: [10, 20, 30, 40],
occluded: true,
truncated: false,
}, {
objectId: "box-stroller",
category: "unmapped",
proposedLabel: "Детская коляска",
origin: "manual",
boxXyxy: [40, 50, 80, 90],
occluded: false,
truncated: false,
}],
}];
let saveBody;
const saved = await saveL34AnnotationSession(
created,
created.title,
frames,
"frozen-candidate-seeded",
{
fetcher: async (_input, init) => {
saveBody = JSON.parse(init.body);
return new Response(JSON.stringify(annotationSession({
revision: 1,
state: "saved",
frames: [{
truth_island_sequence: 5,
image_id: 15,
frame_index: 1248,
source_sha256: "a".repeat(64),
reviewed: true,
hard_negative: false,
objects: [{
object_id: "box-1",
category: "person",
proposed_label: null,
origin: "frozen_candidate_seed",
box_xyxy: [10, 20, 30, 40],
occluded: true,
truncated: false,
notes: null,
}, {
object_id: "box-stroller",
category: "unmapped",
proposed_label: "Детская коляска",
origin: "manual",
box_xyxy: [40, 50, 80, 90],
occluded: false,
truncated: false,
notes: null,
}],
}],
})), { status: 200 });
},
},
);
assert.equal(saveBody.expected_revision, 0);
assert.equal(saveBody.frames[0].objects[0].category, "person");
assert.equal(saveBody.frames[0].objects[1].category, "unmapped");
assert.equal(saveBody.frames[0].objects[1].proposed_label, "Детская коляска");
assert.equal(saveBody.assistance_mode, "frozen-candidate-seeded");
assert.equal(JSON.stringify(saveBody).includes("prediction"), false);
assert.equal(saved.revision, 1);
assert.equal(saved.frames[0].objects[0].occluded, true);
assert.equal(saved.frames[0].objects[1].proposedLabel, "Детская коляска");
});
test("decodes E31–E40 from separate read-only catalogs", async () => {
const requests = [];
const items = [
@@ -0,0 +1,120 @@
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
import { after, before, test } from "node:test";
import { createServer } from "vite";
let server;
let fetchE46CVideoOverlay;
let selectE46CVideoFrame;
before(async () => {
server = await createServer({
appType: "custom",
logLevel: "silent",
server: { middlewareMode: true },
});
({ fetchE46CVideoOverlay, selectE46CVideoFrame } = await server.ssrLoadModule(
"/src/core/laboratory/e46cFullReplayWorldTracks.ts",
));
});
after(async () => {
await server?.close();
});
test("E46C decodes the complete path-free temporal video overlay", async () => {
const resultId = `e46c-full-replay-world-tracks-${"a".repeat(64)}`;
const start = 35.421857292;
const end = 484.044857292;
const step = (end - start) / 4488;
const frames = Array.from({ length: 4489 }, (_, frameIndex) => ({
frame_index: frameIndex,
session_seconds: frameIndex === 4488 ? end : start + frameIndex * step,
fusion_state: "fused",
objects: frameIndex === 20
? [{
bbox_xyxy: [100, 120, 240, 360],
category: "person",
score: 0.91,
route_track_id: 83,
world_track_id: 240001,
motion_state: "dynamic",
motion_confidence: 0.88,
track_hits: 12,
track_age_seconds: 1.2,
camera_evidence_current: true,
world_evidence_current: false,
}]
: [],
}));
const fetcher = async (input) => {
assert.equal(
String(input),
`/api/v1/laboratory/e46c/results/${resultId}/video-overlay`,
);
return new Response(JSON.stringify({
schema_version: "missioncore.e46c-recorded-video-overlay/v1",
result_id: resultId,
recorded_source: {
session_id: "20260720T065719Z_viewer_live",
source_id: "sensor.camera.right",
input_sha256: "4".repeat(64),
synchronization: "host-arrival-best-effort",
},
image_width: 800,
image_height: 600,
timeline_start_seconds: start,
timeline_end_seconds: end,
frame_count: 4489,
frames,
review_windows: [{
id: "dynamic-person-window",
kind: "target-motion",
class_group: "person",
start_seconds: 54,
end_seconds: 62,
target_source_track_ids: [83],
}],
ground_truth: false,
access: "read-only-full-route-diagnostic-video",
}), { status: 200, headers: { "Content-Type": "application/json" } });
};
const overlay = await fetchE46CVideoOverlay(resultId, { fetcher });
assert.equal(overlay.frameCount, 4489);
assert.equal(overlay.recordedSourceSessionId, "20260720T065719Z_viewer_live");
assert.equal(overlay.frames[20].objects[0].routeTrackId, 83);
assert.equal(overlay.frames[20].objects[0].displayCategory, "Человек");
assert.equal(overlay.reviewWindows[0].targetSourceTrackIds[0], 83);
assert.equal(JSON.stringify(overlay).includes("/Users/"), false);
assert.equal(selectE46CVideoFrame(overlay.frames, overlay.frames[20].sessionSeconds).frameIndex, 20);
});
test("E46C viewer opens with full VIDEO and reuses the admitted recorded player", async () => {
const [visual, videoScene, player] = await Promise.all([
readFile(
new URL(
"../src/workspaces/laboratory/E46CFullReplayWorldTracksVisual.tsx",
import.meta.url,
),
"utf8",
),
readFile(
new URL(
"../src/workspaces/laboratory/E46CRecordedVideoScene.tsx",
import.meta.url,
),
"utf8",
),
readFile(new URL("../src/components/RecordedFmp4Player.tsx", import.meta.url), "utf8"),
]);
assert.match(visual, /useState<E46CViewMode>\("video"\)/);
assert.match(visual, /\{ value: "video", label: "VIDEO" \}/);
assert.match(visual, /replayObservationSession\(overlay\.recordedSourceSessionId/);
assert.match(videoScene, /<RecordedFmp4Player/);
assert.match(videoScene, /selectE46CVideoFrame/);
assert.match(player, /requestVideoFrameCallback/);
assert.match(player, /controls=\{interactive\}/);
});
@@ -0,0 +1,122 @@
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
import test, { after, before } from "node:test";
import { createServer } from "vite";
let server;
let fetchE46DTemporalFailureAudit;
before(async () => {
server = await createServer({
server: { middlewareMode: true },
appType: "custom",
logLevel: "silent",
});
({ fetchE46DTemporalFailureAudit } = await server.ssrLoadModule(
"/src/core/laboratory/e46dTemporalFailureAudit.ts",
));
});
after(async () => {
await server?.close();
});
test("E46D decodes ranked temporal clips without filesystem paths", async () => {
const e46dId = `e46d-temporal-failure-audit-${"a".repeat(64)}`;
const e46cId = `e46c-full-replay-world-tracks-${"b".repeat(64)}`;
const e26Id = `e10-integrated-perception-${"c".repeat(64)}`;
const clip = {
schema_version: "missioncore.e46d-temporal-review-clip/v1",
clip_id: `e46d-clip-01-${"d".repeat(20)}`,
rank: 1,
priority: "critical",
kind: "layer-blackout",
signal_id: `e46d-signal-${"d".repeat(20)}`,
start_seconds: 472.7,
event_start_seconds: 474.7,
event_end_seconds: 475.6,
end_seconds: 477.6,
start_frame: 4396,
end_frame: 4405,
route_track_ids: [1584, 1615],
world_track_ids: [],
evidence: {
before_object_count: 10,
minimum_object_count: 0,
after_object_count: 9,
duration_seconds: 1,
zero_frame_count: 10,
},
};
const metrics = {
route_frame_count: 4489,
route_span_seconds: 448.623,
object_observation_count: 20513,
route_track_count: 1461,
zero_object_frame_count: 600,
zero_object_frame_fraction: 0.133660058,
camera_held_observation_count: 5371,
camera_held_observation_fraction: 0.261833959,
detector_hold_episode_count: 785,
layer_blackout_episode_count: 71,
route_layer_gap_episode_count: 964,
route_id_rebirth_candidate_count: 11,
bbox_jump_episode_count: 3,
motion_state_flap_episode_count: 88,
world_binding_flap_episode_count: 238,
short_route_track_count: 572,
short_route_track_fraction: 0.391512663,
short_track_burst_episode_count: 48,
failure_signal_count: 2208,
review_clip_count: 1,
temporal_continuity_passed: false,
};
const fetcher = async () => new Response(JSON.stringify({
schema_version: "missioncore.e46d-temporal-failure-audit-catalog/v1",
items: [{
schema_version: "missioncore.e46d-temporal-failure-audit-view/v1",
result_id: e46dId,
created_at_utc: "2026-08-04T08:00:00Z",
source_e46c_result_id: e46cId,
source_e26_result_id: e26Id,
metrics,
acceptance: {
full_route_accounted: true,
temporal_continuity_passed: false,
independent_truth_available: false,
navigation_or_safety_accepted: false,
},
decision: {
temporal_regression_confirmed: true,
detector_gap_visible: true,
route_fragmentation_visible: true,
world_binding_instability_visible: true,
next_action: "rerun A/B",
},
limitations: ["diagnostic, not truth"],
review_clips: [clip],
ground_truth: false,
}],
}), { status: 200, headers: { "Content-Type": "application/json" } });
const result = await fetchE46DTemporalFailureAudit({ fetcher });
assert.equal(result.resultId, e46dId);
assert.equal(result.metrics.layerBlackoutEpisodeCount, 71);
assert.equal(result.reviewClips[0].kind, "layer-blackout");
assert.equal(result.reviewClips[0].evidence.before_object_count, 10);
assert.doesNotMatch(JSON.stringify(result), /Users|runtime|\\/);
});
test("E46D reuses the admitted E46C video viewer and canonical LAB template", async () => {
const [resultView, videoView] = await Promise.all([
readFile(new URL("../src/workspaces/laboratory/E46DTemporalFailureAuditResult.tsx", import.meta.url), "utf8"),
readFile(new URL("../src/workspaces/laboratory/E46CFullReplayWorldTracksVisual.tsx", import.meta.url), "utf8"),
]);
assert.match(resultView, /LaboratorySummary/);
assert.match(resultView, /LaboratoryEvidence/);
assert.match(resultView, /LaboratoryResultSummary/);
assert.match(resultView, /E46CFullReplayWorldTracksVisual/);
assert.match(resultView, /auditWindows=/);
assert.match(videoView, /автоматически найденному эпизоду E46D/);
assert.match(videoView, /RecordedVideoScene/);
});
@@ -0,0 +1,113 @@
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
import test, { after, before } from "node:test";
import { createServer } from "vite";
let server;
let fetchE46EReadyStack;
before(async () => {
server = await createServer({
server: { middlewareMode: true },
appType: "custom",
logLevel: "silent",
});
({ fetchE46EReadyStack } = await server.ssrLoadModule(
"/src/core/laboratory/e46eReadyStack.ts",
));
});
after(async () => {
await server?.close();
});
test("E46E admits a stock full-replay result and its immutable video", async () => {
const resultId = `e46e-ready-stack-${"a".repeat(64)}`;
const identity = "b".repeat(64);
const fetcher = async () => new Response(JSON.stringify({
schema_version: "missioncore.e46e-ready-stack-catalog/v1",
items: [{
schema_version: "missioncore.e46e-ready-stack-view/v1",
result_id: resultId,
created_at_utc: "2026-08-04T09:00:00Z",
source_session_id: "20260720T065719Z_viewer_live",
camera_source_id: "sensor.camera.right",
metrics: {
frame_count: 4489,
route_duration_seconds: 448.623,
detection_observation_count: 12000,
track_observation_count: 12500,
detection_box_clipped_count: 0,
track_box_clipped_count: 488,
unique_track_count: 700,
mean_tracked_objects_per_frame: 2.784,
zero_detection_frame_count: 100,
zero_track_frame_count: 40,
tracker_recovered_frame_count: 80,
full_layer_blackout_event_count: 3,
route_id_gap_event_count: 20,
short_track_count: 100,
short_track_fraction: 0.142857,
track_class_switch_count: 2,
},
acceptance: {
full_route_accounted: true,
stock_detector_tracker_executed: true,
visual_overlay_available: true,
independent_truth_available: false,
navigation_or_safety_accepted: false,
},
decision: {
ready_stack_baseline_available: true,
custom_temporal_logic_used: false,
next_action: "compare A/B",
},
method: {
schema_version: "missioncore.laboratory-method/v1",
completeness: "complete",
execution_class: "hybrid",
pipeline_id: "e46e-ready-stack/v1",
components: [{
kind: "model",
name: "TrafficCamNet Transformer Lite",
version: "deployable_resnet50_v2.0",
role: "traffic detector",
identity_sha256: identity,
}],
},
limitations: ["not independent truth"],
video: {
url: `${resultId}/overlay.mp4`,
media_type: "video/mp4",
byte_length: 123456,
sha256: identity,
width: 800,
height: 600,
},
ground_truth: false,
}],
}), { status: 200, headers: { "Content-Type": "application/json" } });
const result = await fetchE46EReadyStack({ fetcher });
assert.equal(result.resultId, resultId);
assert.equal(result.metrics.frameCount, 4489);
assert.equal(result.metrics.trackerRecoveredFrameCount, 80);
assert.equal(result.metrics.trackBoxClippedCount, 488);
assert.equal(result.decision.customTemporalLogicUsed, false);
assert.equal(result.method.components[0].identitySha256, identity);
assert.equal(result.video.sha256, identity);
assert.doesNotMatch(JSON.stringify(result), /Users|D:\\|runtime\/experiments/);
});
test("E46E uses the fixed LAB anatomy and reusable evidence viewer", async () => {
const [resultView, visual] = await Promise.all([
readFile(new URL("../src/workspaces/laboratory/E46EReadyStackResult.tsx", import.meta.url), "utf8"),
readFile(new URL("../src/workspaces/laboratory/E46EReadyStackVisual.tsx", import.meta.url), "utf8"),
]);
assert.match(resultView, /LaboratorySummary/);
assert.match(resultView, /LaboratoryEvidence/);
assert.match(resultView, /LaboratoryResultSummary/);
assert.match(visual, /LaboratoryEvidenceViewer/);
assert.match(visual, /<video/);
assert.match(visual, /controls/);
});
@@ -0,0 +1,155 @@
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
import test, { after, before } from "node:test";
import { createServer } from "vite";
let server;
let fetchE46FDashCamBakeoff;
before(async () => {
server = await createServer({
server: { middlewareMode: true },
appType: "custom",
logLevel: "silent",
});
({ fetchE46FDashCamBakeoff } = await server.ssrLoadModule(
"/src/core/laboratory/e46fDashCamBakeoff.ts",
));
});
after(async () => {
await server?.close();
});
function metrics(overrides = {}) {
return {
frame_count: 4489,
route_duration_seconds: 458.713353,
detection_observation_count: 23478,
track_observation_count: 24937,
detection_box_clipped_count: 0,
track_box_clipped_count: 1630,
unique_track_count: 545,
mean_tracked_objects_per_frame: 5.555135,
zero_detection_frame_count: 39,
zero_track_frame_count: 25,
tracker_recovered_frame_count: 29,
full_layer_blackout_event_count: 1,
route_id_gap_event_count: 0,
short_track_count: 37,
short_track_fraction: 0.06789,
track_class_switch_count: 0,
...overrides,
};
}
test("E46F preserves temporal gains but admits the semantic rejection", async () => {
const resultId = `e46f-dashcam-bakeoff-${"a".repeat(64)}`;
const baselineId = `e46e-ready-stack-${"b".repeat(64)}`;
const identity = "c".repeat(64);
const fetcher = async () => new Response(JSON.stringify({
schema_version: "missioncore.e46f-dashcam-bakeoff-catalog/v1",
items: [{
schema_version: "missioncore.e46f-dashcam-bakeoff-view/v1",
result_id: resultId,
created_at_utc: "2026-08-04T09:00:00Z",
source_session_id: "20260720T065719Z_viewer_live",
camera_source_id: "sensor.camera.right",
metrics: metrics(),
acceptance: {
full_route_accounted: true,
stock_detector_tracker_executed: true,
controlled_detector_only_change: true,
visual_overlay_available: true,
independent_truth_available: false,
navigation_or_safety_accepted: false,
},
method: {
schema_version: "missioncore.laboratory-method/v1",
completeness: "complete",
execution_class: "hybrid",
pipeline_id: "e46f-deepstream-dashcamnet-detectnet-v2-nvdcf/v1",
components: [{
kind: "model",
name: "NVIDIA DashCamNet",
version: "pruned_onnx_v1.0.4",
role: "moving-camera traffic-object detection",
identity_sha256: identity,
}],
},
limitations: ["not independent truth"],
comparison: {
controlled_change: "detector-only",
baseline_result_id: baselineId,
baseline_metrics: metrics({
unique_track_count: 909,
zero_track_frame_count: 28,
full_layer_blackout_event_count: 2,
short_track_fraction: 0.093509,
}),
delta: {
zero_track_frame_count: -3,
full_layer_blackout_event_count: -1,
unique_track_count: -364,
short_track_fraction: -0.025619,
},
large_box_visual_triage: {
area_ratio_threshold: 0.2,
candidate: {
observation_count: 2912,
frame_count: 2173,
track_id_count: 23,
class_observations: { person: 2912 },
},
baseline: {
observation_count: 191,
frame_count: 191,
track_id_count: 4,
class_observations: { car: 191 },
},
interpretation: "diagnostic visual triage; not precision/recall",
},
visual_review: {
status: "rejected-semantic-regression",
sample_video_seconds: [4.2, 9, 22, 44, 264, 418],
finding: "fisheye rim becomes huge person tracks",
next_action: "rectify valid FOV and repeat A/B",
},
verdict: "reject-dashcamnet-on-unrectified-fisheye",
},
video: {
url: `/api/v1/laboratory/e46f/results/${resultId}/overlay.mp4`,
media_type: "video/mp4",
byte_length: 150513080,
sha256: identity,
width: 800,
height: 600,
},
ground_truth: false,
}],
}), { status: 200, headers: { "Content-Type": "application/json" } });
const result = await fetchE46FDashCamBakeoff({ fetcher });
assert.equal(result.resultId, resultId);
assert.equal(result.comparison.verdict, "reject-dashcamnet-on-unrectified-fisheye");
assert.equal(result.comparison.delta.zeroTrackFrameCount, -3);
assert.equal(result.comparison.largeBoxVisualTriage.candidate.observationCount, 2912);
assert.equal(result.comparison.visualReview.status, "rejected-semantic-regression");
assert.equal(result.acceptance.navigationOrSafetyAccepted, false);
assert.equal(result.video.sha256, identity);
assert.doesNotMatch(JSON.stringify(result), /Users|D:\\|runtime\/experiments/);
});
test("E46F uses the fixed LAB anatomy and exposes the frozen full video", async () => {
const [resultView, visual] = await Promise.all([
readFile(new URL("../src/workspaces/laboratory/E46FDashCamBakeoffResult.tsx", import.meta.url), "utf8"),
readFile(new URL("../src/workspaces/laboratory/E46EReadyStackVisual.tsx", import.meta.url), "utf8"),
]);
assert.match(resultView, /LaboratorySummary/);
assert.match(resultView, /LaboratoryEvidence/);
assert.match(resultView, /LaboratoryResultSummary/);
assert.match(resultView, /semantic regression/);
assert.match(visual, /LaboratoryEvidenceViewer/);
assert.match(visual, /<video/);
assert.match(visual, /controls/);
});
@@ -0,0 +1,182 @@
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
import test, { after, before } from "node:test";
import { createServer } from "vite";
let server;
let fetchE46GRectifiedDetectorBakeoff;
before(async () => {
server = await createServer({
server: { middlewareMode: true },
appType: "custom",
logLevel: "silent",
});
({ fetchE46GRectifiedDetectorBakeoff } = await server.ssrLoadModule(
"/src/core/laboratory/e46gRectifiedDetectorBakeoff.ts",
));
});
after(async () => {
await server?.close();
});
function viewMetrics(overrides = {}) {
return {
frame_count: 600,
detection_observation_count: 1200,
track_observation_count: 1300,
unique_track_count: 40,
mean_tracked_objects_per_frame: 2.166667,
zero_detection_frame_count: 4,
zero_track_frame_count: 2,
full_layer_blackout_event_count: 1,
short_track_fraction: 0.1,
large_track_observation_count: 3,
large_track_fraction: 0.002308,
...overrides,
};
}
function candidateMetrics(front) {
return {
source_frame_count: 600,
view_frame_count: 1800,
detection_observation_count: 3000,
track_observation_count: 3500,
unique_track_count: 80,
large_track_observation_count: 400,
large_track_fraction: 0.114286,
views: {
left: viewMetrics({ large_track_observation_count: 200 }),
front,
right: viewMetrics({ large_track_observation_count: 197 }),
},
};
}
test("E46G selects TrafficCamNet FRONT without granting perception authority", async () => {
const resultId = `e46g-rectified-detector-bakeoff-${"a".repeat(64)}`;
const identity = "b".repeat(64);
const video = (candidate) => ({
url: `/api/v1/laboratory/e46g/results/${resultId}/${candidate}.mp4`,
media_type: "video/mp4",
byte_length: 42_000_000,
sha256: identity,
width: 2880,
height: 544,
duration_seconds: 60,
view_order: ["left", "front", "right"],
});
const fetcher = async () => new Response(JSON.stringify({
schema_version: "missioncore.e46g-rectified-detector-bakeoff-catalog/v1",
items: [{
schema_version: "missioncore.e46g-rectified-detector-bakeoff-view/v1",
result_id: resultId,
created_at_utc: "2026-08-04T13:28:23.707Z",
source_session_id: "20260720T065719Z_viewer_live",
camera_source_id: "sensor.camera.right",
status: "selected-for-next-diagnostic-full-route",
selection: {
first_source_frame_index: 1000,
last_source_frame_index: 1599,
frame_count: 600,
},
rectification: {
provider: "NVIDIA Gst-nvdewarper",
provider_version: "DeepStream 9.1",
output_resolution: [960, 544],
horizontal_fov_degrees: 100,
retained_source_frame_index_range: [0, 4487],
excluded_source_tail_frame_count: 1,
view_order: ["left", "front", "right"],
},
metrics: {
trafficcamnet: candidateMetrics(viewMetrics({
track_observation_count: 4034,
zero_track_frame_count: 0,
})),
dashcamnet: candidateMetrics(viewMetrics({
track_observation_count: 1436,
zero_track_frame_count: 34,
})),
},
acceptance: {
exact_recorded_right_source_bound: true,
factory_calibration_bound: true,
official_nvidia_dewarper_executed: true,
stock_detector_tracker_executed: true,
same_views_and_frames_for_both_candidates: true,
visual_comparison_videos_available: true,
independent_truth_available: false,
candidate_accepted: false,
navigation_or_safety_accepted: false,
},
method: {
schema_version: "missioncore.laboratory-method/v1",
completeness: "complete",
execution_class: "hybrid",
pipeline_id: "e46g-k1-right-kb4-nvdewarper-ready-detector-bakeoff/v1",
components: [{
kind: "tool",
name: "XGRIDS K1 factory camera_1 KB4",
version: "KB4",
role: "fisheye source geometry",
identity_sha256: identity,
}],
},
limitations: ["not independent truth"],
comparison: {
visual_review: {
status: "selected-for-next-diagnostic",
reviewed_video_seconds: [0, 10, 20, 30, 40, 50],
selected_candidate: "trafficcamnet",
selected_view: "front",
excluded_views: ["left", "right"],
finding: "TrafficCamNet keeps more visible vehicles and people.",
risk: "Duplicate boxes remain and side views contain the camera mount.",
next_action: "Run complete FRONT replay.",
},
verdict: "select-trafficcamnet-front-only-for-e46h",
},
videos: {
trafficcamnet: video("trafficcamnet"),
dashcamnet: video("dashcamnet"),
},
ground_truth: false,
authority: {
ground_truth: false,
independent_truth: false,
metric_grade_reference: false,
candidate_accepted: false,
free_space_authority: false,
commands_enabled: false,
navigation_or_safety_accepted: false,
},
}],
}), { status: 200, headers: { "Content-Type": "application/json" } });
const result = await fetchE46GRectifiedDetectorBakeoff({ fetcher });
assert.equal(result.comparison.visualReview.selectedCandidate, "trafficcamnet");
assert.equal(result.comparison.visualReview.selectedView, "front");
assert.deepEqual(result.comparison.visualReview.excludedViews, ["left", "right"]);
assert.equal(result.metrics.trafficcamnet.views.front.zeroTrackFrameCount, 0);
assert.equal(result.metrics.dashcamnet.views.front.zeroTrackFrameCount, 34);
assert.equal(result.acceptance.candidateAccepted, false);
assert.doesNotMatch(JSON.stringify(result), /Users|D:\\|runtime\/experiments/);
});
test("E46G uses the fixed LAB anatomy and switches immutable comparison videos", async () => {
const [resultView, visual] = await Promise.all([
readFile(new URL("../src/workspaces/laboratory/E46GRectifiedDetectorBakeoffResult.tsx", import.meta.url), "utf8"),
readFile(new URL("../src/workspaces/laboratory/E46GRectifiedDetectorBakeoffVisual.tsx", import.meta.url), "utf8"),
]);
assert.match(resultView, /LaboratorySummary/);
assert.match(resultView, /LaboratoryEvidence/);
assert.match(resultView, /LaboratoryResultSummary/);
assert.match(resultView, /TrafficCamNet FRONT only/);
assert.match(visual, /LaboratoryEvidenceViewer/);
assert.match(visual, /TRAFFICCAMNET/);
assert.match(visual, /DASHCAMNET/);
assert.match(visual, /<video/);
});
@@ -0,0 +1,171 @@
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
import test, { after, before } from "node:test";
import { createServer } from "vite";
let server;
let fetchE46HFullRectifiedFrontReplay;
before(async () => {
server = await createServer({
server: { middlewareMode: true },
appType: "custom",
logLevel: "silent",
});
({ fetchE46HFullRectifiedFrontReplay } = await server.ssrLoadModule(
"/src/core/laboratory/e46hFullRectifiedFrontReplay.ts",
));
});
after(async () => {
await server?.close();
});
test("E46H binds the full FRONT video to five semantic failures without promotion", async () => {
const resultId = `e46h-full-rectified-front-replay-${"a".repeat(64)}`;
const identity = "b".repeat(64);
const reviewWindows = [
["wall", 6, 10.9, 6, "semantic-false-positive"],
["shrub", 178.6, 180.3, 371, "semantic-false-positive"],
["ground", 250.7, 265.6, 481, "semantic-false-positive"],
["road", 392.2, 400.6, 822, "semantic-false-positive"],
["empty", 419.4, 426.9, null, "empty-scene-expected"],
["terrace", 440.8, 448.4, 927, "semantic-false-positive"],
].map(([id, start, end, track, verdict]) => ({
id,
label: `${start}–${end}`,
start_seconds: start,
end_seconds: end,
source_track_id: track,
verdict,
}));
const payload = {
schema_version: "missioncore.e46h-full-rectified-front-replay-catalog/v1",
items: [{
schema_version: "missioncore.e46h-full-rectified-front-replay-view/v1",
result_id: resultId,
created_at_utc: "2026-08-04T14:17:42.899Z",
source_session_id: "20260720T065719Z_viewer_live",
camera_source_id: "sensor.camera.right",
status: "diagnostic-regression-large-semantic-false-tracks",
baseline_result_id: `e46g-rectified-detector-bakeoff-${"c".repeat(64)}`,
selection: {
first_source_frame_index: 0,
last_source_frame_index: 4487,
frame_count: 4488,
excluded_source_tail_frame_count: 1,
},
rectification: {
provider: "NVIDIA Gst-nvdewarper",
provider_version: "DeepStream 9.1",
projection: "fisheye-to-perspective",
view: "front",
output_resolution: [960, 544],
horizontal_fov_degrees: 100,
},
metrics: {
frame_count: 4488,
route_duration_seconds: 453.566029,
detection_observation_count: 26782,
track_observation_count: 30634,
unique_track_count: 942,
mean_tracked_objects_per_frame: 6.825758,
zero_detection_frame_count: 46,
zero_track_frame_count: 70,
tracker_recovered_frame_count: 2,
full_layer_blackout_event_count: 2,
route_id_gap_event_count: 0,
short_track_count: 91,
short_track_fraction: 0.096603,
track_class_switch_count: 0,
large_track_observation_count: 278,
large_track_fraction: 0.009075,
},
acceptance: {
exact_recorded_right_source_bound: true,
factory_calibration_bound: true,
official_nvidia_dewarper_executed: true,
selected_stock_detector_tracker_executed: true,
retained_route_accounted: true,
terminal_source_frame_excluded: true,
full_visual_review_completed: false,
independent_truth_available: false,
candidate_accepted: false,
navigation_or_safety_accepted: false,
},
decision: {
selected_provider: "front-trafficcamnet-stock-nvdcf",
custom_detector_or_tracker_logic_used: false,
provider_promoted: false,
next_action: "compare another ready provider",
},
method: {
schema_version: "missioncore.laboratory-method/v1",
completeness: "complete",
execution_class: "hybrid",
pipeline_id: "e46h-right-kb4-front-trafficcamnet-full-replay/v1",
components: [{
kind: "model",
name: "NVIDIA TrafficCamNet",
version: "2.0",
role: "ready detector",
identity_sha256: identity,
}],
},
limitations: ["not truth"],
visual_review: {
status: "full-continuous-and-targeted-review-completed",
complete_video_reviewed: true,
reviewed_video_range_seconds: [0, 448.8],
verdict: "useful-front-continuity-but-semantic-regression-blocks-promotion",
review_windows: reviewWindows,
finding: "five large false semantic tracks",
blackout_interpretation: "empty scene",
next_action: "compare another ready provider",
},
video: {
url: `/api/v1/laboratory/e46h/results/${resultId}/overlay.mp4`,
media_type: "video/mp4",
byte_length: 336027470,
sha256: identity,
width: 960,
height: 544,
duration_seconds: 448.8,
},
ground_truth: false,
authority: {
ground_truth: false,
independent_truth: false,
candidate_accepted: false,
commands_enabled: false,
navigation_or_safety_accepted: false,
},
}],
};
const result = await fetchE46HFullRectifiedFrontReplay({
fetcher: async () => new Response(JSON.stringify(payload), {
status: 200,
headers: { "Content-Type": "application/json" },
}),
});
assert.equal(result.metrics.frameCount, 4488);
assert.equal(result.visualReview.reviewWindows.length, 6);
assert.equal(result.visualReview.reviewWindows.filter(({ verdict }) => verdict === "semantic-false-positive").length, 5);
assert.equal(result.acceptance.candidateAccepted, false);
assert.equal(result.decision.providerPromoted, false);
assert.doesNotMatch(JSON.stringify(result), /Users|D:\\|runtime\/experiments/);
});
test("E46H uses the fixed LAB anatomy and a seekable full video navigator", async () => {
const [resultView, visual] = await Promise.all([
readFile(new URL("../src/workspaces/laboratory/E46HFullRectifiedFrontReplayResult.tsx", import.meta.url), "utf8"),
readFile(new URL("../src/workspaces/laboratory/E46HFullRectifiedFrontReplayVisual.tsx", import.meta.url), "utf8"),
]);
assert.match(resultView, /LaboratorySummary/);
assert.match(resultView, /LaboratoryEvidence/);
assert.match(resultView, /LaboratoryResultSummary/);
assert.match(resultView, /448,8/);
assert.match(visual, /LaboratoryEvidenceViewer/);
assert.match(visual, /reviewWindows/);
assert.match(visual, /<video/);
});
@@ -0,0 +1,169 @@
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
import test, { after, before } from "node:test";
import { createServer } from "vite";
let server;
let fetchE46JRawFisheyeRealtime;
before(async () => {
server = await createServer({
server: { middlewareMode: true },
appType: "custom",
logLevel: "silent",
});
({ fetchE46JRawFisheyeRealtime } = await server.ssrLoadModule(
"/src/core/laboratory/e46jRawFisheyeRealtime.ts",
));
});
after(async () => {
await server?.close();
});
test("E46J binds full raw fisheye capacity to an honest visual exception", async () => {
const identity = "b".repeat(64);
const resultId = `e46j-raw-fisheye-realtime-${"a".repeat(64)}`;
const payload = {
schema_version: "missioncore.e46j-raw-fisheye-realtime-catalog/v1",
items: [{
schema_version: "missioncore.e46j-raw-fisheye-realtime-view/v1",
result_id: resultId,
created_at_utc: "2026-08-04T18:20:00.000Z",
status: "realtime-capacity-passed-awaiting-temporal-layer",
source: {
camera_source_id: "sensor.camera.right",
session_id: "20260720T065719Z_viewer_live",
resolution: [800, 600],
frame_count: 4489,
frame_rate: 10.003944527024467,
calibration_model: "KB4",
},
detector: {
architecture: "YOLOX-S",
source: "Megvii-BaseDetection/YOLOX release 0.1.1rc0",
license: "Apache-2.0",
runtime: "NVIDIA Triton 2.70.0 ONNX Runtime GPU backend",
},
detection: { minimum_score: 0.5, nms_iou_threshold: 0.45 },
metrics: {
frame_count: 4489,
failed_frame_count: 0,
detection_observation_count: 15499,
class_observation_counts: { car: 14229, person: 625, truck: 608 },
mean_detections_per_frame: 3.452662,
max_detections_per_frame: 9,
zero_detection_frame_count: 181,
longest_zero_detection_run_frames: 24,
core_capacity_fps: 47.84049,
core_path_mean_ms: 20.902796,
core_path_p95_ms: 25.355265,
inference_request_mean_ms: 12.437504,
inference_request_p95_ms: 16.414979,
gpu_utilization_mean_percent: 26.396947,
operator_shadow_window_frame_count: 75,
operator_shadow_person_frame_count: 35,
},
visual_review: {
reviewed_video_range_seconds: [0, 448.723],
verdict: "realtime-detector-progress-with-known-shadow-exception",
review_windows: [
["wall", 6, 10.9, "legacy-background-false-positive-suppressed"],
["shrub", 178.6, 180.3, "legacy-background-false-positive-suppressed"],
["ground", 250.7, 265.6, "legacy-background-false-positive-suppressed"],
["road", 392.2, 400.6, "legacy-background-false-positive-suppressed"],
["shadow", 419.4, 426.9, "operator-shadow-person-false-positive-observed"],
["terrace", 440.8, 448.4, "legacy-background-false-positive-suppressed"],
].map(([id, start, end, verdict]) => ({
id,
label: `${start}–${end}`,
start_seconds: start,
end_seconds: end,
verdict,
})),
finding: "full raw fisheye retained",
known_error: "operator shadow becomes person",
},
acceptance: {
ten_hz_capacity_gate_passed: true,
latency_gate_passed: true,
full_raw_fisheye_retained: true,
},
decision: {
selected_provider: "megvii-yolox-s-0.1.1rc0",
realtime_capacity_passed: true,
ready_for_temporal_bakeoff: true,
provider_promoted: false,
next_action: "attach ready temporal tracker",
},
method: {
schema_version: "missioncore.laboratory-method/v1",
completeness: "complete",
execution_class: "hybrid",
pipeline_id: "e46j-k1-right-raw-kb4-yolox-s-one-pass/v1",
components: [{
kind: "model",
name: "YOLOX-S",
version: "0.1.1rc0",
role: "ready detector",
identity_sha256: identity,
}],
},
limitations: ["not truth", "no temporal identity"],
video: {
url: `/api/v1/laboratory/e46j/results/${resultId}/overlay.mp4`,
media_type: "video/mp4",
byte_length: 150563706,
sha256: identity,
width: 800,
height: 600,
frame_rate: 10.003944527024467,
frame_count: 4489,
duration_seconds: 448.723,
},
visuals: Object.fromEntries(
["full_route", "targeted_windows", "operator_shadow"].map((key) => [key, {
url: `/visual/${key}.png`,
media_type: "image/png",
byte_length: 1000,
sha256: identity,
}]),
),
ground_truth: false,
authority: {
ground_truth: false,
provider_promoted: false,
commands_enabled: false,
navigation_or_safety_accepted: false,
},
}],
};
const result = await fetchE46JRawFisheyeRealtime({
fetcher: async () => new Response(JSON.stringify(payload), {
status: 200,
headers: { "Content-Type": "application/json" },
}),
});
assert.equal(result.source.frameCount, 4489);
assert.equal(result.source.resolution.join("x"), "800x600");
assert.equal(result.metrics.coreCapacityFps, 47.84049);
assert.equal(result.metrics.operatorShadowPersonFrameCount, 35);
assert.equal(result.visualReview.reviewWindows.length, 6);
assert.equal(result.decision.providerPromoted, false);
assert.doesNotMatch(JSON.stringify(result), /Users|D:\\|runtime\/experiments/);
});
test("E46J uses the fixed LAB anatomy and seekable full video", async () => {
const [resultView, visual] = await Promise.all([
readFile(new URL("../src/workspaces/laboratory/E46JRawFisheyeRealtimeResult.tsx", import.meta.url), "utf8"),
readFile(new URL("../src/workspaces/laboratory/E46JRawFisheyeRealtimeVisual.tsx", import.meta.url), "utf8"),
]);
assert.match(resultView, /LaboratorySummary/);
assert.match(resultView, /LaboratoryEvidence/);
assert.match(resultView, /LaboratoryResultSummary/);
assert.match(resultView, /full raw fisheye realtime gate/);
assert.match(visual, /LaboratoryEvidenceViewer/);
assert.match(visual, /operator-shadow/);
assert.match(visual, /<video/);
assert.match(visual, /\[mode, selectedWindow\]/);
});
@@ -46,6 +46,122 @@ const e40CaseReviewUrl = new URL(
"../src/workspaces/laboratory/E40CaseReview.tsx",
import.meta.url,
);
const l34ResultUrl = new URL(
"../src/workspaces/laboratory/L34RightYoloxTruthIslandResult.tsx",
import.meta.url,
);
const l34VisualUrl = new URL(
"../src/workspaces/laboratory/L34RightYoloxTruthIslandVisual.tsx",
import.meta.url,
);
const l34SceneUrl = new URL(
"../src/workspaces/laboratory/L34RightYoloxTruthIslandScene.tsx",
import.meta.url,
);
const l34aResultUrl = new URL(
"../src/workspaces/laboratory/L34AAssistedYoloxErrorResult.tsx",
import.meta.url,
);
const l34aVisualUrl = new URL(
"../src/workspaces/laboratory/L34AAssistedYoloxErrorVisual.tsx",
import.meta.url,
);
const l34aSceneUrl = new URL(
"../src/workspaces/laboratory/L34AAssistedYoloxErrorScene.tsx",
import.meta.url,
);
const l34bResultUrl = new URL(
"../src/workspaces/laboratory/L34BNestedBoxConsolidationResult.tsx",
import.meta.url,
);
const l34bVisualUrl = new URL(
"../src/workspaces/laboratory/L34BNestedBoxConsolidationVisual.tsx",
import.meta.url,
);
const l34bSceneUrl = new URL(
"../src/workspaces/laboratory/L34BNestedBoxConsolidationScene.tsx",
import.meta.url,
);
const l34cResultUrl = new URL(
"../src/workspaces/laboratory/L34CTileSeamStitchResult.tsx",
import.meta.url,
);
const l34cVisualUrl = new URL(
"../src/workspaces/laboratory/L34CTileSeamStitchVisual.tsx",
import.meta.url,
);
const l34cSceneUrl = new URL(
"../src/workspaces/laboratory/L34CTileSeamStitchScene.tsx",
import.meta.url,
);
const l34dResultUrl = new URL(
"../src/workspaces/laboratory/L34DCumulativePostprocessingResult.tsx",
import.meta.url,
);
const l34dVisualUrl = new URL(
"../src/workspaces/laboratory/L34DCumulativePostprocessingVisual.tsx",
import.meta.url,
);
const l34dSceneUrl = new URL(
"../src/workspaces/laboratory/L34DCumulativePostprocessingScene.tsx",
import.meta.url,
);
const l34eResultUrl = new URL(
"../src/workspaces/laboratory/L34ESelfReviewDiagnosticResult.tsx",
import.meta.url,
);
const l34eVisualUrl = new URL(
"../src/workspaces/laboratory/L34ESelfReviewDiagnosticVisual.tsx",
import.meta.url,
);
const l34eSceneUrl = new URL(
"../src/workspaces/laboratory/L34ESelfReviewDiagnosticScene.tsx",
import.meta.url,
);
const l34AnnotationWorkspaceUrl = new URL(
"../src/workspaces/laboratory/annotation/L34AnnotationWorkspace.tsx",
import.meta.url,
);
const l34AnnotationCanvasUrl = new URL(
"../src/workspaces/laboratory/annotation/L34AnnotationCanvas.tsx",
import.meta.url,
);
const l34AnnotationCapabilityUrl = new URL(
"../src/workspaces/laboratory/annotation/useL34AnnotationCapability.tsx",
import.meta.url,
);
const l34AnnotationCoreUrl = new URL(
"../src/core/laboratory/l34Annotation.ts",
import.meta.url,
);
const l34FWorkspaceUrl = new URL(
"../src/workspaces/laboratory/annotation/L34FAdjudicationWorkspace.tsx",
import.meta.url,
);
const l34FCoreUrl = new URL(
"../src/core/laboratory/l34fAdjudication.ts",
import.meta.url,
);
const l34FResultUrl = new URL(
"../src/workspaces/laboratory/L34FAdjudicatedReferenceResult.tsx",
import.meta.url,
);
const l34AnnotationStylesUrl = new URL(
"../src/styles/l34-annotation.css",
import.meta.url,
);
const e46ResultUrl = new URL(
"../src/workspaces/laboratory/E46BlindReviewResult.tsx",
import.meta.url,
);
const e46VisualUrl = new URL(
"../src/workspaces/laboratory/E46BlindReviewVisual.tsx",
import.meta.url,
);
const e46CoreUrl = new URL(
"../src/core/laboratory/e46BlindReview.ts",
import.meta.url,
);
const l3ResultUrl = new URL(
"../src/workspaces/laboratory/L3PointPillarsResult.tsx",
import.meta.url,
@@ -179,11 +295,12 @@ test("bounded LAB result modules use the versioned shared report anatomy", async
});
test("L3 visual audit binds the sealed metrics to one lazy 3D/BEV viewer", async () => {
const [result, audit, scene, advanced] = await Promise.all([
const [result, audit, scene, advanced, profiles] = await Promise.all([
readFile(l3ResultUrl, "utf8"),
readFile(l3VisualAuditUrl, "utf8"),
readFile(l3SceneUrl, "utf8"),
readFile(advancedLaboratoryResultUrl, "utf8"),
readFile(laboratoryProfilesUrl, "utf8"),
]);
assert.match(result, /<LaboratoryWorkTemplate/);
@@ -198,10 +315,297 @@ test("L3 visual audit binds the sealed metrics to one lazy 3D/BEV viewer", async
assert.match(scene, /new THREE\.OrthographicCamera/);
assert.match(scene, /"false-positive"/);
assert.match(scene, /"false-negative"/);
assert.match(advanced, /id: "l3-pointpillars-visual-audit"/);
assert.match(profiles, /"l3-pointpillars-visual-audit"/);
assert.match(advanced, /<L3PointPillarsResult/);
});
test("L3.4 exposes exact right-camera frames and frozen boxes as primary evidence", async () => {
const [result, visual, scene] = await Promise.all([
readFile(l34ResultUrl, "utf8"),
readFile(l34VisualUrl, "utf8"),
readFile(l34SceneUrl, "utf8"),
]);
assert.match(result, /<L34RightYoloxTruthIslandVisual result=\{result\}/);
assert.match(result, /title="Правые кадры RAVNOVES00 и точные frozen YOLOX boxes"/);
assert.doesNotMatch(result, /<LaboratoryMetricGrid/);
assert.match(visual, /fetchL34RightYoloxTruthIslandFrame/);
assert.match(visual, /\{ value: "predictions", label: "BOXES" \}/);
assert.match(visual, /\{ value: "source", label: "SOURCE" \}/);
assert.match(visual, /searchable/);
assert.match(visual, /onExpandedChange=\{setExpanded\}/);
assert.match(scene, /context\.drawImage/);
assert.match(scene, /context\.strokeRect/);
assert.match(scene, /prediction\.bboxXyxy/);
assert.doesNotMatch(scene, /#[a-f0-9]{3,8}/i);
});
test("L3.4A keeps assisted metrics bound to a visual FP/FN audit", async () => {
const [result, visual, scene, profiles, advanced] = await Promise.all([
readFile(l34aResultUrl, "utf8"),
readFile(l34aVisualUrl, "utf8"),
readFile(l34aSceneUrl, "utf8"),
readFile(laboratoryProfilesUrl, "utf8"),
readFile(advancedLaboratoryResultUrl, "utf8"),
]);
assert.match(result, /<LaboratoryWorkTemplate/);
assert.match(result, /<LaboratorySummary/);
assert.match(result, /<LaboratoryEvidence/);
assert.match(result, /<LaboratoryResultSummary/);
assert.match(result, /не являются blind accuracy/);
assert.match(result, /L3\.5 остаётся закрыт/);
assert.match(visual, /fetchL34AAuditCase/);
assert.match(visual, /\{ value: "errors", label: "ERRORS" \}/);
assert.match(visual, /\{ value: "source", label: "SOURCE" \}/);
assert.match(visual, /onExpandedChange=\{setExpanded\}/);
assert.match(visual, /data-tone="fp"/);
assert.match(visual, /data-tone="fn"/);
assert.match(scene, /duplicate_false_positive/);
assert.match(scene, /class_mismatch/);
assert.match(scene, /context\.drawImage/);
assert.match(scene, /context\.strokeRect/);
assert.doesNotMatch(scene, /#[a-f0-9]{3,8}/i);
assert.match(profiles, /"l34a-assisted-yolox-error-audit"/);
assert.match(advanced, /<L34AAssistedYoloxErrorResultView/);
});
test("L3.4B binds the bounded shadow to BEFORE, AFTER and SOURCE", async () => {
const [result, visual, scene, profiles, advanced] = await Promise.all([
readFile(l34bResultUrl, "utf8"),
readFile(l34bVisualUrl, "utf8"),
readFile(l34bSceneUrl, "utf8"),
readFile(laboratoryProfilesUrl, "utf8"),
readFile(advancedLaboratoryResultUrl, "utf8"),
]);
assert.match(result, /<LaboratoryWorkTemplate/);
assert.match(result, /global IoU NMS не меняется/);
assert.match(result, /before\.predictionCount[\s\S]*after\.predictionCount/);
assert.match(visual, /fetchL34BCase/);
assert.match(visual, /\{ value: "after", label: "AFTER" \}/);
assert.match(visual, /\{ value: "before", label: "BEFORE" \}/);
assert.match(visual, /\{ value: "source", label: "SOURCE" \}/);
assert.match(visual, /onExpandedChange=\{setExpanded\}/);
assert.match(scene, /sourcePredictionIndices/);
assert.match(scene, /context\.drawImage/);
assert.match(scene, /context\.strokeRect/);
assert.doesNotMatch(scene, /#[a-f0-9]{3,8}/i);
assert.match(profiles, /"l34b-nested-box-consolidation-shadow"/);
assert.match(advanced, /<L34BNestedBoxConsolidationResultView/);
});
test("L3.4C binds exact tile provenance to temporal BEFORE, AFTER and SOURCE", async () => {
const [result, visual, scene, profiles, advanced] = await Promise.all([
readFile(l34cResultUrl, "utf8"),
readFile(l34cVisualUrl, "utf8"),
readFile(l34cSceneUrl, "utf8"),
readFile(laboratoryProfilesUrl, "utf8"),
readFile(advancedLaboratoryResultUrl, "utf8"),
]);
assert.match(result, /<LaboratoryWorkTemplate/);
assert.match(result, /exact-join/);
assert.match(result, /Глобальный NMS оставить неизменным/);
assert.match(visual, /fetchL34CCase/);
assert.match(visual, /\{ value: "after", label: "AFTER" \}/);
assert.match(visual, /\{ value: "before", label: "BEFORE" \}/);
assert.match(visual, /\{ value: "source", label: "SOURCE" \}/);
assert.match(visual, /onExpandedChange=\{setExpanded\}/);
assert.match(scene, /rectificationTile/);
assert.match(scene, /sourceRectificationTiles/);
assert.match(scene, /context\.drawImage/);
assert.match(scene, /context\.strokeRect/);
assert.doesNotMatch(scene, /#[a-f0-9]{3,8}/i);
assert.match(profiles, /"l34c-tile-seam-stitch-shadow"/);
assert.match(advanced, /<L34CTileSeamStitchResultView/);
});
test("L3.4D binds the frozen cumulative candidate to visual evidence", async () => {
const [result, visual, scene, profiles, advanced] = await Promise.all([
readFile(l34dResultUrl, "utf8"),
readFile(l34dVisualUrl, "utf8"),
readFile(l34dSceneUrl, "utf8"),
readFile(laboratoryProfilesUrl, "utf8"),
readFile(advancedLaboratoryResultUrl, "utf8"),
]);
assert.match(result, /<LaboratoryWorkTemplate/);
assert.match(result, /Original source indices · 0 policy conflicts/);
assert.match(result, /candidate ещё не является принятым/);
assert.match(visual, /fetchL34DCase/);
assert.match(visual, /nested-box-consolidation/);
assert.match(visual, /temporal-tile-seam-stitch/);
assert.match(visual, /\{ value: "after", label: "AFTER" \}/);
assert.match(visual, /\{ value: "before", label: "BEFORE" \}/);
assert.match(visual, /\{ value: "source", label: "SOURCE" \}/);
assert.match(visual, /onExpandedChange=\{setExpanded\}/);
assert.match(scene, /operationBySourceIndex/);
assert.match(scene, /sourceRectificationTiles/);
assert.match(scene, /context\.drawImage/);
assert.match(scene, /context\.strokeRect/);
assert.doesNotMatch(scene, /#[a-f0-9]{3,8}/i);
assert.match(profiles, /"l34d-cumulative-postprocessing-candidate"/);
assert.match(advanced, /<L34DCumulativePostprocessingResultView/);
});
test("L3.4E separates geometry disagreement from detector metrics", async () => {
const [result, visual, scene, profiles, advanced] = await Promise.all([
readFile(l34eResultUrl, "utf8"),
readFile(l34eVisualUrl, "utf8"),
readFile(l34eSceneUrl, "utf8"),
readFile(laboratoryProfilesUrl, "utf8"),
readFile(advancedLaboratoryResultUrl, "utf8"),
]);
assert.match(result, /<LaboratoryWorkTemplate/);
assert.match(result, /не является качеством детектора/);
assert.match(result, /Не перетюнивать модель/);
assert.match(visual, /fetchL34ECase/);
assert.match(visual, /\{ value: "overlay", label: "OVERLAY" \}/);
assert.match(visual, /\{ value: "candidate", label: "CANDIDATE" \}/);
assert.match(visual, /\{ value: "review", label: "SELF-REVIEW" \}/);
assert.match(visual, /\{ value: "source", label: "SOURCE" \}/);
assert.match(visual, /onExpandedChange=\{setExpanded\}/);
assert.match(scene, /localization_disagreement/);
assert.match(scene, /labelRects/);
assert.match(scene, /context\.drawImage/);
assert.match(scene, /context\.strokeRect/);
assert.match(scene, /context\.lineTo/);
assert.doesNotMatch(scene, /#[a-f0-9]{3,8}/i);
assert.match(profiles, /"l34e-self-review-diagnostic"/);
assert.match(advanced, /<L34ESelfReviewDiagnosticResultView/);
});
test("L3.4 annotation is contextual, fullscreen and assisted-review", async () => {
const [workspace, canvas, capability, core, styles] = await Promise.all([
readFile(l34AnnotationWorkspaceUrl, "utf8"),
readFile(l34AnnotationCanvasUrl, "utf8"),
readFile(l34AnnotationCapabilityUrl, "utf8"),
readFile(l34AnnotationCoreUrl, "utf8"),
readFile(l34AnnotationStylesUrl, "utf8"),
]);
assert.match(capability, /selectedWorkId === "l34-right-yolox-truth-island-freeze"/);
assert.match(capability, /selectedWorkId === "l34d-cumulative-postprocessing-candidate"/);
assert.match(capability, /workflow: "prediction-hidden"/);
assert.match(capability, /"Разобрать конфликты"/);
assert.match(capability, /"Разметить данные"/);
assert.match(workspace, /createPortal\(workspace, document\.body\)/);
assert.match(workspace, /<Select[\s\S]*label="Сессия разметки"/);
assert.match(workspace, /<IconButton[\s\S]*Создать новую сессию разметки/);
assert.match(workspace, /<Button[\s\S]*Рамка/);
assert.match(workspace, /<Window[\s\S]*title="Сохранить сессию разметки"/);
assert.match(workspace, /<TextField[\s\S]*label="Название сессии"/);
assert.match(workspace, /Кадр проверен: объектов нет/);
assert.match(workspace, /frozen candidate prelabels/);
assert.match(workspace, /BLIND · 0 prelabels/);
assert.match(workspace, /candidate boxes скрыты · 0 prelabels/);
assert.match(workspace, /не independent truth/);
assert.match(workspace, /Перекрыт/);
assert.match(workspace, /Обрезан границей/);
assert.match(workspace, /title="Другой объект"/);
assert.match(workspace, /label="Название объекта"/);
assert.match(workspace, /Ожидает нормализации/);
assert.match(canvas, /<svg/);
assert.match(canvas, /boxFromPoints/);
assert.match(canvas, /<Select/);
assert.match(canvas, /Выберите класс/);
assert.match(canvas, /L34_ANNOTATION_UNMAPPED_OPTION/);
assert.match(canvas, /customLabelValue/);
assert.match(canvas, /kind: "move"/);
assert.match(canvas, /kind: "resize"/);
assert.match(canvas, /l34-annotation-canvas__resize-handle/);
assert.match(core, /proposed_label/);
assert.match(core, /annotation-seed/);
assert.match(core, /prediction-hidden-manual/);
assert.match(core, /Blind L3\.4D не предоставляет предразметку/);
assert.match(core, /annotation-labels/);
assert.match(core, /frozen_candidate_seed/);
assert.match(core, /pending-adjudication/);
assert.match(core, /annotation-source/);
assert.match(core, /model_material_included/);
assert.doesNotMatch(workspace, /L34RightYoloxTruthIslandVisual/);
assert.doesNotMatch(workspace, /fetchL34RightYoloxTruthIslandFrame/);
assert.match(styles, /position:\s*fixed/);
assert.match(styles, /z-index:\s*var\(--nodedc-layer-overlay\)/);
assert.match(styles, /\.l34-annotation-canvas rect[\s\S]*?fill:\s*none/);
assert.doesNotMatch(styles, /rgba\(var\(--nodedc-accent-rgb\)/);
assert.doesNotMatch(styles, /z-index:\s*[1-9][0-9]{3,}/);
});
test("E46 exposes two capability-separated source-only reviewer slots", async () => {
const [result, visual, workspace, canvas, capability, annotation, core] = await Promise.all([
readFile(e46ResultUrl, "utf8"),
readFile(e46VisualUrl, "utf8"),
readFile(l34AnnotationWorkspaceUrl, "utf8"),
readFile(l34AnnotationCanvasUrl, "utf8"),
readFile(l34AnnotationCapabilityUrl, "utf8"),
readFile(l34AnnotationCoreUrl, "utf8"),
readFile(e46CoreUrl, "utf8"),
]);
assert.match(result, /LAB E46 · independent source-only detector review/);
assert.match(result, /Not truth · E48 unsealed · L3\.5 closed/);
assert.match(visual, /0 boxes · 0 labels · 0 scores/);
assert.match(visual, /Candidate identity не включена/);
assert.match(capability, /workflow: "independent-blind"/);
assert.match(capability, /"Независимая разметка"/);
assert.match(workspace, /Чужой слот без capability не откроется/);
assert.match(workspace, /Передать review/);
assert.match(workspace, /candidate identity не загружена · 0 predictions · 0 prelabels/);
assert.match(workspace, /independentAttested/);
assert.match(workspace, /candidateHiddenAttested/);
assert.match(workspace, /modelHiddenAttested/);
assert.match(canvas, /allowUnmapped = true/);
assert.match(annotation, /X-E46-Review-Capability/);
assert.match(annotation, /prediction-free-fixed-taxonomy/);
assert.match(annotation, /freezeE46ReviewSubmission/);
assert.match(core, /completed-e48-review-input-not-truth/);
assert.match(core, /metric_grade_reference/);
});
test("L3.4F adjudication separates candidate from editable human references", async () => {
const [workspace, canvas, capability, core, result, profiles, advanced, styles] = await Promise.all([
readFile(l34FWorkspaceUrl, "utf8"),
readFile(l34AnnotationCanvasUrl, "utf8"),
readFile(l34AnnotationCapabilityUrl, "utf8"),
readFile(l34FCoreUrl, "utf8"),
readFile(l34FResultUrl, "utf8"),
readFile(laboratoryProfilesUrl, "utf8"),
readFile(advancedLaboratoryResultUrl, "utf8"),
readFile(l34AnnotationStylesUrl, "utf8"),
]);
assert.match(capability, /selectedWorkId === "l34e-self-review-diagnostic"/);
assert.match(capability, /workflow: "adjudication"/);
assert.match(workspace, /Разбор конфликтов LAB L3\.4F/);
assert.match(workspace, /\{ value: "overlay", label: "ВМЕСТЕ" \}/);
assert.match(workspace, /\{ value: "candidate", label: "CANDIDATE" \}/);
assert.match(workspace, /\{ value: "review", label: "HUMAN" \}/);
assert.match(workspace, /\{ value: "source", label: "SOURCE" \}/);
assert.match(workspace, /newObjectOrigin="adjudicated_manual"/);
assert.match(workspace, /Candidate visible · scores скрыты/);
assert.match(workspace, /!session\?\.progress\.complete/);
assert.match(workspace, /Конфликт разобран/);
assert.match(canvas, /l34-annotation-canvas__comparison/);
assert.match(canvas, /candidateVisible/);
assert.match(canvas, /humanVisible/);
assert.match(core, /model_scores_included/);
assert.match(core, /candidate-visible-human-adjudication/);
assert.match(core, /expected_revision/);
assert.match(core, /\/freeze/);
assert.match(core, /fetchL34FFrozenResult/);
assert.match(result, /<LaboratoryWorkTemplate/);
assert.match(result, /32\/32 кадров доступны для повторной визуальной проверки/);
assert.match(result, /<L34ESelfReviewDiagnosticVisual/);
assert.match(result, /Two independent blind reviews required before E48 \/ L3\.5/);
assert.match(profiles, /"l34f-adjudicated-reference"/);
assert.match(advanced, /<L34FAdjudicatedReferenceResultView/);
assert.match(styles, /--nodedc-warning-rgb/);
assert.doesNotMatch(styles, /#[a-f0-9]{3,8}/i);
});
test("L3.1 keeps RAVNOVES evidence primary and KITTI in a public benchmark profile", async () => {
const [result, visual, scene, profiles, advanced] = await Promise.all([
readFile(l31ResultUrl, "utf8"),
@@ -218,9 +622,9 @@ test("L3.1 keeps RAVNOVES evidence primary and KITTI in a public benchmark profi
assert.match(visual, /bevCenterX=\{0\}/);
assert.match(visual, /bevHalfExtent=\{55\}/);
assert.match(scene, /bevCenterX = 30/);
assert.match(profiles, /"public-benchmarks"/);
assert.match(profiles, /Публичные датасеты · внешний benchmark-контур/);
assert.match(advanced, /id: "l31-pointpillars-ravnoves"/);
assert.match(profiles, /"kitti-pointpillars-benchmark-v1"/);
assert.match(profiles, /KITTI · PointPillars external benchmark/);
assert.match(profiles, /"l31-pointpillars-ravnoves"/);
assert.match(advanced, /<L31PointPillarsRavnovesResult/);
});
@@ -243,9 +647,10 @@ test("E33 explains the experiment, its method and its retained limits", async ()
});
test("E34 keeps temporal evidence inside the canonical LAB and viewer contracts", async () => {
const [e34Source, advancedSource] = await Promise.all([
const [e34Source, advancedSource, profilesSource] = await Promise.all([
readFile(e34ResultUrl, "utf8"),
readFile(advancedLaboratoryResultUrl, "utf8"),
readFile(laboratoryProfilesUrl, "utf8"),
]);
assert.match(e34Source, /<LaboratoryWorkTemplate/);
@@ -255,7 +660,7 @@ test("E34 keeps temporal evidence inside the canonical LAB and viewer contracts"
assert.match(e34Source, /Первый immutable replay был отклонён/);
assert.match(e34Source, /Слой не вычисляет свободное пространство/);
assert.match(e34Source, /Следующий критический gate — E35/);
assert.match(advancedSource, /id: "e34-temporal-layer"/);
assert.match(profilesSource, /"e34-temporal-layer"/);
assert.match(advancedSource, /<E34Result/);
});
@@ -263,12 +668,14 @@ test("E35 extends the canonical LAB with fault and recovery evidence", async ()
const [
e35Source,
advancedSource,
profilesSource,
e35Styles,
laboratoryStyles,
reportingStyles,
] = await Promise.all([
readFile(e35ResultUrl, "utf8"),
readFile(advancedLaboratoryResultUrl, "utf8"),
readFile(laboratoryProfilesUrl, "utf8"),
readFile(e35StylesUrl, "utf8"),
readFile(laboratoryStylesUrl, "utf8"),
readFile(laboratoryReportingStylesUrl, "utf8"),
@@ -283,7 +690,7 @@ test("E35 extends the canonical LAB with fault and recovery evidence", async ()
assert.match(e35Source, /Следующий критический gate — A9\/E36/);
assert.match(e35Source, /SCENARIO_LABELS/);
assert.match(e35Source, /PHASE_LABELS/);
assert.match(advancedSource, /id: "e35-degradation-recovery"/);
assert.match(profilesSource, /"e35-degradation-recovery"/);
assert.match(advancedSource, /<E35Result/);
assert.match(
e35Styles,
@@ -304,9 +711,10 @@ test("E35 extends the canonical LAB with fault and recovery evidence", async ()
});
test("E38 reports the frozen R1 baseline through the canonical LAB anatomy", async () => {
const [e38Source, advancedSource] = await Promise.all([
const [e38Source, advancedSource, profilesSource] = await Promise.all([
readFile(e38ResultUrl, "utf8"),
readFile(advancedLaboratoryResultUrl, "utf8"),
readFile(laboratoryProfilesUrl, "utf8"),
]);
assert.match(e38Source, /<LaboratoryWorkTemplate/);
@@ -317,14 +725,15 @@ test("E38 reports the frozen R1 baseline through the canonical LAB anatomy", asy
assert.match(e38Source, /R1 и выпуск не приняты/);
assert.match(e38Source, /не меняя validation/);
assert.doesNotMatch(e38Source, /className="laboratory-(?:summary|result-summary)"/);
assert.match(advancedSource, /id: "e38-perception-baseline"/);
assert.match(profilesSource, /"e38-perception-baseline"/);
assert.match(advancedSource, /<E38Result/);
});
test("E39 reports refinement and the CV-to-validation gap through the canonical LAB anatomy", async () => {
const [e39Source, advancedSource] = await Promise.all([
const [e39Source, advancedSource, profilesSource] = await Promise.all([
readFile(e39ResultUrl, "utf8"),
readFile(advancedLaboratoryResultUrl, "utf8"),
readFile(laboratoryProfilesUrl, "utf8"),
]);
assert.match(e39Source, /<LaboratoryWorkTemplate/);
@@ -335,15 +744,16 @@ test("E39 reports refinement and the CV-to-validation gap through the canonical
assert.match(e39Source, /не принимать R1/);
assert.match(e39Source, /не подбирая параметры по sealed validation/);
assert.doesNotMatch(e39Source, /className="laboratory-(?:summary|result-summary)"/);
assert.match(advancedSource, /id: "e39-perception-refinement"/);
assert.match(profilesSource, /"e39-perception-refinement"/);
assert.match(advancedSource, /<E39Result/);
});
test("E40 reports historical visible evaluation with bounded camera-LiDAR case review", async () => {
const [e40Source, caseReviewSource, advancedSource] = await Promise.all([
const [e40Source, caseReviewSource, advancedSource, profilesSource] = await Promise.all([
readFile(e40ResultUrl, "utf8"),
readFile(e40CaseReviewUrl, "utf8"),
readFile(advancedLaboratoryResultUrl, "utf8"),
readFile(laboratoryProfilesUrl, "utf8"),
]);
assert.match(e40Source, /<LaboratoryWorkTemplate/);
@@ -374,10 +784,10 @@ test("E40 reports historical visible evaluation with bounded camera-LiDAR case r
e40Source,
/className="laboratory-(?:summary|result-summary|result-metrics|result-conclusion)"/,
);
assert.match(advancedSource, /id: "e40-perception-product-gate"/);
assert.match(profilesSource, /"e40-perception-product-gate"/);
assert.match(
advancedSource,
/LAB E40 · historical visible engineering evaluation/,
profilesSource,
/E40 · Historical visible evaluation/,
);
assert.doesNotMatch(
advancedSource,
@@ -200,11 +200,15 @@ test("data recordings keep the compact session dropdown and laboratory results s
assert.match(recordingsSource, /<SpatialWorkspace \{\.\.\.props\} \/>/);
assert.doesNotMatch(recordingsSource, /ObservationSessionArchive/);
assert.match(productSource, /label: "Лабораторные контуры"/);
assert.match(laboratorySource, /ПРОФИЛЬ ЛАБОРАТОРНОГО КОНТУРА/);
assert.match(laboratorySource, /ЛАБОРАТОРНАЯ РАБОТА/);
assert.match(laboratorySource, /PIPELINE-КОНТУР/);
assert.match(laboratorySource, /eyebrow="ЭКСПЕРИМЕНТ"/);
assert.match(laboratorySource, /ПРОГОН \/ ВАРИАНТ/);
assert.match(laboratorySource, /e28-local-surface/);
assert.match(laboratorySource, /e29-camera-geometry/);
assert.match(laboratorySource, /laboratoryWorkOrdinal\(right\.label\)/);
assert.match(laboratorySource, /buildLaboratoryCatalog/);
assert.match(laboratorySource, /experimentOptionsForProfile/);
assert.match(laboratorySource, /workOptionsForExperiment/);
assert.doesNotMatch(laboratorySource, /laboratoryWorkOrdinal/);
assert.match(laboratorySource, /initialWorkSelectedRef/);
assert.match(laboratorySource, /pollingEnabled:\s*false/);
assert.match(laboratorySource, /useAdvancedLaboratoryCatalog/);