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
@@ -514,7 +514,29 @@ def test_api_uses_canonical_envelopes(monkeypatch) -> None:
monkeypatch.setattr(
ThematicRasterAnalysisService,
"analyze",
lambda *_args, **_kwargs: {"dataset_id": str(dataset_id), "theme": "population", "summary": {"metric_value": 10.0}},
lambda *_args, **_kwargs: {
"dataset_id": str(dataset_id),
"product_key": "population_density_2019",
"theme": "population",
"metric_kind": "population_density",
"selection_bbox": payload().bbox.model_dump(),
"selected_cell_count": 10,
"valid_cell_count": 10,
"coverage_ratio": 1.0,
"resolution_m": 100.0,
"observation_year": 2019,
"summary": {
"metric_label": "Geraamd aantal inwoners",
"metric_value": 10.0,
"metric_unit": "inwoners",
"aggregation_method": "sum_density_cells",
"primary_metric_key": "estimated_inhabitants",
"metrics": [],
},
"unsupported_metrics": ["current_population"],
"limitation_message": "2019 density estimate.",
"generated_at": "2026-07-18T00:00:00Z",
},
)
app.dependency_overrides[get_db] = lambda: db
try: