feat(junction): enforce stage3 geometry validation on save

This commit is contained in:
que01 committed 2026-09-07 15:47:34 +08:00
1 parent cb55b3ad68
commit 63c6cefce7
9 files changed
+90

No files matched your search

+9
View File
@@ -289,3 +289,12 @@ warning, and blocking/invariant fields; a profile is metadata and rule
configuration, not a client-side save decision. Keep the compiler as the sole
producer of structure and diagnostics so the client cannot reclassify a
junction from node counts.
## 15. Save-time geometry validation
`saveEdits()` must run the same `resolveDirectEditConstraints()` used by
`editPreview()` after validating the candidate document and before writing it.
Any diagnostic with `severity: 'error'` returns HTTP 400 and leaves the active
document byte-identical; warnings remain saveable. This prevents a client from
skipping preview and persisting a width, corner radius, crossing offset, or
stop-line value that the compiler rejects. Version conflicts are checked first
and continue to return HTTP 409 without invoking geometry validation writes.