feat(perception): add E34 temporal occupied layer
This commit is contained in:
@@ -123,6 +123,89 @@ function e33() {
|
||||
};
|
||||
}
|
||||
|
||||
function e34() {
|
||||
return {
|
||||
result_id: `e34-temporal-occupied-${"4".repeat(64)}`,
|
||||
created_at_utc: "2026-07-27T13:28:30Z",
|
||||
source_session_id: "20260720T065719Z_viewer_live",
|
||||
status: "accepted-bounded-occupied-unknown-temporal-layer",
|
||||
e32_result_id: e32().result_id,
|
||||
e33_result_id: e33().result_id,
|
||||
profile_id: "e34-short-ttl-hit-only-occupied-unknown/v1",
|
||||
pipeline_id: "lidar-local-map/short-ttl-hit-only/v1",
|
||||
coordinate_frame: "map",
|
||||
configuration: {
|
||||
voxel_size_m: 0.45,
|
||||
occupied_ttl_seconds: 0.75,
|
||||
maximum_active_components: 256,
|
||||
maximum_cells_per_component: 4096,
|
||||
geometry_maximum_gap_seconds: 0.35,
|
||||
geometry_maximum_centroid_distance_m: 0.9,
|
||||
},
|
||||
metrics: {
|
||||
source_frames: 4489,
|
||||
processed_frames: 4489,
|
||||
frames_with_current_layer: 3928,
|
||||
held_only_frames: 540,
|
||||
unknown_empty_frames: 21,
|
||||
created_components: 4912,
|
||||
camera_created_components: 1027,
|
||||
geometry_created_components: 3885,
|
||||
geometry_reassociated_components: 2366,
|
||||
exact_camera_associations: 5168,
|
||||
geometry_spatial_reassociations: 17433,
|
||||
held_publications: 39664,
|
||||
expired_components: 4895,
|
||||
peak_active_components: 37,
|
||||
maximum_observed_span_seconds: 13.394,
|
||||
continuity_fraction: 0.821466,
|
||||
geometry_only_reassociation_fraction: 0.81776,
|
||||
e32_current_point_rows: 2119302,
|
||||
e34_consumed_current_point_rows: 2119302,
|
||||
current_cell_rows: 834478,
|
||||
held_cell_rows: 531581,
|
||||
stored_cell_rows: 1366059,
|
||||
free_cell_rows: 0,
|
||||
peak_cells_per_component: 324,
|
||||
maximum_held_age_seconds: 0.75,
|
||||
maximum_expiry_delay_seconds: 0,
|
||||
maximum_replay_materialization_delay_seconds: 0.283,
|
||||
map_frame_jump_candidates: 0,
|
||||
frame_processing_p95_ms: 1.483,
|
||||
build_elapsed_ms: 4317,
|
||||
},
|
||||
review: {
|
||||
schema_version: "missioncore.e34-temporal-review-timeline/v1",
|
||||
result_id: `e34-temporal-occupied-${"4".repeat(64)}`,
|
||||
frames: [{
|
||||
frame_index: 238,
|
||||
session_seconds: 59.206,
|
||||
source_available: false,
|
||||
layer_state: "unknown",
|
||||
counts: { current: 0, held: 0, expired: 1 },
|
||||
cell_centers_map_xyz_m: [],
|
||||
components: [{
|
||||
temporal_id: 136,
|
||||
state: "expired",
|
||||
occupancy_state: "unknown",
|
||||
owner_kind: "camera-track",
|
||||
centroid_map_xyz_m: [20.25, -2.83, 0.21],
|
||||
last_observed_age_seconds: 0.75,
|
||||
association_reason: "independent-ttl-deadline",
|
||||
history_tail: [{
|
||||
frame_index: 230,
|
||||
session_seconds: 58.456,
|
||||
centroid_map_xyz_m: [20.25, -2.83, 0.21],
|
||||
}],
|
||||
}],
|
||||
}],
|
||||
},
|
||||
acceptance: { accepted: true },
|
||||
authority,
|
||||
access: "read-only",
|
||||
};
|
||||
}
|
||||
|
||||
before(async () => {
|
||||
server = await createServer({
|
||||
appType: "custom",
|
||||
@@ -139,9 +222,9 @@ after(async () => {
|
||||
await server?.close();
|
||||
});
|
||||
|
||||
test("decodes E31, E32 and E33 from separate read-only catalogs", async () => {
|
||||
test("decodes E31–E34 from separate read-only catalogs", async () => {
|
||||
const requests = [];
|
||||
const items = [e31(), e32(), e33()];
|
||||
const items = [e31(), e32(), e33(), e34()];
|
||||
const decoded = await fetchAdvancedLaboratoryResults({
|
||||
fetcher: async (input, init) => {
|
||||
requests.push({ input: String(input), method: init?.method });
|
||||
@@ -156,10 +239,13 @@ test("decodes E31, E32 and E33 from separate read-only catalogs", async () => {
|
||||
assert.equal(decoded.e33.metrics.deliveredFrames, 4489);
|
||||
assert.equal(decoded.e33.metrics.sourceAvailableFrames, 3928);
|
||||
assert.equal(decoded.e33.metrics.resultAgeMaxMs, 13.638);
|
||||
assert.equal(decoded.e34.metrics.processedFrames, 4489);
|
||||
assert.equal(decoded.e34.reviewFrames[0].components[0].state, "expired");
|
||||
assert.deepEqual(requests, [
|
||||
{ input: "/api/v1/laboratory/e31/results?limit=1", method: "GET" },
|
||||
{ input: "/api/v1/laboratory/e32/results?limit=1", method: "GET" },
|
||||
{ input: "/api/v1/laboratory/e33/results?limit=1", method: "GET" },
|
||||
{ input: "/api/v1/laboratory/e34/results?limit=1", method: "GET" },
|
||||
]);
|
||||
});
|
||||
|
||||
@@ -172,7 +258,8 @@ test("rejects authority escalation in an accepted-looking result", async () => {
|
||||
() => fetchAdvancedLaboratoryResults({
|
||||
fetcher: async (input) => new Response(JSON.stringify(catalog(
|
||||
String(input).includes("/e31/") ? forged
|
||||
: String(input).includes("/e32/") ? e32() : e33(),
|
||||
: String(input).includes("/e32/") ? e32()
|
||||
: String(input).includes("/e33/") ? e33() : e34(),
|
||||
)), { status: 200 }),
|
||||
}),
|
||||
AdvancedLaboratoryContractError,
|
||||
|
||||
@@ -22,6 +22,14 @@ const e33ResultUrl = new URL(
|
||||
"../src/workspaces/laboratory/E33Result.tsx",
|
||||
import.meta.url,
|
||||
);
|
||||
const e34ResultUrl = new URL(
|
||||
"../src/workspaces/laboratory/E34Result.tsx",
|
||||
import.meta.url,
|
||||
);
|
||||
const advancedLaboratoryResultUrl = new URL(
|
||||
"../src/workspaces/laboratory/AdvancedLaboratoryResult.tsx",
|
||||
import.meta.url,
|
||||
);
|
||||
const workspacesUrl = new URL(
|
||||
"../src/workspaces/Workspaces.tsx",
|
||||
import.meta.url,
|
||||
@@ -136,6 +144,23 @@ test("E33 explains the experiment, its method and its retained limits", async ()
|
||||
assert.doesNotMatch(e33Source, /name: result\.e32ResultId/);
|
||||
});
|
||||
|
||||
test("E34 keeps temporal evidence inside the canonical LAB and viewer contracts", async () => {
|
||||
const [e34Source, advancedSource] = await Promise.all([
|
||||
readFile(e34ResultUrl, "utf8"),
|
||||
readFile(advancedLaboratoryResultUrl, "utf8"),
|
||||
]);
|
||||
|
||||
assert.match(e34Source, /<LaboratoryWorkTemplate/);
|
||||
assert.match(e34Source, /<LaboratoryEvidenceViewer/);
|
||||
assert.match(e34Source, /\{ value: "3d", label: "3D" \}/);
|
||||
assert.match(e34Source, /\{ value: "plan", label: "План" \}/);
|
||||
assert.match(e34Source, /Первый immutable replay был отклонён/);
|
||||
assert.match(e34Source, /Слой не вычисляет свободное пространство/);
|
||||
assert.match(e34Source, /Следующий критический gate — E35/);
|
||||
assert.match(advancedSource, /id: "e34-temporal-layer"/);
|
||||
assert.match(advancedSource, /<E34Result/);
|
||||
});
|
||||
|
||||
test("the primary point-cloud viewer restores from fullscreen on Escape", async () => {
|
||||
const workspacesSource = await readFile(workspacesUrl, "utf8");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user