code wiki / (root) / nx_enginelab_gate.nx

nx_enginelab_gate.nx

buildroot/runtime/nx_enginelab_gate.nx

35101 B619 linesdepth 10pulls 19 transitivereach 0 importersview sourcekind gate/prooftopic enginelab
docsdependenciesstructsconstsfunctions

about

nx_enginelab_gate.nx -- END-TO-END gate for the sovereign engine instrument. WHAT A GREEN HERE MEANS, AND WHAT IT DOES NOT. Every tooth below asserts an ARITHMETIC property of the instrument on a fixture built at runtime inside this process. A green says the five instrument classes compute what they claim on data whose right answer is known by construction. It says NOTHING about any engine's real performance -- that is the instrument's job, not the gate's. FIXTURES ARE BUILT IN MEMORY, NEVER ON DISK AND NEVER SHARED. A gate that shares scratch with a production beat measures the fixture instead of the code (this estate has the receipt: a segguard fold took a gate RED while the same code went 24/24 GREEN on private scratch). Nothing here opens a file, so there is no teardown to skip and no run that can poison the next one. NEGATIVE CONTROLS ARE NAMED neg-control-* so a census can COUNT them. A control nobody can find is a control nobody maintains.

dependencies 6 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_visual_diff.nx nx_enginelab_lib.nx nx_enginelab_golden.nx nx_enginelab_store.nx nx_enginelab_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_visual_diff.nxnx_enginelab_lib.nxnx_enginelab_golden.nxnx_enginelab_store.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 ↻ eg_buf sys_mmap ↻ el_new sys_mmap ↻ el_push el_set gv_subjects gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap gv_need gv_puts ↻ el_count gv_check gv_puts ↻ eg_eq6 eg_eq3 el_get

structs

none

consts

22const EG_SCRATCH: i64 = 32 // i64 slots for any out-buffer used below
23const EG_STORE_CAP: i64 = 96
24const EG_IMG_W: i64 = 8
25const EG_IMG_H: i64 = 8
26const EG_IMG_NC: i64 = 3
27const EG_GRID: i64 = 4 // 4x4 cells over the 8x8 fixture = 2x2 px per cell
28const EG_THRESH: i64 = 4 // per-cell mean tolerance
29const EG_BASE_VAL: i64 = 100 // fixture background level
30const EG_ALTER_VAL: i64 = 200 // a level far outside EG_THRESH, so the change cannot be a rounding artefact
31const EG_TARGET_FPS: i64 = 60
38const EG_DROP_CAP: i64 = 2
39const EG_SMALL_BUF: i64 = 8
40const EG_Q_PERMIL: i64 = 354
41const EG_TRIS: i64 = 2419200
42const EG_ASCII_9: i64 = 57
43const EG_DEC_BASE: i64 = 10
47const EG_FRAME_US: i64 = 16000
51const EG_NOT_OUR_MAGIC: i64 = 12345

functions

53func eg_buf() -> *i64 { return sys_mmap(EG_SCRATCH * EL_I64) as *i64 }
called by 1: main calls 1: sys_mmap
55func eg_mk_img(val: i64) -> *VdImg
called by 1: main calls 1: sys_mmap
69func eg_alter(im: *VdImg, val: i64) -> i64
called by 1: main
86func eg_mk_capture(verts_last: i64) -> *i64
called by 1: main calls 2: el_newel_draw
95func eg_mk_frames(spike: i64) -> *i64
called by 1: main calls 2: el_newel_frame_mark
106func main() -> i64
565func eg_eq(a: i64, b: i64) -> i64 { if a == b { return 1 } return 0 }
called by 1: main
566func eg_zero(a: i64) -> i64 { if a == 0 { return 1 } return 0 }
called by 1: main
567func eg_pos(a: i64) -> i64 { if a > 0 { return 1 } return 0 }
called by 1: main
568func eg_eq2(a: i64, b: i64, c: i64, d: i64) -> i64 { if a == b { if c == d { return 1 } } return 0 }
called by 1: main
569func eg_eq3(a: i64, b: i64, c: i64, d: i64, e: i64, f: i64) -> i64
called by 2: maineg_eq6
572func eg_eq4(a: i64, b: i64, c: i64, d: i64, e: i64, f: i64, g: i64, h: i64) -> i64
called by 1: main
575func eg_eq5(a: i64, b: i64, c: i64, d: i64, e: i64, f: i64, g: i64, h: i64, i: i64, j: i64) -> i64
called by 1: main
578func eg_eq6(a: i64, b: i64, c: i64, d: i64, e: i64, f: i64) -> i64 { return eg_eq3(a,b,c,d,e,f) }
called by 1: main calls 1: eg_eq3
583func eg_copy_trunc(src: *u8, dst: *u8, drop: i64) -> i64
596func eg_copy_corrupt(src: *u8, dst: *u8, off: i64) -> i64
609func eg_write_raw(dst: *u8, first: i64, slots: i64) -> i64