Files
WoW-Hybrid-gateway/docs/GATEWAY-TO-CLIENT-ASSESSMENT-20261129.md

36 lines
3.4 KiB
Markdown

# Moving gateway behaviour into client code/data — assessment (2026-11-29, Claude, task #46)
Owner rule behind this: "client-native data first" (2026-11-22) — data the client can hold natively belongs in its
DB2s/content, not in runtime packets. The natives (Backend/Wire/Bridge) already run inside the client process, so
"the gateway" here means two things: **protocol translation** (Turtle 1.12 packets <-> 70334) and **data the
codec/natives synthesise at runtime** (hotfix pushes, query replies, compiled profiles). Only the second can move.
## 1. What must stay in the gateway (cannot move)
| Behaviour | Why it stays |
|---|---|
| Opcode + body translation both ways | the server speaks 1.12; the client parser is fixed |
| GUID mapping, object create/update field layout | 1.12 update fields -> 70334 fragments, per packet |
| Movement relays, splines, transports | per-packet, server-authoritative |
| Aura-state routing, wand GCD hold, spell modifier arithmetic | depend on live server state per cast |
| Addon-message routing (TW_* prefixes) | server traffic; Lua addons consume it |
## 2. Candidates to move into client data (ranked)
| # | Runtime behaviour today | Native home | Gain | Risk / effort |
|---|---|---|---|---|
| A | Codec hotfix pushes for rows that never change (spells, items, displays, customization) | baked DB2 rows (pipeline ops/db2-bake-20261122, content ee4529d0 baked 87 tables) | removes stale-DBCache bugs (pushes with unchanged IDs are not re-fetched) and shortens the login spell barrier; one source of truth | medium: every codec package change needs a re-bake + content step; needs an audit "pushed row == baked row" so the codec can drop the push |
| B | Quest POI dataset compiled into Backend (16 MB header, GW_QUEST_POI_DATASET_HEADER) | QuestPOIBlob / QuestPOIPoint DB2 rows | smaller natives, map areas work without the build flag (memory: wrong flag = no quest areas) | medium: rows must match 70334 schema; Turtle-only quests need new IDs not colliding with native |
| C | Item render identity passthrough / profile (405 KB header) | ItemDisplayInfo + ItemModifiedAppearance rows (most already baked) | fewer invisible-item cases from profile drift | low-medium: only the runtime stand-ins remain (transmog) and those need server data — keep that part |
| D | GameObject authority profile (2.6 MB) answering template queries | none fully: 70334 still asks the server for GO templates | — | keep at runtime; only the display/model closure belongs in content (already done: GO display import) |
| E | Creature/player scale division in codec | CreatureModelData / ChrModel scale rows | — | do NOT move: native rows are shared with retail models; changing them rescales native creatures |
## 3. Recommendation
1. **Do A first** (highest player impact): add an audit to the regression gate that lists codec-pushed rows that
are also baked identically; then remove those pushes from the codec so the client reads only its DB2s.
Keep runtime pushes only for rows that depend on server state.
2. **Then B**, as a content step with a host test comparing generated QuestPOI rows against the current dataset.
3. Leave D/E and all of section 1 in the gateway.
4. Ported addon features (stats pane, aux, etc.) are a separate question: task #68.
Related memories/docs: native-db2-bake, client-native-data-first, quest-poi-from-spawns, item-render-identity-passthrough,
docs/ASSESSMENT-20261122.md (packet coverage), docs/NATIVE_CLIENT_FEASIBILITY.md.