fix: the first write of a newer wall model is not an outdated client (#319)

A stale client can only echo the stored model_version, never raise it. The
'unchanged wall catalogue' refusal now applies only when the submitted model
is not above the stored one; the first v9 write over a v8 document with an
orphan open_span/open_to legitimately drops the legacy projection without
touching the catalogue and passes. The regression pair fixture is produced
by the real writers (stored: v1.68.0-beta.2, sent: current migration) and is
pinned on the frontend byte-for-byte so it cannot drift.

Issue: #319
User-Visible: yes
This commit is contained in:
Codex
2026-08-26 18:20:15 +03:00
parent 3d31d65735
commit 3ab6fa9f8a
6 changed files with 580 additions and 1 deletions
+505
View File
@@ -0,0 +1,505 @@
{
"comment": "stored: produced by the v1.68.0-beta.2 (model v8) writer from the 282 parity input plus one orphan open_span; sent: the same document after the current initial migration. The catalogue is byte-identical, the orphan span is dropped (#319).",
"stored": {
"spaces": [
{
"id": "floor",
"title": "Floor",
"rooms": [
{
"id": "large",
"poly": [
[
0,
0
],
[
1,
0
],
[
1,
0.25
],
[
1,
0.75
],
[
1,
1
],
[
0,
1
]
],
"wall_ids": [
"wall-7cu6gpb7e44ucopgzjm2",
"wall-vgpy3fkbbprvy2cofyq3",
"wall-g33xjvyd5marxwkowoqm",
"wall-tqy5sdtydjrx7syybupl",
"wall-j2ti4ktyymgw4e2r5ns5",
"wall-oq2aqjdsktorqgxatdwh"
]
},
{
"id": "small",
"poly": [
[
1,
0.25
],
[
1.5,
0.25
],
[
1.5,
0.75
],
[
1,
0.75
]
],
"wall_ids": [
"wall-d2hfqa5fvueqwrwo2da7",
"wall-ybr4j2bztfx2wkbwvbwd",
"wall-qancsrbiwkhhy5hos7io",
"wall-g33xjvyd5marxwkowoqm"
]
}
],
"walls": [
{
"key": "0.500000,0.000000@0.0000",
"cm": 15,
"a": [
0,
0
],
"b": [
1,
0
]
}
],
"openings": [
{
"id": "door",
"type": "door",
"x": 0.5,
"y": 0,
"angle": 0,
"length": 0.2,
"host": {
"kind": "wall",
"id": "wall-7cu6gpb7e44ucopgzjm2",
"t": 0.5
}
}
],
"room_drafts": [
{
"id": "draft",
"points": [
[
2,
0
],
[
2.5,
0
],
[
3,
0
]
],
"segments": [
{
"cm": 10,
"id": "wall-ulziozdfsjzlriamibvg"
},
{
"cm": 20,
"id": "wall-bvlpyhrsy6xjgox3g6e6"
}
]
}
],
"open_spans": [
{
"a": [
0.83,
0.91
],
"b": [
0.93,
0.91
]
}
],
"wall_segments": [
{
"id": "wall-oq2aqjdsktorqgxatdwh",
"a": [
0,
0
],
"b": [
0,
1
],
"cm": 0
},
{
"id": "wall-7cu6gpb7e44ucopgzjm2",
"a": [
0,
0
],
"b": [
1,
0
],
"cm": 15
},
{
"id": "wall-j2ti4ktyymgw4e2r5ns5",
"a": [
0,
1
],
"b": [
1,
1
],
"cm": 0
},
{
"id": "wall-vgpy3fkbbprvy2cofyq3",
"a": [
1,
0
],
"b": [
1,
0.25
],
"cm": 0
},
{
"id": "wall-g33xjvyd5marxwkowoqm",
"a": [
1,
0.25
],
"b": [
1,
0.75
],
"cm": 0
},
{
"id": "wall-d2hfqa5fvueqwrwo2da7",
"a": [
1,
0.25
],
"b": [
1.5,
0.25
],
"cm": 0
},
{
"id": "wall-tqy5sdtydjrx7syybupl",
"a": [
1,
0.75
],
"b": [
1,
1
],
"cm": 0
},
{
"id": "wall-qancsrbiwkhhy5hos7io",
"a": [
1,
0.75
],
"b": [
1.5,
0.75
],
"cm": 0
},
{
"id": "wall-ybr4j2bztfx2wkbwvbwd",
"a": [
1.5,
0.25
],
"b": [
1.5,
0.75
],
"cm": 0
}
]
}
],
"markers": [],
"settings": {},
"model_version": 8
},
"sent": {
"spaces": [
{
"id": "floor",
"title": "Floor",
"rooms": [
{
"id": "large",
"poly": [
[
0,
0
],
[
1,
0
],
[
1,
0.25
],
[
1,
0.75
],
[
1,
1
],
[
0,
1
]
],
"wall_ids": [
"wall-7cu6gpb7e44ucopgzjm2",
"wall-vgpy3fkbbprvy2cofyq3",
"wall-g33xjvyd5marxwkowoqm",
"wall-tqy5sdtydjrx7syybupl",
"wall-j2ti4ktyymgw4e2r5ns5",
"wall-oq2aqjdsktorqgxatdwh"
]
},
{
"id": "small",
"poly": [
[
1,
0.25
],
[
1.5,
0.25
],
[
1.5,
0.75
],
[
1,
0.75
]
],
"wall_ids": [
"wall-d2hfqa5fvueqwrwo2da7",
"wall-ybr4j2bztfx2wkbwvbwd",
"wall-qancsrbiwkhhy5hos7io",
"wall-g33xjvyd5marxwkowoqm"
]
}
],
"walls": [
{
"key": "0.500000,0.000000@0.0000",
"cm": 15,
"a": [
0,
0
],
"b": [
1,
0
]
}
],
"openings": [
{
"id": "door",
"type": "door",
"x": 0.5,
"y": 0,
"angle": 0,
"length": 0.2,
"host": {
"kind": "wall",
"id": "wall-7cu6gpb7e44ucopgzjm2",
"t": 0.5
}
}
],
"room_drafts": [
{
"id": "draft",
"points": [
[
2,
0
],
[
2.5,
0
],
[
3,
0
]
],
"segments": [
{
"cm": 10,
"id": "wall-ulziozdfsjzlriamibvg"
},
{
"cm": 20,
"id": "wall-bvlpyhrsy6xjgox3g6e6"
}
]
}
],
"wall_segments": [
{
"id": "wall-oq2aqjdsktorqgxatdwh",
"a": [
0,
0
],
"b": [
0,
1
],
"cm": 0
},
{
"id": "wall-7cu6gpb7e44ucopgzjm2",
"a": [
0,
0
],
"b": [
1,
0
],
"cm": 15
},
{
"id": "wall-j2ti4ktyymgw4e2r5ns5",
"a": [
0,
1
],
"b": [
1,
1
],
"cm": 0
},
{
"id": "wall-vgpy3fkbbprvy2cofyq3",
"a": [
1,
0
],
"b": [
1,
0.25
],
"cm": 0
},
{
"id": "wall-g33xjvyd5marxwkowoqm",
"a": [
1,
0.25
],
"b": [
1,
0.75
],
"cm": 0
},
{
"id": "wall-d2hfqa5fvueqwrwo2da7",
"a": [
1,
0.25
],
"b": [
1.5,
0.25
],
"cm": 0
},
{
"id": "wall-tqy5sdtydjrx7syybupl",
"a": [
1,
0.75
],
"b": [
1,
1
],
"cm": 0
},
{
"id": "wall-qancsrbiwkhhy5hos7io",
"a": [
1,
0.75
],
"b": [
1.5,
0.75
],
"cm": 0
},
{
"id": "wall-ybr4j2bztfx2wkbwvbwd",
"a": [
1.5,
0.25
],
"b": [
1.5,
0.75
],
"cm": 0
}
]
}
],
"markers": [],
"settings": {},
"model_version": 9
}
}