code wiki / _hdl_build / nx_tokgate_gate.nx

nx_tokgate_gate.nx

buildroot/runtime/_hdl_build/nx_tokgate_gate.nx

16568 B232 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_tokgate_gate.nx -- the REFEREE for nx_tokgate (engineshift ES17, 2026-09-02). Its whole input arrives on fd 0, so every tooth drives it through gk_run_capture_in with a real PreToolUse payload on stdin. u2605 A HOOK ORGAN TESTED WITHOUT ITS STDIN IS TESTED WITHOUT ITS INPUT. nx_tokgate_gate [subject-elf] default _build/nx_tokgate.sov.elf (cwd nxc2) Fixtures are assembled at runtime under /tmp/nx_tokgate_gate/. license_tier: ORIGINAL. No hw writes.

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_gatekit_lib.nx nx_tokgate_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_gatekit_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_head gv_puts sys_write 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_need gv_puts ↻ gk_exists sys_openat_rd sys_close gk_mkdir sys_mkdir gk_rm sys_unlinkat gk_write sys_openat_wr gk_len gk_write_all sys_write ↻ sys_close ↻ tgg_fill sys_mmap ↻ gk_write ↻ gv_check gv_puts ↻

structs

none

consts

10const TGG_CAP: i64 = 131072
11const TGG_BIG: i64 = 4096 // above the bootstrap floor (3072) and above the fixture conf floor (1000)
12const TGG_MID: i64 = 1500 // above the fixture conf floor (1000), below the bootstrap floor (3072)
13const TGG_SMALL: i64 = 400 // below every floor
14const TGG_ROOT: *u8 = "/tmp/nx_tokgate_gate"
15const TGG_CONF: *u8 = "/tmp/nx_tokgate_gate/tokgate.conf"
16const TGG_NOCONF: *u8 = "/tmp/nx_tokgate_gate/absent.conf"
17const TGG_BIGF: *u8 = "/tmp/nx_tokgate_gate/big.txt"
18const TGG_MIDF: *u8 = "/tmp/nx_tokgate_gate/mid.txt"
19const TGG_SMALLF: *u8 = "/tmp/nx_tokgate_gate/small.txt"
21const TGG_SHELLCONF: *u8 = "/tmp/nx_tokgate_gate/shellverb.conf"
22const TGG_NOSHELLCONF: *u8 = "/tmp/nx_tokgate_gate/absent_shellverb.conf"
23const TGG_TREE: *u8 = "/tmp/nx_tokgate_gate/tree"
24const TGG_TREE_FS: *u8 = "/tmp/nx_tokgate_gate/tree/nx_fs.nx"
25const TGG_TREE_TXT: *u8 = "/tmp/nx_tokgate_gate/tree/nx_txtscan.nx"
26const TGG_TREE_JOB: *u8 = "/tmp/nx_tokgate_gate/tree/nx_job_run.nx" // deliberately NEVER written: the source=ABSENT control

functions

29func tgg_fill(path: *u8, n: i64) -> i64
called by 1: main calls 2: sys_mmapgk_write
39func tgg_payload(path: *u8, tool: *u8, inner: *u8) -> i64
called by 1: main calls 3: sys_mmapgk_catgk_write
51func tgg_run(elf: *u8, conf: *u8, payload: *u8, buf: *u8, ln: *i64) -> i64
called by 1: main calls 1: gk_run_capture_in
55func tgg_run2(elf: *u8, conf: *u8, shellconf: *u8, payload: *u8, buf: *u8, ln: *i64) -> i64
called by 1: main calls 1: gk_run_capture_in
59func tgg_wellformed(buf: *u8, n: i64) -> i64
called by 1: main
68func main(argc: i64, argv: *i64) -> i64