code wiki / _hdl_build / nx_gateverify.nx

nx_gateverify.nx

buildroot/runtime/_hdl_build/nx_gateverify.nx

5274 B144 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_gateverify.nx -- BEHAVIOURAL gate-record verification: run a gate, then compare what it PRINTED against what it RECORDED. WHY THIS AND NOT THE TEXTUAL CHECK: an earlier sibling organ tried to judge emit ORDER from source position and was wrong on all seven gates it flagged -- helper definitions, test fixtures and /tmp writes all match an append token, and it even flagged its own gate via test-data literals. That check was DELETED. The one genuine defect in that arc was caught by READING THE LOG AGAINST THE OUTPUT: the gate printed 41/41 while its log said 23/23. This organ mechanises exactly that comparison, so it finds the real thing and cannot manufacture the false ones. ★A gate's stdout is watched by a human for ten seconds; its LOG is what every ruler reads forever. When those two disagree, the log is the one that matters and the one that is wrong. nx_gateverify <gate-name> [logname] e.g. nx_gateverify nx_capgraph_derive_gate verdicts: AGREE · DISAGREE (the record is untrustworthy) · NO-LOG · UNPARSED exit 0 agree/no-log · 1 DISAGREE · 4 run-fail license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 2 imports · 0 importers

nx_gateorder_lib.nx nx_tool_run.nx nx_gateverify.nx

imports: nx_gateorder_lib.nxnx_tool_run.nx

imported by: nobody (leaf or entry point)

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

main go_puts sys_write go_strlen gv_cat tr_run1 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 ↻ tr_run_capture sys_mmap ↻ sys_pipe2 sys_fork sys_close sys_dup3 sys_execve_clean sys_close_inherited sys_close_inherited_proc sys_openat_rd sys_mmap ↻ sys_getdents64 dirent_reclen sys_close ↻ sys_munmap sys_execve tr_exec_failed sys_write ↻ sys_exit ↻

structs

none

consts

22const GV_CAP: i64 = 262144
23const GV_PATH: i64 = 512

functions

29func gv_cat(dst: *u8, at: i64, s: *u8) -> i64
called by 2: gv_logpathmain
44func gv_logpath(name: *u8) -> i64
called by 1: main calls 1: gv_cat
68func main(argc: i64, argv: *i64) -> i64