code wiki / _hdl_build / nx_build_lineage_gate.nx

nx_build_lineage_gate.nx

buildroot/runtime/_hdl_build/nx_build_lineage_gate.nx

6544 B152 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind gate/prooftopic build
docsdependenciesstructsconstsfunctions

about

nx_build_lineage_gate.nx -- GENEALOGY OWNERSHIP for backend organs (operator 2026-06-21: "organs owned like our genealogy setup where it goes from god to that organ"). It walks the REAL genesis tree (knowledge/registry/genesis_lineage.tsv: node_id<TAB>type<TAB>parent_id<...>) from a node up the parent_id chain to ORIGIN (god), exactly like the library's foundationing requires hops_to_god>0. Every backend organ anchors at DESC-ORGANS ("organs + K-rungs (the sovereign stack)"), so an organ's ownership chain is god -> ZERO -> ONE -> UNI-BINARY -> DESC-WORD -> DESC-ISA -> DESC-TOOLCHAIN -> DESC-WOMB -> DESC-ORGANS -> <organ>. GATE w/ NEGATIVE CONTROL (GREEN means the walker actually discriminates): - DESC-ORGANS traces to god with hops>0 (organs are owned, not orphaned) - ORIGIN itself = 0 hops (god is the root) - an ORPHAN node not in the tree = -1 (NO path to god => flagged; can't fake lineage) Sovereign: imports only nx_syscalls. license_tier: ORIGINAL expect_exit: 0

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_build_lineage_gate.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main ll_p ll_len sys_write sys_mmap ll_read sys_openat_rd sys_read sys_close sys_exit ll_hops sys_mmap ↻ ll_cpy ll_find sys_mmap ↻ ll_field ll_streq ll_streq ↻ ll_chain sys_mmap ↻ ll_cpy ↻ ll_p ↻ ll_find ↻ ll_streq ↻ ll_pn sys_mmap ↻ sys_write ↻

structs

none

consts

16const GL_PATH: *u8 = "knowledge/registry/genesis_lineage.tsv"
17const GL_FBUF: i64 = 262144

functions

19func ll_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: ll_p
20func ll_p(s: *u8) -> i64 { let n: i64 = ll_len(s); sys_write(1, s, n); return 0 }
called by 2: ll_chainmain calls 2: ll_lensys_write
21func ll_pn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
30func ll_streq(a: *u8, b: *u8) -> i64
36func ll_cpy(dst: *u8, src: *u8) -> i64 { var i: i64 = 0; while src[i] != (0 as u8) { dst[i] = src[i]; i = i + 1 } dst[i] = 0 as u8; return 0 }
called by 2: ll_hopsll_chain
37func ll_read(path: *u8, buf: *u8, cap: i64) -> i64
called by 1: main calls 3: sys_openat_rdsys_readsys_close
50func ll_field(buf: *u8, ls: i64, le: i64, idx: i64, out: *u8) -> i64
called by 1: ll_find
72func ll_find(buf: *u8, n: i64, node: *u8, parent_out: *u8) -> i64
90func ll_hops(buf: *u8, n: i64, node: *u8) -> i64
called by 1: main calls 4: sys_mmapll_cpyll_findll_streq
106func ll_chain(buf: *u8, n: i64, node: *u8) -> i64
122func main() -> i64