code wiki / _hdl_build / nx_genesis_lineage.nx
nx_genesis_lineage.nx
buildroot/runtime/_hdl_build/nx_genesis_lineage.nx
about
nx_genesis_lineage.nx -- the GENESIS-SPINE lineage emitter (closes X-GEN-LINEAGE w=9, the
cardinal hidden corner: the genesis/adam toolchain has ZERO rows in lineage.tsv so "the engine
cannot see its own birth", BOOTSTRAP_MAP s4 #5 = WIKI_STRUCTURE s4 #10).
AUTHOR=ORGAN: the ORGAN authors the registry rows; Claude does NOT hand-write lineage. The
parent->child edges + genetics are SOURCED DATA in knowledge/specs/genesis_descent.spec.tsv
(transcribed from the anchored BOOTSTRAP_MAP s3 descent table). This organ:
1. reads the spec (field delimiter '|', rewritten to TAB on emit),
2. loads the children already in lineage.tsv (idempotency: a child already present is SKIPPED),
3. REFUSES any row whose parent is neither the spore, an existing lineage child, nor a batch
sibling -- it will never author a BROKEN LINK (the wiki's author-time "born with a home or
not at all" guard, applied to genealogy),
4. appends the surviving rows to lineage.tsv and logs a GENLINEAGE verdict.
The independent PROOF that the chain actually roots at the spore is nx_root_trace (separate
organ); a wrong edge here cannot go green there. Idempotent (rerun = emitted=0 skipped=N),
additive-only (append, never overwrite -- rule 13). Sovereign syscalls only. license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_itoa_lib.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
| 19 | const GL_MAGIC_4096: i64 = 4096 |
| 20 | const GL_MAGIC_1048576: i64 = 1048576 |
| 21 | const GL_MAGIC_1048575: i64 = 1048575 |
| 22 | const GL_MAGIC_131072: i64 = 131072 |
| 23 | const GL_MAGIC_131071: i64 = 131071 |
| 25 | const GL_SPEC: *u8 = "knowledge/specs/genesis_descent.spec.tsv" |
| 26 | const GL_LIN: *u8 = "knowledge/registry/lineage.tsv" |
| 27 | const GL_LOG: *u8 = "knowledge/status/genesis_lineage.log" |
| 28 | const GL_IDCAP: i64 = 48 |
functions
| 30 | func gl_w(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 } |
| 35 | func gl_wn(fd: i64, v: i64) -> i64 { nxi_fd(fd, v); return 0 } |
| 37 | func gl_streq(a: *u8, b: *u8) -> i64 called by 1: gl_in_set |
| 43 | func gl_in_set(arena: i64, cnt: i64, idcap: i64, name: *u8) -> i64 |
| 50 | func gl_field(buf: *u8, ls: i64, le: i64, idx: i64, out: *u8, outcap: i64) -> i64 called by 1: main |
| 70 | func gl_validate(parents: *u8, ea: i64, ec: i64, ba: i64, bc: i64, idcap: i64) -> i64 |
| 99 | func gl_append(fd: i64, buf: *u8, ls: i64, le: i64) -> i64 |
| 114 | func gl_load_children(path: *u8, arena: i64, idcap: i64, maxc: i64) -> i64 |
| 153 | func gl_report(fd: i64, nl: i64, emitted: i64, skipped: i64, refused: i64, epoch: i64, ok: i64) -> i64 |
| 163 | func main(argc: i64, argv: *i64) -> i64 |