diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b966e31..c662e1fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,6 +62,8 @@ to the Map UI without removing Mol/Kempen regression workspaces. - Local RC-4 validation passed 986 backend tests, frontend typecheck/build, the full readiness gate, one Alembic head and complete offline migration SQL. +- Fixed fail-closed AdminVector GeoJSON serialization for Pandas timestamp + properties exposed by the live NGI GeoPackage. ## Sprint 240 Operational forest, agriculture, nature and soil themes (2026-07-17) diff --git a/backend/tests/test_rc4_national_scope_operator.py b/backend/tests/test_rc4_national_scope_operator.py index f0dbe99e..ce0e81cf 100644 --- a/backend/tests/test_rc4_national_scope_operator.py +++ b/backend/tests/test_rc4_national_scope_operator.py @@ -157,5 +157,6 @@ def test_operator_is_packaged_and_guarded_by_readiness() -> None: assert "COPY scripts/provision_belgium_north_sea_scope.py /app/scripts/" in dockerfile assert "py_compile scripts/provision_belgium_north_sea_scope.py" in readiness assert "/datasets/upload" in source + assert "frame.to_json(drop_id=False, default=str)" in source assert "from app.models" not in source assert "INSERT INTO vector_features" not in source diff --git a/docs/CODEX_EXECUTION_LOG.md b/docs/CODEX_EXECUTION_LOG.md index 56342ebf..9b3ad5e1 100644 --- a/docs/CODEX_EXECUTION_LOG.md +++ b/docs/CODEX_EXECUTION_LOG.md @@ -25,6 +25,11 @@ SQL and live-smoke shell syntax. - Tower fetch-only, persistence, live coverage API and browser acceptance are the remaining RC-4 exit evidence. +- The first Tower fetch-only run failed closed before API persistence because + AdminVector exposes `modifdate` as a Pandas `Timestamp`. GeoJSON + serialization was corrected to explicit string conversion and guarded by a + regression assertion; downloaded source artifacts remain operator cache + only. - Froze the RC geography as all Belgian land plus the separately labelled territorial sea, EEZ and continental shelf. diff --git a/scripts/provision_belgium_north_sea_scope.py b/scripts/provision_belgium_north_sea_scope.py index 8647a520..be459edc 100644 --- a/scripts/provision_belgium_north_sea_scope.py +++ b/scripts/provision_belgium_north_sea_scope.py @@ -251,7 +251,7 @@ def read_adminvector_layers(gpkg_path: Path) -> dict[str, dict[str, Any]]: raise RuntimeError( f"NGI layer {layer_name} has {len(frame)} records; expected between {minimum} and {maximum}" ) - payload = json.loads(frame.to_json(drop_id=False)) + payload = json.loads(frame.to_json(drop_id=False, default=str)) source_max_modification = None if "modifdate" in frame.columns: parsed = pandas.to_datetime(frame["modifdate"], errors="coerce", utc=True).dropna()