You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Discovered while V-BAKE-verifying #423 (child of #417).
Symptom: baking the same inputs twice in separate processes produces different.bin files (and some _parked.json sidecars). Two baseline bakes of chunks (5–6)×(3–4) differed; the same bakes with PYTHONHASHSEED=0 were byte-identical.
Cause: set/dict iteration order (hash-seed-dependent) leaks into the order meshes and/or parked cars are emitted, so the serialized byte order varies run-to-run even though the geometry is equivalent.
Why it matters:
The determinism contract referenced in serialize.py / data-model.md §6 ('a re-bake of the same inputs produces a byte-identical file') does not actually hold across processes.
The audit's 'V-BAKE byte-identical rebake' verification protocol (used to check the refactor: codebase organization audit #417 refactor PRs) only holds under a fixed seed — reviewers must pin PYTHONHASHSEED or the check is meaningless.
Fix direction: make emission order deterministic — sort meshes and parked cars by a stable key (e.g. (mesh_type, osm_id), parked cars by source_id) before serialization, the same way buildings are already sorted by osm_id. Then a re-bake is byte-identical regardless of hash seed.
Verify: two bakes of the same inputs in separate processes (no PYTHONHASHSEED set) produce byte-identical .bin + sidecars.
Context: found in PR #437 (#423). Not part of the #417 reorg plan — filed standalone.
Discovered while V-BAKE-verifying #423 (child of #417).
Symptom: baking the same inputs twice in separate processes produces different
.binfiles (and some_parked.jsonsidecars). Two baseline bakes of chunks (5–6)×(3–4) differed; the same bakes withPYTHONHASHSEED=0were byte-identical.Cause: set/dict iteration order (hash-seed-dependent) leaks into the order meshes and/or parked cars are emitted, so the serialized byte order varies run-to-run even though the geometry is equivalent.
Why it matters:
serialize.py/data-model.md §6('a re-bake of the same inputs produces a byte-identical file') does not actually hold across processes.PYTHONHASHSEEDor the check is meaningless.Fix direction: make emission order deterministic — sort meshes and parked cars by a stable key (e.g.
(mesh_type, osm_id), parked cars bysource_id) before serialization, the same way buildings are already sorted byosm_id. Then a re-bake is byte-identical regardless of hash seed.Verify: two bakes of the same inputs in separate processes (no
PYTHONHASHSEEDset) produce byte-identical.bin+ sidecars.Context: found in PR #437 (#423). Not part of the #417 reorg plan — filed standalone.