Add real data detection QA workflow smoke
GeoIntel CI / docs-smoke (push) Has been cancelled
GeoIntel CI / contract-smoke (push) Has been cancelled

This commit is contained in:
Codex
2026-07-07 00:19:23 +02:00
parent e30e7c4f34
commit f0a58011fe
9 changed files with 641 additions and 0 deletions
+18
View File
@@ -352,6 +352,24 @@ Detection GeoJSON output. It does not download weights or inject detector
fixtures. A zero detection result is still a valid runtime smoke outcome on the
synthetic demo raster.
To validate the configured building model on operator-provided GIS data, mount
or copy a real georeferenced raster and a real reference-building GeoJSON onto
the runtime host, then run:
```bash
REAL_RASTER_PATH=/mnt/user/appdata/geointel/data/orthophoto.tif \
REAL_REFERENCE_VECTOR_PATH=/mnt/user/appdata/geointel/data/reference-buildings.geojson \
bash scripts/verify_real_data_detection_qa_workflow.sh http://192.168.10.150:1202
```
This smoke refuses missing/unsupported inputs, uploads the raster and reference
dataset through the normal dataset service, generates raster tiles, selects a
local model asset, runs configured YOLO detection, compares persisted
detections against persisted `vector_features`, persists QA/QC rows and exports
the detection GeoJSON. It never seeds demo detections, enables fixture mode,
fetches live providers or downloads model weights. Current V1 upload support is
limited to GeoTIFF-style rasters and GeoJSON/JSON reference vectors.
### Run backend
```bash
@@ -0,0 +1,33 @@
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
def test_real_data_detection_qa_smoke_requires_operator_inputs_and_checks_full_chain() -> None:
script_path = ROOT / "scripts" / "verify_real_data_detection_qa_workflow.sh"
readiness = (ROOT / "scripts" / "run_readiness_check.sh").read_text(encoding="utf-8")
assert script_path.exists()
script = script_path.read_text(encoding="utf-8")
assert "bash -n scripts/verify_real_data_detection_qa_workflow.sh" in readiness
assert "REAL_RASTER_PATH" in script
assert "REAL_REFERENCE_VECTOR_PATH" in script
assert "usage()" in script
assert "/api/v1/projects" in script
assert "/datasets/upload" in script
assert "dataset_role=reference" in script
assert "reference_layer_name=buildings" in script
assert "/raster/inspect" in script
assert "/raster/tile" in script
assert "/api/v1/detection/model-assets" in script
assert "/api/v1/detection/yolo/preflight" in script
assert "/api/v1/detection/run" in script
assert "/qa/reference" in script
assert "/api/v1/exports/geojson" in script
assert "Response is not a canonical GeoIntel data envelope" in script
assert "No local model assets are available" in script
assert "demo/workflow" not in script
assert "fixture_mode" not in script
assert "Fixture detections" not in script