code wiki / (root) / nx_tier_ladder_gate.nx

nx_tier_ladder_gate.nx

buildroot/runtime/nx_tier_ladder_gate.nx

30915 B377 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic tier
docsdependenciesstructsconstsfunctions

about

nx_tier_ladder_gate.nx -- GP3 / GE45 REFEREE: the render-door ladder is DATA, the native walk over that data is pinned by a truth table, and the JS twin the pages carry is pinned to the same ids, limits and reason vocabulary -- so the page, the conf and the ruler cannot disagree. SUBJECTS: (1) the LIVE knowledge/tier_ladder.conf as parsed by nx_tier_ladder_lib (in-process, no fork), including each door's draws word (S0, 2026-09-04: the WebGPU pass declares world -- NO CAST -- as data, so a WebGPU frame missing every character is a fact this gate, the HUD and the referee can all state); (2) runtime-assembled fixture confs that MUST be refused (the neg-controls: a ladder without a fallback, an order that regresses, a field carrying a double quote, an unknown state, a fallback that is not last, an unknown draws word, a door row without the draws field); (3) the emitted JS twin (tl_js over the live table); (4) the world emitter source, which must COMPOSE tl_emit() -- a page emitter that draws a frame without the ladder is the unexplained-frame defect this rung exists to retire. WHY A TRUTH TABLE AND NOT "IT PICKED SOMETHING": the walk has four inputs (WebGPU capability, WebGL2 capability, the lever of every door, the force-lever of the fallback) and the defect it must never have is a walk that reads a levered door as default or a capability-absent door as failed. Each row below names the inputs and the ONE door (and reason word) they must produce on the shipping conf. nx_tier_ladder_gate (no args; the emitter source is probed at buildroot/runtime then runtime) license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_tier_ladder_lib.nx nx_tier_ladder_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_tier_ladder_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ sys_mmap ↻ tl_load sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close tl_parse sys_mmap ↻ tl_seq tl_has_quote_or_bslash tl_num tl_state_of tl_seq ↻ tl_req_of tl_seq ↻ tl_draws_of

structs

none

consts

26const TG_E1: *u8 = "buildroot/runtime/nx_game_page_emit.nx"
27const TG_E2: *u8 = "runtime/nx_game_page_emit.nx"
28const TG_FIX_BYTES: i64 = 1024
29const TG_LEVER_BYTES: i64 = 64
30const TG_MIN_DOORS: i64 = 3
31const TG_LP_BYTES: i64 = 16
34const TG_F_GOOD: i64 = 0
35const TG_F_NO_FALLBACK: i64 = 1
36const TG_F_ORDER_REGRESS: i64 = 2
37const TG_F_QUOTE: i64 = 3
38const TG_F_BAD_STATE: i64 = 4
39const TG_F_FALLBACK_NOT_LAST: i64 = 5
40const TG_F_NO_BOOT: i64 = 6
41const TG_F_BOOT_MAX_BELOW_MS: i64 = 7
43const TG_F_THREAD_PARTIAL: i64 = 8 // a floor with no ceiling -- would read as ceiling 0
44const TG_F_THREAD_CEIL_LOW: i64 = 9 // a ceiling below the floor
45const TG_F_THREAD_ZERO: i64 = 10 // a floor of zero -- would pick no workers at all
46const TG_F_THREAD_DUP: i64 = 11 // the same key twice, so which one wins is a coin flip
47const TG_F_NO_THREAD: i64 = 12 // no thread rows: LEGAL, the optional block absent
49const TG_F_BAD_DRAWS: i64 = 13 // a draws word outside the vocabulary -- must REFUSE, never default
50const TG_F_NO_DRAWS: i64 = 14 // the pre-S0 seven-field door row -- must REFUSE BY NAME
51const TG_FIX_WEBGL2_LINE: i64 = 2 // the row both variants corrupt: webgpu row is line 1, webgl2 is line 2
52const TG_CORES_MANY: i64 = 64
53const TG_CORES_ONE: i64 = 1
54const TG_CORES_NONE: i64 = 0
55const TG_LEVER_ASK: i64 = 4

functions

57func tg_fixture(buf: *u8, variant: i64) -> i64
97func tg_parse_fixture(variant: i64) -> i64
called by 1: main calls 3: sys_mmaptg_fixturetl_parse
104func tg_parse_fixture_line(variant: i64) -> i64
called by 1: main calls 3: sys_mmaptg_fixturetl_parse
112func tg_draws_needle(word: *u8) -> *u8
called by 1: main calls 2: sys_mmaptl_cat
119func tg_levers(a: i64, b: i64, c: i64) -> *i64
called by 1: main calls 1: sys_mmap
125func tg_door_by_req(tbl: *i64, rq: i64) -> i64
called by 1: main calls 2: tl_doorstl_door_req
131func main(argc: i64, argv: *i64) -> i64