code wiki / _hdl_build / nx_organ_registry_gate.nx
nx_organ_registry_gate.nx
buildroot/runtime/_hdl_build/nx_organ_registry_gate.nx
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
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
| 21 | const REG_PATH: *u8 = "knowledge/registry/organ_supersession.tsv" |
| 22 | const ORG_LOG: *u8 = "knowledge/status/organ_registry.log" |
functions
| 24 | func 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 } |
| 25 | func ewn(fd: i64, v: i64) -> i64 |
| 36 | func org_exists(relpath: *u8) -> i64 |
| 44 | func org_copy(dst: *u8, src: *u8, a: i64, b: i64) -> i64 called by 1: main |
| 51 | func main() -> i64 |