a73x

web/mux.js MSG and KEY tables have no gate against protocol.zig and keymap.zig

open   by a73x

web/mux.js:11-17 re-declares the opcode table (protocol.zig MsgType) and :25-31 the keymap.Key ordinals. The claimed pin at wasm_core.zig:434 is a doc comment, and web/verify.js only checks mux.js against verify.js's own string copy — never against Zig. keymap.Key is an implicitly-numbered enum: inserting one variant silently renumbers every arrow key for the browser with no build or test failure.

Cheapest fix that respects the folder rules: give keymap.Key explicit = N discriminants, and add a zig build check step (or a client_core_wasm_check sibling) that reads web/mux.js and compares each MSG/KEY name to @intFromEnum. The good pattern to copy is clipboard_base64_max: stated at both sites AND pinned by a test in server.zig.

Found in the 2026-09-01 duplicate-code probe; verified against the files.