code wiki / _hdl_build / nx_organ_registry_gate.nx

nx_organ_registry_gate.nx

buildroot/runtime/_hdl_build/nx_organ_registry_gate.nx

5993 B139 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/prooftopic organ
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 2 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_organ_registry_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.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 nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ org_exists sys_openat_rd sys_close sys_read_file sys_openat_rd ↻ sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close ↻ sys_openat_append org_copy ew sys_write ↻ ewn sys_mmap ↻ sys_write ↻ sys_close ↻ gv_ctr sys_mmap ↻ gv_verdict gv_note_bare_rate gv_bare_rate gv_at

structs

none

consts

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

functions

25func 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
26func ewn(fd: i64, v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
37func org_exists(relpath: *u8) -> i64
called by 1: main calls 2: sys_openat_rdsys_close
45func org_copy(dst: *u8, src: *u8, a: i64, b: i64) -> i64
called by 1: main
52func main() -> i64