code wiki / _hdl_build / nx_build_lineage_gate.nx
nx_build_lineage_gate.nx
buildroot/runtime/_hdl_build/nx_build_lineage_gate.nx
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
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
structs
| none |
consts
| 16 | const GL_PATH: *u8 = "knowledge/registry/genesis_lineage.tsv" |
| 17 | const GL_FBUF: i64 = 262144 |
functions
| 19 | func 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 |
| 20 | func ll_p(s: *u8) -> i64 { let n: i64 = ll_len(s); sys_write(1, s, n); return 0 } |
| 21 | func ll_pn(v: i64) -> i64 |
| 30 | func ll_streq(a: *u8, b: *u8) -> i64 |
| 36 | func 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 } |
| 37 | func ll_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 50 | func ll_field(buf: *u8, ls: i64, le: i64, idx: i64, out: *u8) -> i64 called by 1: ll_find |
| 72 | func ll_find(buf: *u8, n: i64, node: *u8, parent_out: *u8) -> i64 |
| 90 | func ll_hops(buf: *u8, n: i64, node: *u8) -> i64 |
| 106 | func ll_chain(buf: *u8, n: i64, node: *u8) -> i64 |
| 122 | func main() -> i64 |