feat(walls): proto 2 typed wall record, inert geometry, derived kind (#54)

wall.add/wall.update take thickness, position, height and the eight raw
switches; kind is output-only and the GM wall frames echo the full typed
record. Geometry is stored but inert (0/full/centre behaviour), and the
legacy kind/open wire adapter is gone. proto is bumped to 2 with the
harness default, and BannedAlways gains every wall field name with a
WALLDATA positive control.

Tests: schema-7 migrated scene vs the same walls authored via raw switches
gives byte-identical player frames, refusals and per-tile statuses.
Nim 382 / Node 113 green.
This commit is contained in:
2026-11-19 22:21:47 +01:00
parent c1b1e9cf91
commit 77fa2dfe4c
23 changed files with 852 additions and 318 deletions
+6 -6
View File
@@ -113,10 +113,10 @@ export async function runLeak({ origin, gmKey, stateDir, transcript, keepOpen =
// --- the scene -------------------------------------------------------------------------------
// x = 500 is a wall with a door in the middle (y 400..700): the subject starts west of it.
const wallsToAdd = [
{ a: [500, 0], b: [500, 400], kind: 'wall' },
{ a: [500, 400], b: [500, 700], kind: 'door', open: false },
{ a: [500, 700], b: [500, 1000], kind: 'wall' },
{ a: [1400, 400], b: [1400, 900], kind: 'wall' },
{ a: [500, 0], b: [500, 400] },
{ a: [500, 400], b: [500, 700], door: true, open: false },
{ a: [500, 700], b: [500, 1000] },
{ a: [1400, 400], b: [1400, 900] },
]
const wallIds = []
@@ -232,7 +232,7 @@ export async function runLeak({ origin, gmKey, stateDir, transcript, keepOpen =
expectAck(await move(gm, ids.B, [420, 1500]), true)
})
await group('GM adds a wall in the subject sight', async () => {
await addWall({ a: [400, 900], b: [900, 900], kind: 'wall' })
await addWall({ a: [400, 900], b: [900, 900] })
})
await group('GM removes it again', async () => {
const ack = await gm.request({ t: 'wall.remove', scene, id: wallIds[wallIds.length - 1] })
@@ -267,7 +267,7 @@ export async function runLeak({ origin, gmKey, stateDir, transcript, keepOpen =
if (resized.ok !== true) throw new Error(`token.resize refused: ${JSON.stringify(resized)}`)
})
await group('GM adds a wall over N2 (stuck, source walls)', async () => {
await addWall({ a: [700, 560], b: [700, 660], kind: 'wall' })
await addWall({ a: [700, 560], b: [700, 660] })
})
await group('GM unsets the public prop of N2', async () => {
const unset = await gm.request({ t: 'prop.unset', target: 'token', id: ids.N2,