feat(laboratory): publish M48S load envelope

This commit is contained in:
DCCONSTRUCTIONS
2026-08-25 20:36:26 +03:00
parent e21332b9e1
commit bab0bb2df2
8 changed files with 624 additions and 23 deletions
@@ -2,6 +2,7 @@ import type { LaboratoryFetch } from "./advancedResults";
const RESULT_ID = /^m48s-fixed-class-detector-lab-[a-f0-9]{64}$/;
const FRAME_ID = /^[0-9]{6}$/;
const SHA256 = /^[a-f0-9]{64}$/;
const MODES = ["source", "yolox", "dfine", "rf-detr"] as const;
const DETECTOR_MODES = ["yolox", "dfine", "rf-detr"] as const;
const RESULT_STATUSES = [
@@ -105,6 +106,48 @@ export interface M48SRuntimeHardeningComparison {
};
}
export interface M48SLoadEnvelopeScenario {
id: "production-10fps" | "reserve-12fps" | "limit-15fps";
loadPurpose: "production-rate" | "reserve-gate" | "limit-discovery";
requestedSourceRateHz: number;
sourceFramesAdmitted: number;
deliveredWorldStates: number;
supersededFrames: number;
deliveryRatio: number;
effectiveWorldStateFps: number;
worldStateCompletionAgeP95Ms: number;
worldStateCompletionAgeP99Ms: number;
worldStateCompletionAgeMaximumMs: number;
decodeP95Ms: number;
decodeMaximumMs: number;
detectorP95Ms: number;
detectorMaximumMs: number;
gpuUtilizationMeanPercent: number;
gpuUtilizationMaximumPercent: number;
gpuMemoryMaximumMib: number;
processPeakRssMib: number;
queueHighWatermarks: Readonly<Record<"detector" | "geometry" | "temporal" | "rolling" | "threat", number>>;
queueCapacity: number;
additionalInferencePasses: number;
integrityGatePassed: boolean;
operatingTargetGatePassed: boolean;
thresholds: {
minimumDeliveryRatio: number;
minimumEffectiveWorldStateFps: number;
maximumWorldStateCompletionP95Ms: number;
};
}
export interface M48SLoadEnvelopeComparison {
productionRateRepeatabilityPassed: false;
reserve12FpsPassed: true;
limit15FpsPassed: true;
loadEnvelopeAccepted: false;
computeCapacityAtLeastFps: 15;
bottleneckInterpretation: "rare-source-decode-or-scheduling-tail-not-steady-gpu-saturation";
scenarios: readonly M48SLoadEnvelopeScenario[];
}
export interface M48SFixedClassDetectorResult {
resultId: string;
createdAtUtc: string;
@@ -144,6 +187,7 @@ export interface M48SFixedClassDetectorResult {
};
integratedWorldState: M48SIntegratedWorldState | null;
runtimeHardening: M48SRuntimeHardeningComparison | null;
loadEnvelope: M48SLoadEnvelopeComparison | null;
};
decision: {
selectedCandidate: "rf-detr";
@@ -151,6 +195,11 @@ export interface M48SFixedClassDetectorResult {
integratedWorldStateGateEvaluated: boolean;
integratedWorldStateGatePassed: boolean;
detectorReplacementAuthorized: false;
loadEnvelopeEvaluated: boolean;
productionRateRepeatabilityPassed: boolean;
reserve12FpsPassed: boolean;
limit15FpsPassed: boolean;
loadEnvelopeAccepted: boolean;
productionAccepted: false;
};
limitations: readonly string[];
@@ -457,6 +506,96 @@ function runtimeHardeningComparisonValue(value: unknown): M48SRuntimeHardeningCo
};
}
function loadEnvelopeComparisonValue(value: unknown): M48SLoadEnvelopeComparison {
const comparison = objectValue(value, "M4.8S.metrics.load_envelope");
exact(
comparison.schema_version,
"missioncore.m48s-load-envelope-comparison/v1",
"M4.8S.metrics.load_envelope.schema_version",
);
exact(comparison.production_rate_repeatability_passed, false, "M4.8S.load_envelope.production_rate_repeatability_passed");
exact(comparison.reserve_12_fps_passed, true, "M4.8S.load_envelope.reserve_12_fps_passed");
exact(comparison.limit_15_fps_passed, true, "M4.8S.load_envelope.limit_15_fps_passed");
exact(comparison.load_envelope_accepted, false, "M4.8S.load_envelope.load_envelope_accepted");
exact(comparison.compute_capacity_at_least_fps, 15, "M4.8S.load_envelope.compute_capacity_at_least_fps");
exact(
comparison.bottleneck_interpretation,
"rare-source-decode-or-scheduling-tail-not-steady-gpu-saturation",
"M4.8S.load_envelope.bottleneck_interpretation",
);
const ids = ["production-10fps", "reserve-12fps", "limit-15fps"] as const;
const purposes = ["production-rate", "reserve-gate", "limit-discovery"] as const;
const targetGates = [false, true, true] as const;
const scenarios = arrayValue(comparison.scenarios, "M4.8S.load_envelope.scenarios").map((value, index) => {
const label = `M4.8S.load_envelope.scenarios[${index}]`;
const scenario = objectValue(value, label);
const id = ids[index];
const purpose = purposes[index];
if (id === undefined || purpose === undefined) {
throw new M48SFixedClassDetectorContractError("M4.8S.load_envelope.scenarios: лишний сценарий.");
}
exact(scenario.id, id, `${label}.id`);
exact(scenario.load_purpose, purpose, `${label}.load_purpose`);
exact(scenario.integrity_gate_passed, true, `${label}.integrity_gate_passed`);
exact(scenario.operating_target_gate_passed, targetGates[index], `${label}.operating_target_gate_passed`);
exact(scenario.additional_inference_passes, 0, `${label}.additional_inference_passes`);
const queues = integerRecordValue(scenario.queue_high_watermarks, `${label}.queue_high_watermarks`);
for (const key of ["detector", "geometry", "temporal", "rolling", "threat"] as const) {
if (!(key in queues)) {
throw new M48SFixedClassDetectorContractError(`${label}.queue_high_watermarks.${key}: отсутствует.`);
}
}
const thresholds = objectValue(scenario.thresholds, `${label}.thresholds`);
const frameEvidenceSha256 = textValue(scenario.frame_evidence_sha256, `${label}.frame_evidence_sha256`);
if (!SHA256.test(frameEvidenceSha256)) {
throw new M48SFixedClassDetectorContractError(`${label}.frame_evidence_sha256: нарушен SHA-256.`);
}
return {
id,
loadPurpose: purpose,
requestedSourceRateHz: numberValue(scenario.requested_source_rate_hz, `${label}.requested_source_rate_hz`),
sourceFramesAdmitted: integerValue(scenario.source_frames_admitted, `${label}.source_frames_admitted`),
deliveredWorldStates: integerValue(scenario.delivered_world_states, `${label}.delivered_world_states`),
supersededFrames: integerValue(scenario.superseded_frames, `${label}.superseded_frames`),
deliveryRatio: numberValue(scenario.delivery_ratio, `${label}.delivery_ratio`),
effectiveWorldStateFps: numberValue(scenario.effective_world_state_fps, `${label}.effective_world_state_fps`),
worldStateCompletionAgeP95Ms: numberValue(scenario.world_state_completion_age_p95_ms, `${label}.world_state_completion_age_p95_ms`),
worldStateCompletionAgeP99Ms: numberValue(scenario.world_state_completion_age_p99_ms, `${label}.world_state_completion_age_p99_ms`),
worldStateCompletionAgeMaximumMs: numberValue(scenario.world_state_completion_age_maximum_ms, `${label}.world_state_completion_age_maximum_ms`),
decodeP95Ms: numberValue(scenario.decode_p95_ms, `${label}.decode_p95_ms`),
decodeMaximumMs: numberValue(scenario.decode_maximum_ms, `${label}.decode_maximum_ms`),
detectorP95Ms: numberValue(scenario.detector_p95_ms, `${label}.detector_p95_ms`),
detectorMaximumMs: numberValue(scenario.detector_maximum_ms, `${label}.detector_maximum_ms`),
gpuUtilizationMeanPercent: numberValue(scenario.gpu_utilization_mean_percent, `${label}.gpu_utilization_mean_percent`),
gpuUtilizationMaximumPercent: numberValue(scenario.gpu_utilization_maximum_percent, `${label}.gpu_utilization_maximum_percent`),
gpuMemoryMaximumMib: numberValue(scenario.gpu_memory_maximum_mib, `${label}.gpu_memory_maximum_mib`),
processPeakRssMib: numberValue(scenario.process_peak_rss_mib, `${label}.process_peak_rss_mib`),
queueHighWatermarks: queues as M48SLoadEnvelopeScenario["queueHighWatermarks"],
queueCapacity: integerValue(scenario.queue_capacity, `${label}.queue_capacity`),
additionalInferencePasses: 0,
integrityGatePassed: true,
operatingTargetGatePassed: targetGates[index],
thresholds: {
minimumDeliveryRatio: numberValue(thresholds.minimum_delivery_ratio, `${label}.thresholds.minimum_delivery_ratio`),
minimumEffectiveWorldStateFps: numberValue(thresholds.minimum_effective_world_state_fps, `${label}.thresholds.minimum_effective_world_state_fps`),
maximumWorldStateCompletionP95Ms: numberValue(thresholds.maximum_world_state_completion_p95_ms, `${label}.thresholds.maximum_world_state_completion_p95_ms`),
},
};
});
if (scenarios.length !== ids.length) {
throw new M48SFixedClassDetectorContractError("M4.8S.load_envelope.scenarios: неполный набор.");
}
return {
productionRateRepeatabilityPassed: false,
reserve12FpsPassed: true,
limit15FpsPassed: true,
loadEnvelopeAccepted: false,
computeCapacityAtLeastFps: 15,
bottleneckInterpretation: "rare-source-decode-or-scheduling-tail-not-steady-gpu-saturation",
scenarios,
};
}
function parseResult(value: unknown, resultId: string): M48SFixedClassDetectorResult {
const payload = objectValue(value, "M4.8S");
exact(
@@ -475,6 +614,9 @@ function parseResult(value: unknown, resultId: string): M48SFixedClassDetectorRe
const metrics = objectValue(payload.metrics, "M4.8S.metrics");
const load = objectValue(metrics.detector_load, "M4.8S.metrics.detector_load");
const decision = objectValue(payload.decision, "M4.8S.decision");
const loadEnvelope = metrics.load_envelope === undefined
? null
: loadEnvelopeComparisonValue(metrics.load_envelope);
const cameraRaster = arrayValue(source.camera_raster, "M4.8S.source.camera_raster");
if (cameraRaster.length !== 2) {
throw new M48SFixedClassDetectorContractError("M4.8S.source.camera_raster: нарушен размер.");
@@ -503,6 +645,13 @@ function parseResult(value: unknown, resultId: string): M48SFixedClassDetectorRe
exact(decision.detector_replacement_authorized, false, "M4.8S.decision.detector_replacement_authorized");
}
exact(decision.production_accepted, false, "M4.8S.decision.production_accepted");
if (loadEnvelope !== null) {
exact(decision.load_envelope_evaluated, true, "M4.8S.decision.load_envelope_evaluated");
exact(decision.production_rate_repeatability_passed, false, "M4.8S.decision.production_rate_repeatability_passed");
exact(decision.reserve_12_fps_passed, true, "M4.8S.decision.reserve_12_fps_passed");
exact(decision.limit_15_fps_passed, true, "M4.8S.decision.limit_15_fps_passed");
exact(decision.load_envelope_accepted, false, "M4.8S.decision.load_envelope_accepted");
}
const frames = arrayValue(payload.frames, "M4.8S.frames").map(descriptorValue);
const evidenceFrameCount = integerValue(source.evidence_frame_count, "M4.8S.source.evidence_frame_count");
if (frames.length !== evidenceFrameCount || new Set(frames.map((frame) => frame.frameId)).size !== frames.length) {
@@ -551,6 +700,7 @@ function parseResult(value: unknown, resultId: string): M48SFixedClassDetectorRe
runtimeHardening: metrics.runtime_hardening === undefined
? null
: runtimeHardeningComparisonValue(metrics.runtime_hardening),
loadEnvelope,
},
decision: {
selectedCandidate: "rf-detr",
@@ -558,6 +708,11 @@ function parseResult(value: unknown, resultId: string): M48SFixedClassDetectorRe
integratedWorldStateGateEvaluated: integratedGate,
integratedWorldStateGatePassed: integratedGate,
detectorReplacementAuthorized: false,
loadEnvelopeEvaluated: loadEnvelope !== null,
productionRateRepeatabilityPassed: false,
reserve12FpsPassed: loadEnvelope?.reserve12FpsPassed ?? false,
limit15FpsPassed: loadEnvelope?.limit15FpsPassed ?? false,
loadEnvelopeAccepted: false,
productionAccepted: false,
},
limitations: arrayValue(payload.limitations, "M4.8S.limitations").map((item, index) => textValue(item, `M4.8S.limitations[${index}]`)),
@@ -19,10 +19,19 @@ export function M48SFixedClassDetectorResultView({
result: M48SFixedClassDetectorResult;
}) {
const selected = result.metrics.candidates.find((candidate) => candidate.selected);
const load = result.metrics.detectorLoad;
const detectorLoad = result.metrics.detectorLoad;
const integrated = result.metrics.integratedWorldState;
const hardening = result.metrics.runtimeHardening;
const status = hardening
const loadEnvelope = result.metrics.loadEnvelope;
const production = loadEnvelope?.scenarios.find((scenario) => scenario.id === "production-10fps");
const reserve = loadEnvelope?.scenarios.find((scenario) => scenario.id === "reserve-12fps");
const limit = loadEnvelope?.scenarios.find((scenario) => scenario.id === "limit-15fps");
const load = loadEnvelope && production && reserve && limit
? { comparison: loadEnvelope, production, reserve, limit }
: null;
const status = load
? "Capacity ≥ 15 FPS подтверждён; repeatability 10 FPS требует закрытия"
: hardening
? `После hardening: ${hardening.hardened.deliveredWorldStates.toLocaleString("ru-RU")} из ${hardening.hardened.sourceFramesAdmitted.toLocaleString("ru-RU")} world states доставлены`
: integrated
? "Полный RF-DETR reference graph выдержал realtime shadow"
@@ -32,9 +41,9 @@ export function M48SFixedClassDetectorResultView({
summary={(
<LaboratorySummary
title="M4.8S · fixed-class semantics риск-объектов"
description="Сравнение трёх готовых COCO-детекторов на точных кадрах RAVNOVES00, 30-минутная квалификация RF-DETR-L и полный source-paced прогон RF-DETR → geometry → temporal → motion → rolling map → threat на Worker 006. Ниже отдельно показано, что именно изменилось после разгрузки realtime-контура и prewarm первого кадра."
description="RF-DETR-L встроен в полный source-paced граф RF-DETR → geometry → temporal → motion → rolling map → threat. После hardening один и тот же immutable проход отдельно измерен на 10, 12 и 15 FPS: показаны не только средние значения, но delivery, хвосты задержки, GPU/VRAM/RAM и честный незакрытый gate."
status={status}
statusTone="success"
statusTone={load ? "warning" : "success"}
facts={[
{ label: "Источник", value: `${rigLabel} RIGHT · raw KB4 · ${result.source.evidenceFrameCount} diagnostic frames` },
{ label: "Сравнение", value: "YOLOX-S · D-FINE-S · RF-DETR-L · единый threshold 0.50" },
@@ -42,14 +51,22 @@ export function M48SFixedClassDetectorResultView({
{ label: "Authority", value: "SHADOW ONLY · commands OFF · actuation OFF · production NO" },
]}
brief={{
question: "Можно ли заменить слабую class-семантику YOLOX готовой моделью, не потеряв realtime на предельном Worker с RTX 4090?",
approach: `YOLOX-S, D-FINE-S и RF-DETR-L сравнили на одинаковых ${result.source.evidenceFrameCount} raw-KB4 кадрах с порогом 0.50. RF-DETR-L отдельно квалифицировали ${decimal(load.durationSeconds / 60, 0)} минут, затем встроили в полный reference graph без дополнительного inference-прохода.`,
principalResult: hardening
question: load
? "Какой realtime-запас имеет неизменный single-pass RF-DETR graph на Worker 006 и где начинается его вычислительный предел?"
: "Можно ли заменить слабую class-семантику YOLOX готовой моделью, не потеряв realtime на предельном Worker с RTX 4090?",
approach: load
? "Один и тот же проход из 4489 кадров прогнали последовательно на 10, 12 и 15 FPS. Sensor timestamps, модель, graph providers, очереди, prewarm и single inference не менялись; менялся только wall-clock pacing. Пороги delivery/FPS/p95 были записаны до запусков."
: `YOLOX-S, D-FINE-S и RF-DETR-L сравнили на одинаковых ${result.source.evidenceFrameCount} raw-KB4 кадрах с порогом 0.50. RF-DETR-L отдельно квалифицировали ${decimal(result.metrics.detectorLoad.durationSeconds / 60, 0)} минут, затем встроили в полный reference graph без дополнительного inference-прохода.`,
principalResult: load
? `12 FPS прошли reserve-gate: ${load.reserve.deliveredWorldStates.toLocaleString("ru-RU")}/${load.reserve.sourceFramesAdmitted.toLocaleString("ru-RU")} доставлено. 15 FPS также прошли: ${load.limit.deliveredWorldStates.toLocaleString("ru-RU")}/${load.limit.sourceFramesAdmitted.toLocaleString("ru-RU")}. Но 10 FPS не добрали заранее заданный delivery ratio: ${load.production.deliveredWorldStates.toLocaleString("ru-RU")}/${load.production.sourceFramesAdmitted.toLocaleString("ru-RU")}, на два кадра ниже порога.`
: hardening
? `На одинаковых ${hardening.baseline.sourceFramesAdmitted.toLocaleString("ru-RU")} входных кадрах полный граф увеличил доставку с ${hardening.baseline.deliveredWorldStates.toLocaleString("ru-RU")} до ${hardening.hardened.deliveredWorldStates.toLocaleString("ru-RU")} world states, а число вытесненных кадров снизил с ${hardening.baseline.supersededFrames} до ${hardening.hardened.supersededFrames}. Отдельный ${hardening.startup.validationFrames.toLocaleString("ru-RU")}-кадровый прогон подтвердил prewarm до допуска источника.`
: integrated
? `Полный граф доставил ${integrated.deliveredWorldStates.toLocaleString("ru-RU")} world states при ${decimal(integrated.effectiveWorldStateFps, 3)} FPS и p95 ${decimal(integrated.worldStateCompletionAgeP95Ms, 3)} ms; ${integrated.supersededFrames} входных кадров штатно вытеснены latest-wins очередью.`
: `RF-DETR-L выбран из трёх кандидатов и обработал ${load.sourceFramesConsumed.toLocaleString("ru-RU")} кадров detector-only без замен и ошибок.`,
limitation: "Прогон доказывает runtime envelope, а не истинность классов, качество track identity, корректность risk policy или безопасность движения. Production authority и команды отключены.",
: `RF-DETR-L выбран из трёх кандидатов и обработал ${detectorLoad.sourceFramesConsumed.toLocaleString("ru-RU")} кадров detector-only без замен и ошибок.`,
limitation: load
? "Capacity полного графа доказан как минимум до 15 FPS, но production repeatability не принята: delivery на 10 FPS немонотонно хуже 12/15 из-за редкого decode/scheduling tail. Истинность классов, collision safety и physical-live не проверялись; команды отключены."
: "Прогон доказывает runtime envelope, а не истинность классов, качество track identity, корректность risk policy или безопасность движения. Production authority и команды отключены.",
}}
method={{
completeness: result.method.completeness,
@@ -79,13 +96,24 @@ export function M48SFixedClassDetectorResultView({
result={(
<LaboratoryResultSummary
title={hardening
? "Что сравнивать: один и тот же полный прогон до и после hardening"
? load
? "Что сравнивать: один graph на 10 / 12 / 15 FPS"
: "Что сравнивать: один и тот же полный прогон до и после hardening"
: integrated
? "Что дал прогон: полный world-state graph проходит realtime envelope"
: "Что дал прогон: RF-DETR-L проходит detector-only realtime envelope"}
status={status}
statusTone="success"
metrics={hardening ? [
statusTone={load ? "warning" : "success"}
metrics={load ? [
{ label: "Effective world-state FPS", value: `${decimal(load.production.effectiveWorldStateFps, 3)} / ${decimal(load.reserve.effectiveWorldStateFps, 3)} / ${decimal(load.limit.effectiveWorldStateFps, 3)}`, hint: "вход 10 / 12 / 15 FPS" },
{ label: "Delivered / superseded", value: `${load.production.deliveredWorldStates.toLocaleString("ru-RU")}/${load.production.supersededFrames} · ${load.reserve.deliveredWorldStates.toLocaleString("ru-RU")}/${load.reserve.supersededFrames} · ${load.limit.deliveredWorldStates.toLocaleString("ru-RU")}/${load.limit.supersededFrames}`, hint: "10 FPS gate не прошёл · 12 и 15 прошли" },
{ label: "World-state p95", value: `${decimal(load.production.worldStateCompletionAgeP95Ms, 3)} / ${decimal(load.reserve.worldStateCompletionAgeP95Ms, 3)} / ${decimal(load.limit.worldStateCompletionAgeP95Ms, 3)} ms`, hint: "10 / 12 / 15 FPS" },
{ label: "World-state p99", value: `${decimal(load.production.worldStateCompletionAgeP99Ms, 3)} / ${decimal(load.reserve.worldStateCompletionAgeP99Ms, 3)} / ${decimal(load.limit.worldStateCompletionAgeP99Ms, 3)} ms`, hint: "хвост не растёт вместе с rate" },
{ label: "Decode maximum", value: `${decimal(load.production.decodeMaximumMs, 0)} / ${decimal(load.reserve.decodeMaximumMs, 0)} / ${decimal(load.limit.decodeMaximumMs, 0)} ms`, hint: "редкий source/decode tail · не steady compute" },
{ label: "Detector p95", value: `${decimal(load.production.detectorP95Ms, 3)} / ${decimal(load.reserve.detectorP95Ms, 3)} / ${decimal(load.limit.detectorP95Ms, 3)} ms`, hint: "тот же RF-DETR · один inference" },
{ label: "GPU mean", value: `${decimal(load.production.gpuUtilizationMeanPercent)}% / ${decimal(load.reserve.gpuUtilizationMeanPercent)}% / ${decimal(load.limit.gpuUtilizationMeanPercent)}%`, hint: "10 / 12 / 15 FPS · насыщения нет" },
{ label: "VRAM / process RAM peak", value: `${decimal(Math.max(...load.comparison.scenarios.map((scenario) => scenario.gpuMemoryMaximumMib)) / 1024, 2)} / ${decimal(Math.max(...load.comparison.scenarios.map((scenario) => scenario.processPeakRssMib)) / 1024, 2)} GiB`, hint: "общий GPU counter / graph process RSS" },
] : hardening ? [
{ label: "World-state FPS", value: `${decimal(hardening.baseline.effectiveWorldStateFps, 3)} → ${decimal(hardening.hardened.effectiveWorldStateFps, 3)}`, hint: "до → после · target ≥ 9.5 FPS" },
{ label: "Задержка p95", value: `${decimal(hardening.baseline.worldStateCompletionAgeP95Ms, 3)} → ${decimal(hardening.hardened.worldStateCompletionAgeP95Ms, 3)} ms`, hint: `p99 ${decimal(hardening.baseline.worldStateCompletionAgeP99Ms, 3)} → ${decimal(hardening.hardened.worldStateCompletionAgeP99Ms, 3)} ms` },
{ label: "Максимальная задержка", value: `${decimal(hardening.baseline.worldStateCompletionAgeMaximumMs, 3)} → ${decimal(hardening.hardened.worldStateCompletionAgeMaximumMs, 3)} ms`, hint: "полный прогон без prewarm" },
@@ -101,18 +129,24 @@ export function M48SFixedClassDetectorResultView({
{ label: "GPU / VRAM peak", value: `${decimal(integrated.gpuUtilizationMaximumPercent, 0)}% / ${decimal(integrated.gpuMemoryMaximumMib / 1024)} GiB`, hint: `GPU mean ${decimal(integrated.gpuUtilizationMeanPercent)}% · ${decimal(integrated.gpuPowerMaximumW)} W` },
] : [
{ label: "Detector capacity", value: `${decimal(selected?.capacityFps ?? 0)} FPS`, hint: "RF-DETR-L TensorRT/Triton" },
{ label: "Completion age p95", value: `${decimal(load.completionAgeP95Ms)} ms`, hint: "detector-only · target ≤ 175 ms" },
{ label: "Consumed / replaced", value: `${load.sourceFramesConsumed.toLocaleString("ru-RU")} / ${load.sourceFrameReplacements}`, hint: `${decimal(load.effectiveConsumedFps, 3)} source FPS · ${load.failures} failures` },
{ label: "GPU / VRAM peak", value: `${decimal(load.gpuUtilizationMaximumPercent, 0)}% / ${decimal(load.gpuMemoryMaximumMib / 1024)} GiB`, hint: `GPU mean ${decimal(load.gpuUtilizationMeanPercent)}% · queue ${load.queueMaximumDepth}/${load.queueCapacity}` },
{ label: "Completion age p95", value: `${decimal(detectorLoad.completionAgeP95Ms)} ms`, hint: "detector-only · target ≤ 175 ms" },
{ label: "Consumed / replaced", value: `${detectorLoad.sourceFramesConsumed.toLocaleString("ru-RU")} / ${detectorLoad.sourceFrameReplacements}`, hint: `${decimal(detectorLoad.effectiveConsumedFps, 3)} source FPS · ${detectorLoad.failures} failures` },
{ label: "GPU / VRAM peak", value: `${decimal(detectorLoad.gpuUtilizationMaximumPercent, 0)}% / ${decimal(detectorLoad.gpuMemoryMaximumMib / 1024)} GiB`, hint: `GPU mean ${decimal(detectorLoad.gpuUtilizationMeanPercent)}% · queue ${detectorLoad.queueMaximumDepth}/${detectorLoad.queueCapacity}` },
]}
conclusion={{
proved: hardening
proved: load
? `Полный single-pass graph сохранил bounded queues 2/2, нулевые failed/stale/rejected/unavailable и нулевые дополнительные inference-проходы во всех трёх режимах. Reserve 12 FPS прошёл с delivery ${(load.reserve.deliveryRatio * 100).toLocaleString("ru-RU", { maximumFractionDigits: 3 })}% и p95 ${decimal(load.reserve.worldStateCompletionAgeP95Ms, 3)} ms; 15 FPS также прошли с delivery ${(load.limit.deliveryRatio * 100).toLocaleString("ru-RU", { maximumFractionDigits: 3 })}%. Вычислительная capacity доказана как минимум до 15 FPS без более мощного Worker.`
: hardening
? `На полном сравнительном прогоне с ${hardening.hardened.sourceFramesAdmitted.toLocaleString("ru-RU")} одинаковыми входными кадрами hardening сохранил realtime FPS, доставил на ${(hardening.hardened.deliveredWorldStates - hardening.baseline.deliveredWorldStates).toLocaleString("ru-RU")} world states больше и сократил вытеснения ${hardening.baseline.supersededFrames} → ${hardening.hardened.supersededFrames}. Максимальный стоп rolling stage уменьшился ${decimal(hardening.baseline.rollingMaximumMs, 3)} → ${decimal(hardening.hardened.rollingMaximumMs, 3)} ms. Отдельный prewarm-прогон снизил первый detector frame ${decimal(hardening.startup.baseline.detectorMs, 3)} → ${decimal(hardening.startup.prewarmed.detectorMs, 3)} ms и первый world state ${decimal(hardening.startup.baseline.worldStateMs, 3)} → ${decimal(hardening.startup.prewarmed.worldStateMs, 3)} ms без дополнительного inference на кадрах.`
: integrated
? `На Worker 006 полный граф обработал ${integrated.sourceFramesAdmitted.toLocaleString("ru-RU")} входных кадров, доставил ${integrated.deliveredWorldStates.toLocaleString("ru-RU")} состояний без ошибок, удержал все очереди в пределах ${integrated.queueCapacity} и p95 ${decimal(integrated.worldStateCompletionAgeP95Ms, 3)} ms. Advisory сформировал публикации по семействам: geometry-only (${integrated.advisoryFamilyCounts["generic-obstacle"].toLocaleString("ru-RU")}), люди (${integrated.advisoryFamilyCounts.person.toLocaleString("ru-RU")}), животные (${integrated.advisoryFamilyCounts.animal.toLocaleString("ru-RU")}) и транспорт (${integrated.advisoryFamilyCounts.vehicle.toLocaleString("ru-RU")}); это не количество уникальных физических объектов и не потребовало второго inference.`
: `RF-DETR-L ${decimal(load.durationSeconds / 60, 0)} минут устойчиво потреблял source-paced поток около 10 FPS: ${load.sourceFramesConsumed.toLocaleString("ru-RU")} кадров, 0 замен, 0 ошибок, completion-age p95 ${decimal(load.completionAgeP95Ms, 3)} ms.`,
notProved: "Не доказаны unbiased precision/recall классов, независимое качество track identity и risk policy, поведение planner или collision safety. Кадровые рамки не заменяют геометрическую occupancy-карту.",
decision: hardening
: `RF-DETR-L ${decimal(detectorLoad.durationSeconds / 60, 0)} минут устойчиво потреблял source-paced поток около 10 FPS: ${detectorLoad.sourceFramesConsumed.toLocaleString("ru-RU")} кадров, 0 замен, 0 ошибок, completion-age p95 ${decimal(detectorLoad.completionAgeP95Ms, 3)} ms.`,
notProved: load
? `Не закрыта repeatability delivery на production-rate: 10 FPS дали ${(load.production.deliveryRatio * 100).toLocaleString("ru-RU", { maximumFractionDigits: 3 })}% при gate ${(load.production.thresholds.minimumDeliveryRatio * 100).toLocaleString("ru-RU", { maximumFractionDigits: 1 })}%. Немонотонность 10 → 12 → 15 и decode maxima 3,2–3,6 s не позволяют объявить production envelope принятым.`
: "Не доказаны unbiased precision/recall классов, независимое качество track identity и risk policy, поведение planner или collision safety. Кадровые рамки не заменяют геометрическую occupancy-карту.",
decision: load
? "Не усиливать GPU и не добавлять второй детектор. Сначала изолировать/предзагружать video decode и измерить scheduler tail, затем повторить тот же sealed 10/12/15 FPS набор серией прогонов. До закрытия repeatability production switch не разрешён."
: hardening
? "Сохранить разгрузку cyclic GC и обязательный detector prewarm как текущий runtime baseline. Следующий этап — измерять запас realtime при росте сцены и числа семантических объектов, не добавляя второй детектор и не расширяя inference-нагрузку. Production switch не разрешён."
: "Сохранить RF-DETR-L как risk-semantic shadow provider полного reference graph. Не классифицировать миллионы статических форм: неизвестное неподвижное препятствие остаётся geometry-owned и объезжается; классы сохраняются для людей, животных и транспорта. Production switch не разрешён.",
}}
@@ -45,6 +45,38 @@ function resultPayload() {
selected: false,
...overrides,
});
const loadScenario = (id, loadPurpose, rate, delivered, superseded, targetPassed) => ({
id,
load_purpose: loadPurpose,
requested_source_rate_hz: rate,
source_frames_admitted: 4489,
delivered_world_states: delivered,
superseded_frames: superseded,
delivery_ratio: delivered / 4489,
effective_world_state_fps: rate * 0.975,
world_state_completion_age_p95_ms: 75,
world_state_completion_age_p99_ms: 100,
world_state_completion_age_maximum_ms: 400,
decode_p95_ms: 12,
decode_maximum_ms: 3200,
detector_p95_ms: 40,
detector_maximum_ms: 370,
gpu_utilization_mean_percent: 35,
gpu_utilization_maximum_percent: 85,
gpu_memory_maximum_mib: 9584,
process_peak_rss_mib: 2327,
queue_high_watermarks: { detector: 2, geometry: 2, temporal: 2, rolling: 2, threat: 2 },
queue_capacity: 2,
additional_inference_passes: 0,
integrity_gate_passed: true,
operating_target_gate_passed: targetPassed,
thresholds: {
minimum_delivery_ratio: rate === 10 ? 0.999 : rate === 12 ? 0.995 : 0.95,
minimum_effective_world_state_fps: rate * 0.95,
maximum_world_state_completion_p95_ms: rate === 10 ? 125 : rate === 12 ? 150 : 175,
},
frame_evidence_sha256: "8".repeat(64),
});
return {
schema_version: "missioncore.m48s-fixed-class-detector-result-view/v1",
result_id: resultId,
@@ -172,6 +204,20 @@ function resultPayload() {
validation_frames: 1000,
},
},
load_envelope: {
schema_version: "missioncore.m48s-load-envelope-comparison/v1",
production_rate_repeatability_passed: false,
reserve_12_fps_passed: true,
limit_15_fps_passed: true,
load_envelope_accepted: false,
compute_capacity_at_least_fps: 15,
bottleneck_interpretation: "rare-source-decode-or-scheduling-tail-not-steady-gpu-saturation",
scenarios: [
loadScenario("production-10fps", "production-rate", 10, 4483, 6, false),
loadScenario("reserve-12fps", "reserve-gate", 12, 4477, 12, true),
loadScenario("limit-15fps", "limit-discovery", 15, 4488, 1, true),
],
},
},
decision: {
selected_candidate: "rf-detr",
@@ -179,6 +225,11 @@ function resultPayload() {
integrated_world_state_gate_evaluated: true,
integrated_world_state_gate_passed: true,
detector_replacement_authorized: false,
load_envelope_evaluated: true,
production_rate_repeatability_passed: false,
reserve_12_fps_passed: true,
limit_15_fps_passed: true,
load_envelope_accepted: false,
production_accepted: false,
},
limitations: ["No independent semantic ground truth."],
@@ -212,6 +263,10 @@ test("M4.8S result exposes complete graph load without production authority", as
assert.equal(result.metrics.runtimeHardening.baseline.supersededFrames, 9);
assert.equal(result.metrics.runtimeHardening.hardened.supersededFrames, 1);
assert.equal(result.metrics.runtimeHardening.startup.prewarmed.worldStateMs, 60.516957);
assert.equal(result.metrics.loadEnvelope.scenarios[0].operatingTargetGatePassed, false);
assert.equal(result.metrics.loadEnvelope.scenarios[1].deliveredWorldStates, 4477);
assert.equal(result.metrics.loadEnvelope.computeCapacityAtLeastFps, 15);
assert.equal(result.decision.loadEnvelopeAccepted, false);
assert.equal(result.decision.integratedWorldStateGatePassed, true);
assert.equal(result.decision.productionAccepted, false);
assert.equal(result.authority.navigationOrSafetyAccepted, false);