code wiki / (root) / nx_catalog.nx

nx_catalog.nx

buildroot/runtime/nx_catalog.nx

11726 B240 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_catalog.nx -- THE GOD-UP CAPABILITY CATALOGUE: one call answers "is <name> there, and is it WIRED?" OPERATOR 2026-08-04: "we have built a significant amount of things that may need cataloguing ... so you can do simple checks if things are there just not adopted and wired ... a full mcp and api, not random grepping." This organ is that check. It is the PER-NAME half the estate never had. WHAT ALREADY EXISTED (asked the corpus first, per standing law -- do NOT rebuild these): S1 defined, zero EXTERNAL callers ............ nx_adopt (BUILT+REGISTERED) S2 in SOURCE but in no shipped BINARY ........ NOBODY <- this organ closes it S3 built/promoted but never REGISTERED ....... NOBODY <- this organ closes it S4 registered but never AUTHORISED or CALLED . nx_wirecensus (BUILT+REGISTERED; 181 DARK / 236permil live) S5 conf row present, no consumer re-read it .. nx_toolreg_reconcile S6 on the NAS but absent from the SSOT tree ... nx_srcdiverge_gate The taxonomy was already named in nx_wirecensus's header; S2/S3 were marked OPEN and stayed open. The REAL gap was never a missing census -- it was that all six answer ESTATE-WIDE and none answers "what about THIS one", so every check degenerated into ad-hoc grepping. That is what this fixes. THE SIX LIFECYCLE STAGES, each a FILE FACT (no prose, no claim-reading): SOURCE buildroot/runtime/<n>.nx | buildroot/runtime/_hdl_build/<n>.nx BUILT buildroot/_build/<n>.sov.elf STAGED <n>.sov.elf.new (a loaded gun aimed at the next deploy -- reported, not hidden) PROMOTED <n>.elf | _offc/<n>.elf REGISTERED tool_allowlist.conf row "<n>\t" (registry = the MCP surface) AUTHORISED cap_consent.log mention (a cap was ever minted for it) INVOKED knowledge/status/actlog.jrnl (it actually RAN) VERDICT LADDER (the first broken link IS the verdict -- a weakest-link rule, never an average): ABSENT . SOURCE-ONLY(S2) . BUILT-UNPROMOTED . PROMOTED-UNREGISTERED(S3) . REGISTERED-DARK(S4) . LIVE nx_catalog <name> [name2 ...] per-name status + verdict exit 0 all LIVE, 1 any gap, 2 usage nx_catalog selftest positive+negative controls exit 0 GREEN, 1 RED A NAME THAT DOES NOT EXIST MUST READ 'ABSENT', NEVER 'fine' -- the selftest proves that with a control. license_tier: ORIGINAL Read-only. No hw writes (Rule 26). expect_exit: 0

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_estate_path.nx nx_catalog.nx

imports: nx_syscalls.nxnx_estate_path.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main ep_anchor sys_openat_rd sys_close sys_chdir sys_mmap c_puts sys_write sys_exit sys_mmap ↻ slurp sys_openat_rd ↻ sys_mmap ↻ sys_read sys_close ↻ c_putn sys_mmap ↻ sys_write ↻ has_sub slen slen ↻ cat_one sys_mmap ↻ cat3 fsize sys_openat_rd ↻ sys_mmap ↻ sys_read ↻ sys_close ↻ has_sub ↻ c_puts ↻ c_putn ↻ cat3 ↻ fsize ↻

structs

none

consts

36const CAT_MAGIC_65536: i64 = 65536
37const CAT_MAGIC_1024: i64 = 1024
39const CAT_BUF: i64 = 4194304 // allowlist/consent/actlog read cap
40const CAT_PATH: i64 = 1024

functions

42func c_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 2: cat_onemain calls 1: sys_write
43func c_putn(v: i64) -> i64
called by 2: cat_onemain calls 2: sys_mmapsys_write
56func slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: has_submain
59func cat3(dst: *u8, pre: *u8, name: *u8, suf: *u8) -> i64
called by 2: cat_onemain
72func fsize(path: *u8) -> i64
87func has_sub(hay: *u8, hn: i64, ned: *u8) -> i64
called by 2: cat_onemain calls 1: slen
106func slurp(path: *u8, lp: *i64) -> *u8
125func cat_one(name: *u8, alw: *u8, alwn: i64, cns: *u8, cnsn: i64, act: *u8, actn: i64) -> i64
181func main(argc: i64, argv: *i64) -> i64