code wiki / _hdl_build / nx_toolhealth_gate.nx

nx_toolhealth_gate.nx

buildroot/runtime/_hdl_build/nx_toolhealth_gate.nx

11840 B212 linesdepth 5pulls 8 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_toolhealth_gate.nx -- THE BITE PROOF FOR THE HALF-CAPABLE DETECTOR (lane D, 2026-08-20). nx_toolhealth accuses a registered tool of declaring a verb it does not implement. An accusation organ that has only ever been seen agreeing with its author is unverified, and one with false positives is worse than none -- so this gate plants the known-bad, sees RED, restores, sees GREEN, and separately proves that each ABSTENTION abstains instead of accusing. EVERY FIXTURE IS ASSEMBLED AT RUNTIME under /tmp/<gate>/ and nothing here is a production path. Two reasons, both measured elsewhere in this estate and both load-bearing here: * a gate that shares a fixture with a production beat reports on the FIXTURE, not the code; * THIS subject is a SOURCE SCANNER -- a fixture written as a literal in a production tree would become a subject of the very census under test. nx_toolhealth_gate [subject-elf] -> per-tooth PASS/FAIL then verdict=GREEN|RED (exit carries it) license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_estr.nx nx_gate_verdict.nx nx_gatekit_lib.nx nx_tool_run.nx nx_toolhealth_gate.nx

imports: nx_syscalls.nxnx_estr.nxnx_gate_verdict.nxnx_gatekit_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 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 ↻ gk_exists sys_openat_rd sys_close gv_puts ↻ gv_check gv_puts ↻ gv_verdict gv_note_bare_rate gv_bare_rate gv_at gv_obj_has_n gv_at ↻ gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap gv_puts ↻ gv_num ↻ gv_journal

structs

none

consts

20const TG_OUTCAP: i64 = 65536
22const TG_TXTCAP: i64 = 4096
24const TG_PATHCAP: i64 = 512
26const TG_ARGVN: i64 = 16
28const TG_TIMEOUT_MS: i64 = 60000
29const TG_DIR: *u8 = "/tmp/nx_toolhealth_gate"
30const TG_SRCDIR: *u8 = "/tmp/nx_toolhealth_gate/src/"
34const TG_SUBJ_1: *u8 = "./nx_toolhealth.elf"
35const TG_SUBJ_2: *u8 = "../nx_toolhealth.elf"
36const TG_SUBJ_3: *u8 = "_build/nx_toolhealth.sov.elf"
37const TG_SUBJ_4: *u8 = "buildroot/_build/nx_toolhealth.sov.elf"

functions

39func tgp(dst: *u8, name: *u8) -> i64
called by 1: main calls 1: es_cat
53func tg_run(subj: *u8, av: *i64, out: *u8, olen: *i64) -> i64
calls 1: tr_run_capture
57func main(argc: i64, argv: *i64) -> i64