code wiki / _hdl_build / nx_organ_registry_gate.nx

nx_organ_registry_gate.nx

buildroot/runtime/_hdl_build/nx_organ_registry_gate.nx

5453 B131 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_organ_registry_gate.nx -- POINTER-INTEGRITY GUARD for consolidation. The durable fix for "an organ vanished because consolidation deleted it and left the pointers dangling" (caught live: nx_fetch, the merged research fetcher, was dedup-deleted -> SOURCE-NOT-FOUND days later). Per feedback-no-tool-proliferation-consolidate-or-justify + Cardinal 13 (additive-only: consolidation SUPERSEDES-AND-PRESERVES, never deletes a superseder), this guard reads the canonical-organ registry (knowledge/registry/organ_supersession.tsv) and asserts EVERY listed canonical organ's source still resolves on disk. RED the instant one is missing -> the consolidation breakage surfaces LOUDLY (REACTIVE pillar) instead of as a mysterious build failure later. Liar-kill: a hardcoded BOGUS path must read as MISSING (proves the checker actually stats the filesystem and isn't rubber-stamping GREEN). Evidence -> knowledge/status/organ_registry.log Composes: nx_syscalls (file probe). license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_organ_registry_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 sys_mmap org_exists sys_openat_rd sys_close sys_read_file sys_openat_rd ↻ sys_lseek sys_mmap ↻ sys_read sys_close ↻ sys_openat_append org_copy ew sys_write ewn sys_mmap ↻ sys_write ↻ sys_close ↻

structs

none

consts

21const REG_PATH: *u8 = "knowledge/registry/organ_supersession.tsv"
22const ORG_LOG: *u8 = "knowledge/status/organ_registry.log"

functions

24func ew(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 }
called by 1: main calls 1: sys_write
25func ewn(fd: i64, v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
36func org_exists(relpath: *u8) -> i64
called by 1: main calls 2: sys_openat_rdsys_close
44func org_copy(dst: *u8, src: *u8, a: i64, b: i64) -> i64
called by 1: main
51func main() -> i64