From 720ad71087b80029550652c8b07b12c917a7b174 Mon Sep 17 00:00:00 2001 From: Codex Date: Mon, 13 Jul 2026 18:39:50 +0200 Subject: [PATCH] Persist Mol operator evidence --- CHANGELOG.md | 1 + backend/tests/test_sprint178_mol_operational_pack.py | 1 + docs/AI_PIPELINES.md | 3 +++ scripts/README.md | 7 ++++++- scripts/run_mol_operational_validation.sh | 10 ++++++++-- 5 files changed, 19 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e3c547d..05b19c42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - Protected the four new positive zones as validation holdouts; they are not silently eligible for model training. - Hardened real-data quality workflows to persist manifest-backed EPSG:4326 Areas and Mol project regions alongside datasets and analysis evidence. - Added a single Mol operator runner that composes existing positive QA/QC and background detection-pressure workflows without fake metrics or model downloads. +- Made the all-in-one runner's default evidence output persistent under `/app/storage/operator-evidence` and fixed manifest path handling in multi-sample aggregation. - Added all-in-one image/readiness wiring and focused regression coverage; APIs, migrations, model activation and frontend behavior remain unchanged. ## Sprint 177 Mol-first operating context (2026-07-13) diff --git a/backend/tests/test_sprint178_mol_operational_pack.py b/backend/tests/test_sprint178_mol_operational_pack.py index 0f2b0236..65ce5a76 100644 --- a/backend/tests/test_sprint178_mol_operational_pack.py +++ b/backend/tests/test_sprint178_mol_operational_pack.py @@ -112,5 +112,6 @@ def test_mol_operational_runner_uses_real_positive_qa_and_background_paths() -> assert "mol_operational_validation_summary.json" in runner assert "fixture_mode" not in runner assert "manual-fixture-detector" not in runner + assert "/app/storage/operator-evidence/mol-operational-validation" in runner assert "bash -n scripts/run_mol_operational_validation.sh" in readiness assert "COPY scripts/run_mol_operational_validation.sh" in dockerfile diff --git a/docs/AI_PIPELINES.md b/docs/AI_PIPELINES.md index fe92bead..347571f1 100644 --- a/docs/AI_PIPELINES.md +++ b/docs/AI_PIPELINES.md @@ -241,6 +241,9 @@ quality matrix and background detection matrix. Positive runs use persisted GRB only report persisted detection pressure and never synthesize QA metrics. AOI bounds from the operator manifest are persisted as EPSG:4326 `Area` records so every generated project opens as a complete map context. +In the all-in-one runtime combined JSON/Markdown evidence defaults to +`/app/storage/operator-evidence/mol-operational-validation`, which is part of +the persistent storage mount rather than the replaceable container layer. For confidence-threshold calibration, use the sweep wrapper: diff --git a/scripts/README.md b/scripts/README.md index 16b5a9a1..391887d9 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -225,10 +225,15 @@ operator command: ```bash docker exec -it \ -e OPERATOR_SAMPLE_MANIFEST_PATH=/app/storage/operator-data/mol-operational-1024/operator_samples_manifest.json \ - -e MOL_VALIDATION_OUTPUT_DIR=/app/artifacts/mol-operational-validation/current \ + -e MOL_VALIDATION_OUTPUT_DIR=/app/storage/operator-evidence/mol-operational-validation/current \ geointel bash /app/scripts/run_mol_operational_validation.sh http://127.0.0.1 ``` +Inside the all-in-one image that persistent storage path is also the automatic +default. Evidence therefore survives container replacement. Local repository +runs keep using `artifacts/mol-operational-validation/` unless the +output variable is set explicitly. + The runner defaults to the active local model at tile `512`, overlap `64`, confidence `0.15` and QA IoU `0.25`. Every positive run persists Project, Area, Dataset, Job, AnalysisRun, Detection, QualityCheck, Metric and Export records. diff --git a/scripts/run_mol_operational_validation.sh b/scripts/run_mol_operational_validation.sh index 8d319011..1f4b4f57 100644 --- a/scripts/run_mol_operational_validation.sh +++ b/scripts/run_mol_operational_validation.sh @@ -10,7 +10,8 @@ Usage: Optional environment: MOL_POSITIVE_SAMPLE_SLUGS Positive Mol holdouts. Default: mol_achterbos mol_gompel mol_donk mol_postel. MOL_BACKGROUND_SAMPLE_SLUGS Mol background controls. Default: postel_bos. - MOL_VALIDATION_OUTPUT_DIR Output directory, default: artifacts/mol-operational-validation/. + MOL_VALIDATION_OUTPUT_DIR Output directory. Defaults to persistent /app/storage/operator-evidence + in the all-in-one container and artifacts/ locally. QUALITY_MODEL_ASSET_IDS Local model asset ID, default: active configured model. QUALITY_TILE_SIZES Default: 512. QUALITY_TILE_OVERLAPS Default: 64. @@ -25,11 +26,16 @@ EOF ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" cd "${ROOT}" +default_validation_output="artifacts/mol-operational-validation/$(date -u +%Y%m%dT%H%M%SZ)" +if [ "${ROOT}" = "/app" ] && [ -d "/app/storage" ]; then + default_validation_output="/app/storage/operator-evidence/mol-operational-validation/$(date -u +%Y%m%dT%H%M%SZ)" +fi + BASE_URL="${1:-${GE_INTEL_BASE_URL:-http://localhost:1202}}" OPERATOR_SAMPLE_MANIFEST_PATH="${OPERATOR_SAMPLE_MANIFEST_PATH:-storage/operator-data/mol-operational-1024/operator_samples_manifest.json}" MOL_POSITIVE_SAMPLE_SLUGS="${MOL_POSITIVE_SAMPLE_SLUGS:-mol_achterbos mol_gompel mol_donk mol_postel}" MOL_BACKGROUND_SAMPLE_SLUGS="${MOL_BACKGROUND_SAMPLE_SLUGS:-postel_bos}" -MOL_VALIDATION_OUTPUT_DIR="${MOL_VALIDATION_OUTPUT_DIR:-artifacts/mol-operational-validation/$(date -u +%Y%m%dT%H%M%SZ)}" +MOL_VALIDATION_OUTPUT_DIR="${MOL_VALIDATION_OUTPUT_DIR:-${default_validation_output}}" QUALITY_MODEL_ASSET_IDS="${QUALITY_MODEL_ASSET_IDS:-${REAL_MODEL_ASSET_ID:-__active__}}" QUALITY_TILE_SIZES="${QUALITY_TILE_SIZES:-512}" QUALITY_TILE_OVERLAPS="${QUALITY_TILE_OVERLAPS:-64}"