design: record the map-tile gate and test nginx decisions (#24)
This commit is contained in:
+10
-7
@@ -148,6 +148,7 @@ Notes:
|
|||||||
- **Residual tile-edge leak (accepted for v1, documented) [FIXED, Q4]:** a tile is the unit of disclosure. v1 sets `tile_size` = explored cell = 32 px (section 8), tile grid origin = world origin, so a tile is allowed iff its one cell is explored. The residual is the whole 32 px cell that a vision polygon grazed, including art the LOS did not actually see. Once revealed it is never revoked. No server-side masking is built [FIXED, Q4]. Static art only: door state is never in tiles. Consequences for map authors: do not paint secrets (secret doors, hidden traps, notes) in map art within ~32 px of areas players can reach; keep secrets as GM-only entities. Evidence: `prototype-tile-leak/README.md` (desktop numbers; phone run 2026-11-08). Fallback if the M4 gates fail: `tile_size` 64 px (per-scene config, no code change; leak <= 3 cells per allowed tile, 4x fewer files).
|
- **Residual tile-edge leak (accepted for v1, documented) [FIXED, Q4]:** a tile is the unit of disclosure. v1 sets `tile_size` = explored cell = 32 px (section 8), tile grid origin = world origin, so a tile is allowed iff its one cell is explored. The residual is the whole 32 px cell that a vision polygon grazed, including art the LOS did not actually see. Once revealed it is never revoked. No server-side masking is built [FIXED, Q4]. Static art only: door state is never in tiles. Consequences for map authors: do not paint secrets (secret doors, hidden traps, notes) in map art within ~32 px of areas players can reach; keep secrets as GM-only entities. Evidence: `prototype-tile-leak/README.md` (desktop numbers; phone run 2026-11-08). Fallback if the M4 gates fail: `tile_size` 64 px (per-scene config, no code change; leak <= 3 cells per allowed tile, 4x fewer files).
|
||||||
- A second consequence: map art itself may depict walls/doors. Art is "what players see once there", walls data is "what physics/vision uses". Authoring must keep them consistent; mismatch is GM error, not a leak.
|
- A second consequence: map art itself may depict walls/doors. Art is "what players see once there", walls data is "what physics/vision uses". Authoring must keep them consistent; mismatch is GM error, not a leak.
|
||||||
- Tile URLs include the scene's `art_version` so that re-imported art does not hit stale caches [FIXED, owner decision 2026-11-14, #7]: from M3 on, always `1` in M3. The gate reads `<state>/tiles/<scene>/v<art_version>/` (layout fixed in M3; writing versions and cleanup are M6, 11.1). Response `Cache-Control: private` [FIXED, owner decision 2026-11-14, #7], not the prototype's `no-store`.
|
- Tile URLs include the scene's `art_version` so that re-imported art does not hit stale caches [FIXED, owner decision 2026-11-14, #7]: from M3 on, always `1` in M3. The gate reads `<state>/tiles/<scene>/v<art_version>/` (layout fixed in M3; writing versions and cleanup are M6, 11.1). Response `Cache-Control: private` [FIXED, owner decision 2026-11-14, #7], not the prototype's `no-store`.
|
||||||
|
- **URL grammar and status split [FIXED (owner-delegated), 2026-11-15, #24].** Every numeric component is canonical decimal: digits only, no sign, no space, **no leading zero** (`0` alone is the only zero), bounded at 9 digits for `<scene>` and `<art_version>` (`v` + digits) and 5 digits per coordinate. One spelling per tile, so no cache or test sees an alias. `x in [0, ceil(w/tile_size))`, `y in [0, ceil(h/tile_size))`; the tile grid's origin is the world origin. A malformed component, a coordinate outside the grid, a scene id that is not the one v1 scene, and an art version that is not the scene's all answer **404** (the tile does not exist). The URL is parsed **before** the session is looked at, so an anonymous request gets the same 404 for a nonexistent tile. A missing session, an unknown session and an unexplored tile all answer **403** with the same empty body: the route never distinguishes "no identity" from "not yours", and never reads tile bytes. The GM is always allowed for an in-range tile. The gate reads the player's explored set under the global lock; a player with no sight state has explored nothing. `X-Accel-Redirect` is built only from the parsed integers (`/_tiles/<scene>/v<art_version>/<x>_<y>.png`), never from request text, so no path shape can steer it. `Cache-Control: private` is set by the Nim gate and rides through nginx's internal redirect unchanged; nginx adds nothing of its own there (the test vhost records this, 11.1). Nim sends no body and no `Content-Type`.
|
||||||
|
|
||||||
### 3.4 Threat list
|
### 3.4 Threat list
|
||||||
|
|
||||||
@@ -591,7 +592,7 @@ WS close reasons are the static strings in bold above. Close codes 4001-4003 are
|
|||||||
### 6.6 HTTP surface in M3
|
### 6.6 HTTP surface in M3
|
||||||
- `POST /join` (the sign-in page; HTTP, not WS; 3.2). Body `application/x-www-form-urlencoded`, one field `key`, at most 1 KB (the server answers `400` above that; mummy closes far above it). Key comparison ignores case, dashes and spaces and is constant-time. Valid key (player or GM): `303` to `/` with `Set-Cookie: fff_session=<random>; HttpOnly; Secure; SameSite=Strict; Path=/` and `Referrer-Policy: no-referrer`; the session token is a fresh 32-byte hex value and only its SHA-256 is stored (3.2). Invalid key: `401`, no body detail, no cookie. Wrong method `405`; missing `key` or wrong content type `400`. No rate limit (owner, #6). The body is never logged (T6). Cookie name `fff_session` [FIXED (owner-delegated, 2026-11-14, #17)].
|
- `POST /join` (the sign-in page; HTTP, not WS; 3.2). Body `application/x-www-form-urlencoded`, one field `key`, at most 1 KB (the server answers `400` above that; mummy closes far above it). Key comparison ignores case, dashes and spaces and is constant-time. Valid key (player or GM): `303` to `/` with `Set-Cookie: fff_session=<random>; HttpOnly; Secure; SameSite=Strict; Path=/` and `Referrer-Policy: no-referrer`; the session token is a fresh 32-byte hex value and only its SHA-256 is stored (3.2). Invalid key: `401`, no body detail, no cookie. Wrong method `405`; missing `key` or wrong content type `400`. No rate limit (owner, #6). The body is never logged (T6). Cookie name `fff_session` [FIXED (owner-delegated, 2026-11-14, #17)].
|
||||||
- `GET /ws`: 6.5 (rows 1-4).
|
- `GET /ws`: 6.5 (rows 1-4).
|
||||||
- `GET /tiles/<scene>/v<art_version>/<x>_<y>.png`: 3.3 (`200` with `X-Accel-Redirect`, `403` unexplored, `404` malformed/out of range).
|
- `GET /tiles/<scene>/v<art_version>/<x>_<y>.png`: 3.3 (`200` with `X-Accel-Redirect`, `403` unexplored, `404` malformed/out of range). Slice 9 (#24) pins the full status split in 3.3: `404` also for another scene or a stale art version, `403` also for a missing or unknown session (one response with "unexplored"), and `Cache-Control: private`.
|
||||||
- `GET /healthz`: 200 `{"status":"ok"}` from M3 slice 1 [FIXED (owner-delegated, 2026-11-14, #16)]; M5 makes it report whether the global lock can be acquired within a bound (11.3).
|
- `GET /healthz`: 200 `{"status":"ok"}` from M3 slice 1 [FIXED (owner-delegated, 2026-11-14, #16)]; M5 makes it report whether the global lock can be acquired within a bound (11.3).
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -705,8 +706,9 @@ Principles carried from the prototype: the checker must be independent of the co
|
|||||||
- Leak checker oracle initially only checked "nothing extra", not "everything visible shows"; completeness check is kept (assert (b)).
|
- Leak checker oracle initially only checked "nothing extra", not "everything visible shows"; completeness check is kept (assert (b)).
|
||||||
|
|
||||||
### 10.3 New
|
### 10.3 New
|
||||||
- **Fault classes** for new data: `GMONLY_TOKEN`, `OWNER_PROP`, `GM_PROP`, `GLOBAL_COUNTER` (gseq side channel), `WALL_DELTA` (wall.add reaches player), `KEY_IN_LOG`, `CHAR_OWNER_PROP`, `ACTUAL_NAME`, `CHAR_LIST`, `CONTROLLER_CHANGE` (#14). Each with an injected fault and exact-class assertion, same as existing. **Slice 5 built** the classes that exist at this slice: `HIDDEN_TOKEN`, `GMONLY_TOKEN`, `WALLDATA`, `WITHHELD`, `NO_REMOVE`, `OWN_VIEW`, `OTHER_PLAYER`, `EXPLORED` (`-d:leakfault` + `LEAK_FAULT=<name>`, `tools/fault.test.mjs`, exact class set per fault, and the shipped binary asserted to contain no `LEAK_FAULT`). `OWNER_PROP`, `GM_PROP` and the new `STATUS_SOURCE` arrive with slice 7 (#22): the leak scenario writes props into all three buckets and sets a GM-sourced status on a token the subject can see, and `tools/leakcheck.nim` refuses the `gm` bucket, the `owner` bucket on a non-controller and any `source` on a player status entry. `ACTUAL_NAME`, `CHAR_LIST`, `CONTROLLER_CHANGE` and `CHAR_OWNER_PROP` **arrive with slice 8 (#23)**: the leak scenario creates a character, puts a token of it next to the subject, writes the character's three prop buckets, renames it, reveals it to one player and to all, reassigns it twice, reveals a plain token, flips a `gm_only` token that the subject had met, removes a token the subject had met and removes one encountered entry. `tools/leakcheck.nim` adds the four classes: an actual name a player may not see in a `token` or an `encountered` frame (`ACTUAL_NAME`); another player's `character` record, a `character_id` on somebody else's token, or an encountered entry the subject never saw (`CHAR_LIST`); a token controller that moved in a group whose intents asked for no controller change — the transcript logs every intent, so `token.create`/`token.update{controller}`/`player.remove` are the only allowed causes (`CONTROLLER_CHANGE`); a `cprops` object carrying anything but the character's `public` bucket (`CHAR_OWNER_PROP`). Two consequences worth recording: the `hidden` and `gmOnly` faults now also produce `NO_REMOVE`, because a leaked token whose frame never changes leaves the client holding it with no message to correct it, which is indistinguishable from a withheld `token_gone` at the client (both invariants really are broken, so both classes are asserted); and `TILE` stays with slice 9 while `GLOBAL_COUNTER` is already structurally impossible (per-connection `n`).
|
- **Fault classes** for new data: `GMONLY_TOKEN`, `OWNER_PROP`, `GM_PROP`, `GLOBAL_COUNTER` (gseq side channel), `WALL_DELTA` (wall.add reaches player), `KEY_IN_LOG`, `CHAR_OWNER_PROP`, `ACTUAL_NAME`, `CHAR_LIST`, `CONTROLLER_CHANGE` (#14). Each with an injected fault and exact-class assertion, same as existing. **Slice 5 built** the classes that exist at this slice: `HIDDEN_TOKEN`, `GMONLY_TOKEN`, `WALLDATA`, `WITHHELD`, `NO_REMOVE`, `OWN_VIEW`, `OTHER_PLAYER`, `EXPLORED` (`-d:leakfault` + `LEAK_FAULT=<name>`, `tools/fault.test.mjs`, exact class set per fault, and the shipped binary asserted to contain no `LEAK_FAULT`). `OWNER_PROP`, `GM_PROP` and the new `STATUS_SOURCE` arrive with slice 7 (#22): the leak scenario writes props into all three buckets and sets a GM-sourced status on a token the subject can see, and `tools/leakcheck.nim` refuses the `gm` bucket, the `owner` bucket on a non-controller and any `source` on a player status entry. `ACTUAL_NAME`, `CHAR_LIST`, `CONTROLLER_CHANGE` and `CHAR_OWNER_PROP` **arrive with slice 8 (#23)**: the leak scenario creates a character, puts a token of it next to the subject, writes the character's three prop buckets, renames it, reveals it to one player and to all, reassigns it twice, reveals a plain token, flips a `gm_only` token that the subject had met, removes a token the subject had met and removes one encountered entry. `tools/leakcheck.nim` adds the four classes: an actual name a player may not see in a `token` or an `encountered` frame (`ACTUAL_NAME`); another player's `character` record, a `character_id` on somebody else's token, or an encountered entry the subject never saw (`CHAR_LIST`); a token controller that moved in a group whose intents asked for no controller change — the transcript logs every intent, so `token.create`/`token.update{controller}`/`player.remove` are the only allowed causes (`CONTROLLER_CHANGE`); a `cprops` object carrying anything but the character's `public` bucket (`CHAR_OWNER_PROP`). Two consequences worth recording: the `hidden` and `gmOnly` faults now also produce `NO_REMOVE`, because a leaked token whose frame never changes leaves the client holding it with no message to correct it, which is indistinguishable from a withheld `token_gone` at the client (both invariants really are broken, so both classes are asserted); and the tile gate is HTTP-plane, so it is proven by `tools/tiles.test.mjs` against the test nginx (10.3 Tiles), not by the WS transcript checker. `GLOBAL_COUNTER` is already structurally impossible (per-connection `n`).
|
||||||
- **Characters and names (#14)**: tests for reveal per player and reveal to all; owner sees own actual name; character owner change leaves token controllers unchanged; encountered entries survive token removal and scene change and are removed only by the GM; `gm_only` tokens never enter an encountered list. Fault classes: `ACTUAL_NAME` = unrevealed actual name sent to a player; `CHAR_LIST` = another player's character or encountered entry sent; `CONTROLLER_CHANGE` = owner change altering controllers; `CHAR_OWNER_PROP` = character owner-bucket prop sent to a non-owner. **Built in slice 8** as the `tools/characters.test.mjs` group, which also carries the two checks 10.3 was missing: "a status source is not shown to a non-GM" (the controller included) and "an encountered entry survives a `gm_only` flip and a token removal" (greyed, never deleted).
|
- **Characters and names (#14)**: tests for reveal per player and reveal to all; owner sees own actual name; character owner change leaves token controllers unchanged; encountered entries survive token removal and scene change and are removed only by the GM; `gm_only` tokens never enter an encountered list. Fault classes: `ACTUAL_NAME` = unrevealed actual name sent to a player; `CHAR_LIST` = another player's character or encountered entry sent; `CONTROLLER_CHANGE` = owner change altering controllers; `CHAR_OWNER_PROP` = character owner-bucket prop sent to a non-owner. **Built in slice 8** as the `tools/characters.test.mjs` group, which also carries the two checks 10.3 was missing: "a status source is not shown to a non-GM" (the controller included) and "an encountered entry survives a `gm_only` flip and a token removal" (greyed, never deleted).
|
||||||
|
- **Tiles (#24)**: `tools/tiles.test.mjs` is the group's leak check (d) and the smoke tile-steal checks, through the real binary and a test nginx (`tools/nginx.mjs`, nginx from devbox; config generated per run in the state dir). An **independent explored oracle** (born in 10.2) recomputes visibility per cell from the GM's walls and the token's vision radius with its own clear-segment maths (inscribed 64-gon radius - 0.5 px for "sure", radius + 0.5 px and proper crossings for "maybe"): a `200` must be oracle-maybe (no invented disclosure) and oracle-sure must be `200` (no withheld tile). The 32x32-tile sweep is 1024 requests; slice 9's scene allows 283, all 283 oracle-sure, 0 maybe-refused. Also checked: a player with no sight state gets `403`; another player gets `403` on a tile its neighbour sees; direct `/_tiles/` is `404` (the file exists) for every identity; malformed/canonical/out-of-range/stale-version/scene paths are `404` (with and without a session, including the GM); traversal and encoded shapes never reach a file; the direct-from-Nim answer carries `X-Accel-Redirect: /_tiles/1/v1/<x>_<y>.png`, `Cache-Control: private` and an empty body. Fixture tiles are 32 px PNGs written by `tools/tilefixture.mjs` under the state dir at test time; the test asserts the repo tracks no `.png` at all.
|
||||||
- **Probing test (T8)**: M2, in-process against the move-rules module (5.5): arbitrary far moves; assertion: facts about walls/doors beyond LOS recoverable from replies <= a bounded amount (step cap), and uniform nack shape. M3: same test over WS with a hostile client (moved from M2).
|
- **Probing test (T8)**: M2, in-process against the move-rules module (5.5): arbitrary far moves; assertion: facts about walls/doors beyond LOS recoverable from replies <= a bounded amount (step cap), and uniform nack shape. M3: same test over WS with a hostile client (moved from M2).
|
||||||
- **Auth tests**: key replace (old key invalid, sessions revoked, live connections closed), remove player (key invalid, characters and tokens pass to GM), one key reused on several devices (Q10 FIXED), Origin mismatch rejected, cookie flags present.
|
- **Auth tests**: key replace (old key invalid, sessions revoked, live connections closed), remove player (key invalid, characters and tokens pass to GM), one key reused on several devices (Q10 FIXED), Origin mismatch rejected, cookie flags present.
|
||||||
- **Protocol tests** (#18, `tools/protocol.test.mjs`): proto missing/non-integer (HTTP 400) and mismatch (`closing` 4003, no `hello`); unknown intent type (`unknown-type`) with unknown fields ignored; exactly one `ack` per `reqId` (reqId 0 and 2^31-1 included); `hello` first with `n = 1` and a per-connection `n` thereafter; `error malformed` for unreadable frames; the malformed flood (nine tolerated, the tenth closes 1008); the intent bucket (burst then `rate-limited`, connection stays open, a refused intent applies nothing, `error rate-limited` for an unreadable frame on an empty bucket); the 64 KB inbound boundary (exactly 64 KB is a message, 64 KB + 1 drops the TCP connection with no close frame); unmasked and bad-opcode frames; the server Ping and the Pong answer to a client Ping; the connection cap (503 + `Retry-After: 5`); and every server-initiated close as `closing` then 1005.
|
- **Protocol tests** (#18, `tools/protocol.test.mjs`): proto missing/non-integer (HTTP 400) and mismatch (`closing` 4003, no `hello`); unknown intent type (`unknown-type`) with unknown fields ignored; exactly one `ack` per `reqId` (reqId 0 and 2^31-1 included); `hello` first with `n = 1` and a per-connection `n` thereafter; `error malformed` for unreadable frames; the malformed flood (nine tolerated, the tenth closes 1008); the intent bucket (burst then `rate-limited`, connection stays open, a refused intent applies nothing, `error rate-limited` for an unreadable frame on an empty bucket); the 64 KB inbound boundary (exactly 64 KB is a message, 64 KB + 1 drops the TCP connection with no close frame); unmasked and bad-opcode frames; the server Ping and the Pong answer to a client Ping; the connection cap (503 + `Retry-After: 5`); and every server-initiated close as `closing` then 1005.
|
||||||
@@ -719,9 +721,9 @@ Principles carried from the prototype: the checker must be independent of the co
|
|||||||
- Timings from the prototype are single machine loopback power-save CPU; no real network, no client render [MEASURED caveat]. A real-network run (laptop over the intended HTTPS path, phone on LAN) is an M7 item.
|
- Timings from the prototype are single machine loopback power-save CPU; no real network, no client render [MEASURED caveat]. A real-network run (laptop over the intended HTTPS path, phone on LAN) is an M7 item.
|
||||||
|
|
||||||
### 10.4 Test tools [FIXED, owner decision 2026-11-14, #9]
|
### 10.4 Test tools [FIXED, owner decision 2026-11-14, #9]
|
||||||
- Black-box (outside) WS/HTTP harnesses: Node 26 only, repo-root `tools/`, ported from `prototype-server-vision/tools/` (`smoke.mjs`, `leak.mjs`, `restart.mjs`, `concurrency.mjs`, `lib.mjs`, `withserver.sh` incl. the M3 test nginx). No Nim rewrite. Reason: Node is already required for the client (Vite/TS, playwright-core e2e, reducer tests); a harness in another language from the server cannot share its protocol bugs; zero deps; already measured. Fix the stale "Node 22" note in `lib.mjs` on port.
|
- Black-box (outside) WS/HTTP harnesses: Node 26 only, repo-root `tools/`, ported from `prototype-server-vision/tools/` (`smoke.mjs`, `leak.mjs`, `restart.mjs`, `concurrency.mjs`, `lib.mjs`, `withserver.sh` incl. the M3 test nginx). No Nim rewrite. Reason: Node is already required for the client (Vite/TS, playwright-core e2e, reducer tests); a harness in another language from the server cannot share its protocol bugs; zero deps; already measured. Fix the stale "Node 22" note in `lib.mjs` on port. The port lives in `tools/withserver.mjs`, and slice 9 (#24) added the test nginx as `tools/nginx.mjs`.
|
||||||
- Harness tooling: built-ins only, no npm deps. Global `WebSocket` with `{headers}` for Cookie/Origin; `node:net` for raw and malformed frames (oversize, bad opcode/rsv, unmasked, flood); `node:test` as runner. Node 26 header behaviour [MEASURED, 2026-11-14, #16, node v26.11.1]: `{headers}` still puts `Cookie` and `Origin` on the wire, and without `{headers}` no `Origin` is sent; pinned by `tools/wsheaders.test.mjs` so a Node upgrade that drops the option fails loudly (#8 had verified v24 only; the prototype's "Node 22" note is stale).
|
- Harness tooling: built-ins only, no npm deps. Global `WebSocket` with `{headers}` for Cookie/Origin; `node:net` for raw and malformed frames (oversize, bad opcode/rsv, unmasked, flood); `node:test` as runner. Node 26 header behaviour [MEASURED, 2026-11-14, #16, node v26.11.1]: `{headers}` still puts `Cookie` and `Origin` on the wire, and without `{headers}` no `Origin` is sent; pinned by `tools/wsheaders.test.mjs` so a Node upgrade that drops the option fails loudly (#8 had verified v24 only; the prototype's "Node 22" note is stale).
|
||||||
- Root `devbox.json` pins `nodejs` 26 (port step).
|
- Root `devbox.json` pins `nodejs` 26 (port step) and, since slice 9 (#24), the `nginx` used only by the test harness (DESIGN 11.1); no global tooling.
|
||||||
- `devbox run test` = Nim tests first, then Node harnesses.
|
- `devbox run test` = Nim tests first, then Node harnesses.
|
||||||
- In-process tests stay Nim (`nimble test`, unchanged).
|
- In-process tests stay Nim (`nimble test`, unchanged).
|
||||||
- Browser e2e details: M4, not decided here.
|
- Browser e2e details: M4, not decided here.
|
||||||
@@ -743,7 +745,8 @@ Principles carried from the prototype: the checker must be independent of the co
|
|||||||
- `location = /ws` (prototype uses `/ws`) -> `proxy_pass` to backend, `proxy_http_version 1.1`, `Upgrade`/`Connection` via the `$http_upgrade` -> `$conn_up` map as in the prototype, `proxy_read_timeout` long (prototype 1 h; app-level ping makes this robust), `proxy_buffering off`. The map must be declared at `http{}` level.
|
- `location = /ws` (prototype uses `/ws`) -> `proxy_pass` to backend, `proxy_http_version 1.1`, `Upgrade`/`Connection` via the `$http_upgrade` -> `$conn_up` map as in the prototype, `proxy_read_timeout` long (prototype 1 h; app-level ping makes this robust), `proxy_buffering off`. The map must be declared at `http{}` level.
|
||||||
- `location = /join` -> proxy, **`access_log off`**, `add_header Referrer-Policy no-referrer`.
|
- `location = /join` -> proxy, **`access_log off`**, `add_header Referrer-Policy no-referrer`.
|
||||||
- `location /tiles/` -> proxy (Nim decides, returns `X-Accel-Redirect`).
|
- `location /tiles/` -> proxy (Nim decides, returns `X-Accel-Redirect`).
|
||||||
- `location /_tiles/` -> `internal; alias <state dir>/tiles/;` `Cache-Control private`. Must be readable by the nginx user (group read on the tiles dir) [INFERRED NixOS gotcha]; do not expose the state dir otherwise.
|
- `location /_tiles/` -> `internal; alias <state dir>/tiles/;` `Cache-Control private`. Must be readable by the nginx user (group read on the tiles dir) [INFERRED NixOS gotcha]; do not expose the state dir otherwise. [FIXED (owner-delegated), #24] The `Cache-Control: private` on a served tile comes from the Nim gate (3.3) and nginx passes it through the internal redirect; the location adds no header of its own, so the header is not duplicated.
|
||||||
|
- Test nginx [FIXED (owner-delegated), #24]: `tools/nginx.mjs` starts the devbox `nginx` package on a free loopback port in front of the harness server, with a config generated per run under the server's state dir (ports and state paths never committed). It mirrors this vhost shape: `/join` (`access_log off`), `/tiles/` proxy, `/ws` upgrade, `/healthz` readiness, and `location /_tiles/ { internal; alias <state>/tiles/; }`. Tile bytes are 32 px fixture PNGs from `tools/tilefixture.mjs`, written under `<state>/tiles/`; none is committed.
|
||||||
- Response headers: HSTS, CSP (no inline scripts, `connect-src 'self'` wss), `X-Content-Type-Options`, `Referrer-Policy`.
|
- Response headers: HSTS, CSP (no inline scripts, `connect-src 'self'` wss), `X-Content-Type-Options`, `Referrer-Policy`.
|
||||||
- No `limit_req` on `/join` (owner, #6: no rate limit on key entry; ~100-bit key space).
|
- No `limit_req` on `/join` (owner, #6: no rate limit on key entry; ~100-bit key space).
|
||||||
- Prototype nginx config (`prototype-server-vision/nginx/nginx.conf`) is the functional reference; its `listen` has no address (binds all) and its temp/log paths are dev-only.
|
- Prototype nginx config (`prototype-server-vision/nginx/nginx.conf`) is the functional reference; its `listen` has no address (binds all) and its temp/log paths are dev-only.
|
||||||
@@ -815,7 +818,7 @@ Each is small, ends with a green gate, and no milestone depends on browser UI be
|
|||||||
- Scope: entities with bucketed props, characters with names, name reveal and encountered list (8, #14), players, player keys/sessions, scenes, chunked explored persistence, typed per-recipient views and single egress, per-connection counters, proto versioning, the wire catalogue of 6 (29 intents, 15 server messages), wall/token/character CRUD intents, Origin check, plaintext player keys and non-expiring sessions (Q10, Q11), SQLite schema + migrations. Tile gate `/tiles/` (3.3), fixture tiles at 32 px generated at test time by a helper (not committed), minimal local test nginx with internal `/_tiles/` (production vhost and tile import CLI stay M6) [FIXED, owner decision 2026-11-14, #7]. Black-box harnesses ported to `tools/` on Node 26; `devbox run test` runs Nim then Node (10.4) [FIXED, owner decision 2026-11-14, #9].
|
- Scope: entities with bucketed props, characters with names, name reveal and encountered list (8, #14), players, player keys/sessions, scenes, chunked explored persistence, typed per-recipient views and single egress, per-connection counters, proto versioning, the wire catalogue of 6 (29 intents, 15 server messages), wall/token/character CRUD intents, Origin check, plaintext player keys and non-expiring sessions (Q10, Q11), SQLite schema + migrations. Tile gate `/tiles/` (3.3), fixture tiles at 32 px generated at test time by a helper (not committed), minimal local test nginx with internal `/_tiles/` (production vhost and tile import CLI stay M6) [FIXED, owner decision 2026-11-14, #7]. Black-box harnesses ported to `tools/` on Node 26; `devbox run test` runs Nim then Node (10.4) [FIXED, owner decision 2026-11-14, #9].
|
||||||
- Accept: `devbox run test` green on a clean checkout, and that run includes the nine named groups below; details live at the § refs, not here. Out of M3 accept: concurrency (M5), 127.0.0.1 bind check (M6 deploy) [FIXED, owner decision 2026-11-14, #12].
|
- Accept: `devbox run test` green on a clean checkout, and that run includes the nine named groups below; details live at the § refs, not here. Out of M3 accept: concurrency (M5), 127.0.0.1 bind check (M6 deploy) [FIXED, owner decision 2026-11-14, #12].
|
||||||
1. **leak+fault**: ported leak test A and B; fault test catches every class with exact class sets, incl. characters and names; clean build passes (10.1, 10.3).
|
1. **leak+fault**: ported leak test A and B; fault test catches every class with exact class sets, incl. characters and names; clean build passes (10.1, 10.3).
|
||||||
2. **tiles**: Tile gate: leak test (d) and smoke tile-steal checks pass through the test nginx; gate decisions match the independent explored oracle (10.2); direct `/_tiles/` fetch -> 404; malformed or out-of-range path -> 404; unexplored -> 403 [FIXED, owner decision 2026-11-14, #7].
|
2. **tiles**: Tile gate: leak test (d) and smoke tile-steal checks pass through the test nginx; gate decisions match the independent explored oracle (10.2); direct `/_tiles/` fetch -> 404; malformed or out-of-range path -> 404; unexplored -> 403 [FIXED, owner decision 2026-11-14, #7]. **Built by slice 9 (#24):** `tools/tiles.test.mjs` (three tests: the oracle sweep of 1024 tile requests through the test nginx, the full refusal/path matrix plus direct `/_tiles/`, and the generated-fixture/no-committed-PNG check), with `tools/nginx.mjs` and `tools/tilefixture.mjs`; the decided URL grammar and status split are in 3.3.
|
||||||
3. **probing**: M2 in-process probing test (T8, H26) re-run over WS with a hostile client (10.3, 5.5).
|
3. **probing**: M2 in-process probing test (T8, H26) re-run over WS with a hostile client (10.3, 5.5).
|
||||||
4. **protocol**: proto mismatch refused, unknown type rejected, oversized frame rejected, malformed flood closed, rate limit hit, connection cap enforced (10.3, T10, 6.2, 6.5; codes and close codes in 6.5; limits and numbers in 4.3 (connections) and 6.4 (frame, intent rate) [FIXED, owner-delegated, #15]).
|
4. **protocol**: proto mismatch refused, unknown type rejected, oversized frame rejected, malformed flood closed, rate limit hit, connection cap enforced (10.3, T10, 6.2, 6.5; codes and close codes in 6.5; limits and numbers in 4.3 (connections) and 6.4 (frame, intent rate) [FIXED, owner-delegated, #15]).
|
||||||
5. **auth**: key create; key replace (old sessions and live connections closed); remove player; one key on several devices; Origin mismatch rejected; cookie flags present (T7, H9, 3.2, 10.3).
|
5. **auth**: key create; key replace (old sessions and live connections closed); remove player; one key on several devices; Origin mismatch rejected; cookie flags present (T7, H9, 3.2, 10.3).
|
||||||
@@ -837,7 +840,7 @@ Each is small, ends with a green gate, and no milestone depends on browser UI be
|
|||||||
- Scope: real-network latency/throughput run, iOS/Safari check (if available), one real session with the owner's table, collect SLOW lines.
|
- Scope: real-network latency/throughput run, iOS/Safari check (if available), one real session with the owner's table, collect SLOW lines.
|
||||||
- Accept: documented numbers; defects triaged to issues; go/no-go for v1.
|
- Accept: documented numbers; defects triaged to issues; go/no-go for v1.
|
||||||
- **M3 build slices** [FIXED, owner decision 2026-11-14, #13]: vertical slices, each runnable end-to-end with its own test. Order and blocking: each slice blocked by the previous, except 9 (blocked by 5 only) and 10 (blocked by 1-9). Open technical details (DDL, property-schema registry format, config keys, redaction mechanism) are decided by the builder inside the slice that needs them and recorded here as FIXED (owner-delegated).
|
- **M3 build slices** [FIXED, owner decision 2026-11-14, #13]: vertical slices, each runnable end-to-end with its own test. Order and blocking: each slice blocked by the previous, except 9 (blocked by 5 only) and 10 (blocked by 1-9). Open technical details (DDL, property-schema registry format, config keys, redaction mechanism) are decided by the builder inside the slice that needs them and recorded here as FIXED (owner-delegated).
|
||||||
1. Bare server (#16) 2. Getting in (#17) 3. Talking safely (#18) 4. Walls and doors (#19) 5. Tokens and sight (#20) 6. Explored persistence (#21) 7. Token details (#22) 8. Characters and names (#23, done) 9. Map tiles (#24) 10. Finish line (#25).
|
1. Bare server (#16) 2. Getting in (#17) 3. Talking safely (#18) 4. Walls and doors (#19) 5. Tokens and sight (#20) 6. Explored persistence (#21) 7. Token details (#22) 8. Characters and names (#23, done) 9. Map tiles (#24, done) 10. Finish line (#25).
|
||||||
- **Post-v1 candidates**: FFF seam implementation (section 9), drawings/pings/ruler, chat/dice (order decided at M7, Q8), light sources, browser upload UI (Q5), multi-scene (Q3), vision deltas/binary protocol (Q16).
|
- **Post-v1 candidates**: FFF seam implementation (section 9), drawings/pings/ruler, chat/dice (order decided at M7, Q8), light sources, browser upload UI (Q5), multi-scene (Q3), vision deltas/binary protocol (Q16).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
Reference in New Issue
Block a user