fix(map): load_map rejects two deployment sides bound to the same zone letter (build_states resets its placed set per side, so shared letters deployed camps on top of each other) - fail-fast MapValidationError + README rule, reject/accept tests
This commit is contained in:
@@ -140,6 +140,14 @@ def _check_deployment(
|
||||
if missing:
|
||||
msg = f"deployment zones absent from zones layer: {missing}"
|
||||
raise MapValidationError(path, msg)
|
||||
letters = list(deployment.values())
|
||||
shared = sorted({letter for letter in letters if letters.count(letter) > 1})
|
||||
if shared:
|
||||
msg = (
|
||||
"deployment sides share zone letters (each side needs its own "
|
||||
f"distinct zone, or they deploy on top of each other): {shared}"
|
||||
)
|
||||
raise MapValidationError(path, msg)
|
||||
|
||||
|
||||
def load_map(path: Path) -> MapSpec:
|
||||
|
||||
Reference in New Issue
Block a user