perf(perception): split safety and vegetation rates

This commit is contained in:
DCCONSTRUCTIONS
2026-08-28 12:59:34 +03:00
parent e1c3e7e90a
commit 7a3b0b84d0
7 changed files with 292 additions and 56 deletions
@@ -54,12 +54,15 @@ def test_three_layer_gate_joins_exact_frames_and_preserves_false_authority(
"config_sha256": "c" * 64,
"policy_sha256": "d" * 64,
"provider_map_sha256": "e" * 64,
"inference_stride": 2,
},
},
"acceptance": {
"minimum_graph_world_state_fps": 11.2,
"minimum_vegetation_fps": 11.2,
"maximum_vegetation_completion_p95_ms": 125.0,
"minimum_vegetation_timeline_fps": 11.2,
"minimum_vegetation_inference_fps": 5.6,
"maximum_vegetation_inference_completion_p95_ms": 125.0,
"maximum_semantic_evidence_source_age_ms": 125.0,
"maximum_combined_output_age_p99_ms": 125.0,
},
"authority": {
@@ -98,6 +101,7 @@ def test_three_layer_gate_joins_exact_frames_and_preserves_false_authority(
{
"schema_version": EVIDENCE.VEGETATION_SCHEMA,
"result_id": "vegetation-test",
"integrated_load_gate_passed": True,
"source": {"requested_source_rate_hz": 12.0},
"candidate": {"candidate_key": "ddrnet", "checkpoint_sha256": "b" * 64},
"identity": {
@@ -108,10 +112,16 @@ def test_three_layer_gate_joins_exact_frames_and_preserves_false_authority(
"execution": {
"frame_count": EVIDENCE.FRAME_COUNT,
"effective_fps": 11.75,
"effective_timeline_fps": 11.75,
"effective_inference_fps": 5.875,
"inference_stride": 2,
"inference_frame_count": 2245,
"held_evidence_frame_count": 2244,
"capacity_drop_count": 0,
},
"timing": {
"completion_age_ms": {"p95": 25.0},
"inference_completion_age_ms": {"p95": 25.0},
"stage_ms": {"p95": 20.0},
"inference_ms": {"p95": 18.0},
},
@@ -148,9 +158,14 @@ def test_three_layer_gate_joins_exact_frames_and_preserves_false_authority(
"".join(
json.dumps(
{
"schema_version": "missioncore.lab-v1-vegetation-integrated-frame/v1",
"schema_version": "missioncore.lab-v1-vegetation-integrated-frame/v2",
"sequence": index,
"completion_age_ms": 20.0,
"inference_executed": index % 2 == 0,
"semantic_source_sequence": index - (index % 2),
"semantic_evidence_source_age_ms": 20.0
if index % 2 == 0
else 103.333333,
}
)
+ "\n"
@@ -227,6 +242,8 @@ def test_integrated_release_is_deterministic_and_contains_one_vegetation_candida
release = json.loads(release_stream.read())
assert "payload/run_vegetation_integrated_load.py" in names
assert "payload/build_vegetation_integrated_graph_evidence.py" in names
assert "payload/lab-v1-vegetation-integrated-multirate-shadow-v2.json" in names
assert release["semantic_inference_rate_hz"] == 6.0
assert release["scope"]["heavy_vegetation_candidates"] == ["ddrnet"]
assert all(value is False for value in release["authority"].values())
@@ -234,7 +251,7 @@ def test_integrated_release_is_deterministic_and_contains_one_vegetation_candida
def test_worker_gate_reuses_shared_barrier_and_keeps_canonical_triton_unchanged() -> None:
runner = RUNNER_PATH.read_text(encoding="utf-8")
wrapper = POWERSHELL_PATH.read_text(encoding="utf-8")
assert '"source-paced-integrated-shadow/v1"' in runner
assert '"source-paced-multirate-integrated-shadow/v2"' in runner
assert "wait_for_shared_start(" in runner
assert '"bounded-compressed-scene-buffer/v1"' in runner
assert "buffer_compressed_video(" in runner
@@ -243,6 +260,8 @@ def test_worker_gate_reuses_shared_barrier_and_keeps_canonical_triton_unchanged(
assert "decode_source(source_capture, expected_size)" in runner
assert '"camera_semantics_can_clear_rigid_geometry": False' in runner
assert "--runtime-video-cache /tmp/vegetation-right.mp4" in wrapper
assert "--inference-stride 2" in wrapper
assert '--tmpfs "/tmp:rw,noexec,nosuid,size=2g"' in wrapper
assert "$VegetationLoadGate" in wrapper
assert '"vegetation"' in wrapper
assert "if ($canonicalAfter.Id -cne $canonicalId" not in wrapper