nx_game_chat_gate.nx
buildroot/runtime/nx_game_chat_gate.nx
about
nx_game_chat_gate.nx -- REFEREE for C12 (nx_game_chat, contract gc_room_wire). END-TO-END: builds
isolated confs under /tmp/gcgate (game defs + a chatstore conf whose store_root is the fixture),
forks the PROMOTED organs, and proves the done-rule: two clients exchange moves and chat through
the C1 store with the game's own rules as the referee.
THE TOOTH THAT MATTERS IS T10: a move row injected DIRECTLY through nx_chat_store -- bypassing the
move verb entirely, the race/hostile-client case -- must be COUNTED AND IGNORED by the replay. A
wire anyone can write to is untrusted by construction; the deterministic replay is the authority.
Also proven: a full connect-four playthrough to a win, out-of-turn/illegal/full-column/occupied
refusals, chat interleaving without disturbing state, the reserved mv: prefix, byte-identical
deterministic emits, and the place-mode engine from the ttt conf row (data-driven: two games, one
engine, zero game-specific code paths beyond the conf mode).
license_tier: ORIGINAL expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_tool_run.nxnx_gate_verdict.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 16 | const GCG_CAP: i64 = 65536 |
functions
| 17 | func gcg_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 18 | func gcg_write(path: *u8, s: *u8) -> i64 |
| 27 | func gcg_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 35 | func gcg_count(buf: *u8, n: i64, needle: *u8) -> i64 |
| 48 | func main(argc: i64, argv: *i64) -> i64 |