Prefer governed orthophoto editions in source status
GeoIntel CI / docs-smoke (push) Canceled after 0s
GeoIntel CI / contract-smoke (push) Canceled after 0s

This commit is contained in:
Codex
2026-07-17 02:33:15 +02:00
parent 0c2ebc1ffc
commit 0befca02f8
4 changed files with 84 additions and 10 deletions
@@ -157,6 +157,33 @@ def test_rolling_orthophoto_prefers_explicit_current_snapshot_over_historical_ob
assert report.items[0].latest_source_version == "most_recent_at_2026-07-14"
def test_orthophoto_freshness_prefers_governed_official_edition_over_rolling_marker() -> None:
legacy = _dataset(
"digitaal_vlaanderen_orthophoto",
imported_at=NOW - timedelta(days=2),
observed_at=datetime(2026, 7, 15, tzinfo=timezone.utc),
source_version="most_recent_at_2026-07-15",
)
official = _dataset(
"digitaal_vlaanderen_orthophoto",
imported_at=NOW - timedelta(days=1),
observed_at=datetime(2025, 4, 5, tzinfo=timezone.utc),
source_version="2025.04",
)
report = SourceFreshnessService.build_report(
legacy.project_id,
[legacy, official],
[_version(legacy), _version(official)],
now=NOW,
)
item = report.items[0]
assert item.latest_source_version == "2025.04"
assert item.refresh_policy == "rolling_snapshot"
assert item.review_interval_days == 180
def test_spatial_partitions_do_not_become_a_false_historical_series() -> None:
first = _dataset(
"dov_soil_map",