docs: add ADRs for the durable design decisions
22 ADRs: server-authoritative sight and single egress, per-recipient views/diffs, uniform nack, opaque ids, 32 px tile unit, wall switches/presets, see-over, thick walls, open-door gap, typed wall columns, proto 2, build order, zoom clamp, accepted status leak, player marker, chunked explored, slow-client policy, session/key split, closing message, character records, global lock, synchronous choice. Each links its tickets and its spec section.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
# The wall-record change bumps `proto` to 2
|
||||
|
||||
`proto` is compiled into both client and server and is required on the `/ws` upgrade. The wall-model
|
||||
build changes `wall.add`/`wall.update` to take typed fields and a `preset` instead of `kind`, adds
|
||||
`height` to the GM frames, and adds the player `marker` message, so it bumps `proto` from 1 to 2.
|
||||
The bump is necessary because the old input shape is dangerous rather than merely old: the server
|
||||
ignores unknown fields, so a `proto` 1 client's `{"kind":"door"}` would silently create a solid
|
||||
wall.
|
||||
|
||||
## Status
|
||||
accepted
|
||||
|
||||
## Alternatives
|
||||
- Keep `proto` 1 and accept both shapes: rejected, the ambiguity is silent and safety-relevant.
|
||||
- Reject unknown fields instead of ignoring them: a larger breaking change for every client and not
|
||||
needed once the version is bumped.
|
||||
- Infer the version from the payload shape: rejected, a heuristic on a security-relevant
|
||||
distinction.
|
||||
|
||||
## Consequences
|
||||
A mismatch (older or newer) completes the upgrade, sends `closing {reason:"proto-mismatch",
|
||||
code:4003}` and closes, because a browser cannot read an HTTP status on a WebSocket and the mummy
|
||||
pin cannot send application close codes (ADR-0019). No `hello` and no state follow. The client shows
|
||||
"reload"; content-hashed assets fetch the matching client. Within one `proto`, changes are additive
|
||||
only.
|
||||
|
||||
## Tickets
|
||||
#49.
|
||||
|
||||
## Spec
|
||||
Current §6.2, §6.5 rows 3 and 5.
|
||||
Reference in New Issue
Block a user