fix(ci): restore release gates and contract baseline (fixes #4)
Managed validation / full (pull_request) Canceled after 0s
GeoIntel release gates / Compile, test, contracts and builds (pull_request) Canceled after 0s
GeoIntel release gates / Python and npm vulnerability policy (pull_request) Canceled after 0s
GeoIntel release gates / GIS image, SBOM and container scan (pull_request) Canceled after 0s
GeoIntel release gates / Python and npm vulnerability policy (push) Failing after 22s
GeoIntel release gates / Compile, test, contracts and builds (push) Waiting to run
GeoIntel release gates / GIS image, SBOM and container scan (push) Failing after 45s

This commit is contained in:
NuklearRabbit
2026-08-29 02:00:23 +02:00
parent d39f703abf
commit edb762219c
38 changed files with 133 additions and 96 deletions
@@ -1,4 +1,5 @@
from pathlib import Path
from tests.frontend_contract import read_feature
ROOT = Path(__file__).resolve().parents[2]
@@ -7,12 +8,11 @@ ROOT = Path(__file__).resolve().parents[2]
def test_detection_lab_has_guided_threshold_calibration_runner() -> None:
hook = ROOT / "frontend" / "src" / "hooks" / "useDetectionWorkflow.ts"
lab = ROOT / "frontend" / "src" / "components" / "detection" / "DetectionLab.tsx"
app = ROOT / "frontend" / "src" / "App.tsx"
todo = ROOT / "docs" / "TODO.md"
hook_source = hook.read_text(encoding="utf-8")
lab_source = lab.read_text(encoding="utf-8")
app_source = app.read_text(encoding="utf-8")
app_source = read_feature("shell")
todo_source = todo.read_text(encoding="utf-8")
assert "interface DetectionCalibrationRunRow" in hook_source
@@ -22,22 +22,22 @@ def test_detection_lab_has_guided_threshold_calibration_runner() -> None:
assert "detectionCalibrationRows" in hook_source
assert "detectionCalibrationError" in hook_source
assert "runDetectionCalibration" in hook_source
assert "detectionApi.run({" in hook_source
assert "executeDetection(" in hook_source
# Every requested threshold is reported, but from one inference pass at the
# lowest cut: detections above a higher cut are a subset of it, and
# suppression walks candidates in descending confidence, so the kept set
# above a cut does not depend on the threshold the run used. Asserting the
# old per-threshold loop pinned N GPU passes that produced identical numbers.
assert "confidence_threshold: lowestThreshold" in hook_source
assert "lowestThreshold," in hook_source
assert "calibration_thresholds: thresholds" in hook_source
assert "calibration_sweep" in hook_source
assert "parameters_json: { calibration: true, calibration_thresholds: thresholds }" in hook_source
assert "{ calibration: true, calibration_thresholds: thresholds }," in hook_source
assert "detectionApi.compareWithReference(result.analysis_run_id" in hook_source
assert "reference_dataset_id: detectionReferenceDatasetId" in hook_source
assert "Select a reference dataset before calibration" in hook_source
assert "Provide at least one valid threshold between 0 and 1" in hook_source
assert "Configured YOLO calibration requires a tile manifest" in hook_source
assert "Select a local model asset before calibration" in hook_source
assert "reference_dataset_id: referenceDatasetId" in hook_source
assert "Kies eerst een referentiebron om te kalibreren" in hook_source
assert "Geef minstens één geldige drempel tussen 0 en 1 op" in hook_source
assert "Kalibratie met YOLO vereist een beeldtegelmanifest" in hook_source
assert "Kies eerst een lokaal modelbestand om te kalibreren" in hook_source
assert "Modelkalibratie voor beheerders" in lab_source
assert "Voert het lokale model en een kwaliteitscontrole uit" in lab_source