Harden RC7 API response contracts
GeoIntel release gates / Compile, test, contracts and builds (push) Canceled after 0s
GeoIntel release gates / Python and npm vulnerability policy (push) Canceled after 0s
GeoIntel release gates / GIS image, SBOM and container scan (push) Canceled after 0s

This commit is contained in:
Codex
2026-07-18 05:07:35 +02:00
parent 8e49b857dd
commit 0fae53a7de
36 changed files with 886 additions and 153 deletions
+35 -1
View File
@@ -495,9 +495,25 @@ def test_dhmv_endpoints_use_canonical_envelopes(monkeypatch) -> None:
"analyze",
lambda *_args, **_kwargs: {
"dataset_id": str(output_dataset_id),
"product_key": "dtm_1m",
"surface_model": "terrain",
"selection_bbox": lambert_bbox_payload().bbox.model_dump(),
"sample_count": 100,
"summary": {"metric_value": 25.0, "metric_unit": "m TAW", "metrics": []},
"slope_sample_count": 81,
"coverage_ratio": 1.0,
"resolution_m": 5.0,
"vertical_reference": "TAW",
"summary": {
"metric_label": "Gemiddelde terreinhoogte",
"metric_value": 25.0,
"metric_unit": "m TAW",
"aggregation_method": "mean",
"primary_metric_key": "terrain_elevation_mean_m",
"metrics": [],
},
"unsupported_metrics": ["water_depth_m", "water_volume_m3"],
"limitation_message": "Terrain height is not water depth.",
"generated_at": "2026-07-18T00:00:00Z",
},
)
monkeypatch.setattr(
@@ -507,7 +523,25 @@ def test_dhmv_endpoints_use_canonical_envelopes(monkeypatch) -> None:
"dataset_id": str(output_dataset_id),
"dataset_ids": [str(output_dataset_id)],
"partition_count": 1,
"product_key": "dtm_1m",
"surface_model": "terrain",
"selection_bbox": lambert_bbox_payload().bbox.model_dump(),
"sample_count": 100,
"slope_sample_count": 81,
"coverage_ratio": 1.0,
"resolution_m": 5.0,
"vertical_reference": "TAW",
"summary": {
"metric_label": "Gemiddelde terreinhoogte",
"metric_value": 25.0,
"metric_unit": "m TAW",
"aggregation_method": "mean",
"primary_metric_key": "terrain_elevation_mean_m",
"metrics": [],
},
"unsupported_metrics": ["water_depth_m", "water_volume_m3"],
"limitation_message": "Terrain height is not water depth.",
"generated_at": "2026-07-18T00:00:00Z",
},
)
app.dependency_overrides[get_db] = lambda: db