feat(simulation): prefer rover world terrain

This commit is contained in:
DCCONSTRUCTIONS
2026-08-26 17:17:48 +03:00
parent 1b6131904a
commit ae13ca5946
4 changed files with 38 additions and 6 deletions
+22
View File
@@ -16,6 +16,7 @@ from k1link.simulation.projects import (
SimulationProjectConflictError,
SimulationProjectService,
SimulationProjectStore,
_world_manifest,
)
from k1link.web.simulation_projects_api import build_simulation_projects_router
@@ -224,6 +225,27 @@ def test_service_materializes_world_manifest_and_deletes_both_copies(tmp_path: P
assert provider.deleted == ["gsp-20260826000000-deadbeef"]
def test_world_manifest_prefers_seed_connected_rover_terrain() -> None:
manifest = _world_manifest(
"sim-" + "a" * 32,
[
{
"role": "collision-mesh",
"logical_path": "collision/scene.collision.glb",
},
{
"role": "rover-terrain-mesh",
"logical_path": "rover/terrain.collision.glb",
},
],
)
assert manifest["collision"]["available"] is True
assert manifest["collision"]["mesh_url"].endswith(
"/artifacts/rover/terrain.collision.glb"
)
def test_service_resumes_a_persisted_provider_job_without_reupload(tmp_path: Path) -> None:
store = SimulationProjectStore(tmp_path)
project = store.create(