fix(map): reject a zones layer without a deployment section

The README documents deployment as required when zones exist, but load_map
only enforced the reverse direction (deployment without zones). A map with
a zones layer and no deployment now fails with MapValidationError instead
of loading with unreachable deployment zones.
This commit is contained in:
2026-09-20 17:15:29 +02:00
parent a8c7e37f8e
commit 130087a556
2 changed files with 13 additions and 0 deletions
+7
View File
@@ -131,6 +131,13 @@ def _check_deployment(
deployment: dict[str, str], zones: tuple[str, ...] | None, path: Path
) -> None:
if not deployment:
if zones is not None:
msg = (
"zones layer declared but no deployment section (the README "
"requires deployment when zones exist: each zone letter needs "
"a side)"
)
raise MapValidationError(path, msg)
return
if zones is None:
msg = "deployment declared but no zones layer"