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
+9 -2
View File
@@ -350,7 +350,14 @@ def test_gateway_rejects_symlink_source_and_token(tmp_path: Path) -> None:
)
def test_gateway_submits_tracks_and_imports_digest_bound_artifact(tmp_path: Path) -> None:
@pytest.mark.parametrize(
"result_schema",
["gaussian-pipeline.build-result/v1", "gaussian-pipeline.build-result/v2"],
)
def test_gateway_submits_tracks_and_imports_digest_bound_artifact(
tmp_path: Path,
result_schema: str,
) -> None:
artifact = b"preview-sog"
artifact_sha = hashlib.sha256(artifact).hexdigest()
job_id = "gsp-20260825200000-deadbeef"
@@ -375,7 +382,7 @@ def test_gateway_submits_tracks_and_imports_digest_bound_artifact(tmp_path: Path
return httpx.Response(
200,
json={
"schema_version": "gaussian-pipeline.build-result/v1",
"schema_version": result_schema,
"job_id": job_id,
"runtime": {
"source_revision": "a" * 40,
+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(