fix(results): gate operational AI exports on QA
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:
Jens
2026-08-09 11:31:51 +02:00
parent b76cd1837b
commit 0209167cfd
10 changed files with 313 additions and 8 deletions
+28 -1
View File
@@ -2220,10 +2220,34 @@ Detection run export request:
{
"export_kind": "detection_run",
"analysis_run_id": "uuid",
"intended_use": "review",
"name": "optional-basename"
}
```
`intended_use` is `review` by default. Every detection FeatureCollection and
export record contains a machine-readable `geointel_result` / `result_trust`
contract. Raw model output remains `authoritative: false` and is classified as
`unverified_ai_review_output` when authoritative QA is absent or incomplete.
Feature properties repeat the classification so it survives GIS workflows
that discard collection-level metadata.
`intended_use: operational` fails closed with
`DETECTION_OPERATIONAL_EXPORT_BLOCKED` unless the same persisted run has a
completed detection-versus-reference check that proves all of the following:
- the reference Dataset is authoritative and specifically approved as primary
authority for building validation;
- inference coverage was derived from the persisted tile-manifest union;
- imagery/reference time compatibility is proven;
- geometry is supported and no QA warnings remain;
- false-positive and false-negative counts are both explicitly present and
zero.
Even a passing operational export remains AI-derived and therefore retains
`authoritative: false`, the exact quality-check/reference identifiers and an
operator-review limitation. Model confidence by itself never unlocks export.
Segmentation run export request:
```json
@@ -2251,7 +2275,10 @@ Response persists an `exports` row and writes a deterministic JSON artifact:
Vector dataset exports use the stored dataset GeoJSON. Detection and
segmentation exports use persisted first-class geometry records and the
existing Detection/Segmentation GeoJSON conversion services. Vector selection
existing Detection/Segmentation GeoJSON conversion services. Detection export
in the frontend is deliberately labelled as a control layer and requests
`intended_use: review`; it cannot silently produce an operationally approved
artifact. Vector selection
exports query persisted PostGIS `vector_features` with the supplied EPSG:4326
bbox, write the selected FeatureCollection as a `vector_selection_geojson`
artifact, and persist bbox/feature-count metadata in the export record. When