Biarcs change stacking order across save and load #101

Open
opened 2026-10-13 02:28:40 +00:00 by ImBenji · 0 comments
Owner

From the engineering review on 2026-10-13.

lib/utils/map_serialisation.dart:156 writes non-biarcs to lines and biarcs to biarcs, and they are reloaded lines first. List index is the final ZKey tie-break, so a same-z crossing involving a biarc can change which line is on top after reopening.

Evidence: test/review_probes/persist_roundtrip.dart (local, untracked): before [b_first, s_second], after [s_second, b_first]. Every other model field round trips with zero diffs.

Fix sketch: write one ordered list, or persist an order index. Either is a format change, so it needs a schema bump and a migration.

From the engineering review on 2026-10-13. `lib/utils/map_serialisation.dart:156` writes non-biarcs to `lines` and biarcs to `biarcs`, and they are reloaded lines first. List index is the final `ZKey` tie-break, so a same-z crossing involving a biarc can change which line is on top after reopening. **Evidence:** `test/review_probes/persist_roundtrip.dart` (local, untracked): before `[b_first, s_second]`, after `[s_second, b_first]`. Every other model field round trips with zero diffs. **Fix sketch:** write one ordered list, or persist an order index. Either is a format change, so it needs a schema bump and a migration.
ImBenji added the bug label 2026-10-13 02:28:40 +00:00
ImBenji added this to the Arcs & Angles project 2026-10-13 02:28:40 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: IMBENJI.NET/Metro-Map-Maker#101