code wiki / _hdl_build / nx_genesis_trace_gate.nx

nx_genesis_trace_gate.nx

buildroot/runtime/_hdl_build/nx_genesis_trace_gate.nx

11027 B203 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic genesis
docsdependenciesstructsconstsfunctions

about

nx_genesis_trace_gate.nx -- THE REFEREE for the genesis genealogy tracer. Proves nx_genesis_trace correctly verifies the god->adam&eve->...->IO-endpoint chain BOTH directions, AND that it can actually SEE every failure mode (no-fabricated-green): POSITIVE (real lineage knowledge/registry/genesis_lineage.tsv): T1 healthy (operator 2026-06-16: LOCKS ALLOWED IF FLAGGED): endpoint reaches god, 0 broken/orphan/floater/purposeless, >=2 hardware variants, >=1 fragmentation axis proven-unified (we ACTUALLY escaped a lock somewhere), 0 NEVER-BRICK violations. LOCKED axes are REPORTED as the worklist, NOT a failure (outs[5] may be >0). NEGATIVE CONTROLS (each a hermetic /tmp fixture; the flag MUST fire): N1 broken-link : a node whose parent names no node -> broken_links >= 1 N2 orphan : a node that does NOT bottom out at god -> orphans >= 1 N3 floater : a non-endpoint/non-variant/non-uni leaf -> floaters >= 1 N4 purposeless : a node with an empty label (no purpose) -> purposeless >= 1 N5 lock-in : a fragmentation axis with NO unification -> locked >= 1 N6 no-god : endpoint chain ends at a non-origination -> reaches_god == 0 N7 all-locked : chain-whole but NO axis proven-unified -> NOT green (>=1-unified has teeth) N8 never-brick : a firmware node w/o a never-brick flag -> unsafe >= 1 GREEN only if T1 AND N1..N8 all hold. Evidence rows + verdict -> knowledge/status/ genesis_trace_gate.log via fa_appendz (one-buffer-one-locked-write). Exit 0/1. Sovereign: imports the tracer + nx_framed_append + nx_syscalls (no gcc). license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_genesis_trace.nx nx_framed_append.nx nx_syscalls.nx nx_genesis_trace_gate.nx

imports: nx_genesis_trace.nxnx_framed_append.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main sys_now_realtime_sec sys_mmap sys_clock_gettime_real sys_mmap ↻ gt_analyze gt_parse sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close gt_field_dup sys_mmap ↻ gt_type_code gt_streq gt_streq ↻ gt_find gt_streq ↻ gt_axis_has_uni gt_streq ↻ gt_node_reaches_god gt_streq ↻ gt_find ↻ gt_has_child gt_streq ↻ gg_healthy gg_tmppath gg_cat gg_catn sys_mmap ↻ gg_write_file sys_openat_wr sys_write sys_close ↻ sys_write ↻ gg_row sys_mmap ↻

structs

none

consts

29const GG_LOG: *u8 = "knowledge/status/genesis_trace_gate.log"
30const GG_REAL: *u8 = "knowledge/registry/genesis_lineage.tsv"
31const GG_RECCAP: i64 = 512

functions

33func gg_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != 0 as u8 { dst[off + i] = s[i]; i = i + 1 } return off + i }
34func gg_catn(dst: *u8, off: i64, v: i64) -> i64
called by 2: gg_tmppathmain calls 1: sys_mmap
45func gg_write_file(path: *u8, content: *u8) -> i64
54func gg_tmppath(out: *u8, stem: *u8, epoch: i64, pid: i64) -> i64
called by 1: main calls 2: gg_catgg_catn
65func gg_row(name: *u8, pass: i64) -> i64
85func gg_healthy(o: *i64) -> i64
called by 1: main
98func main() -> i64