code wiki / _hdl_build / nx_registrymine.nx

nx_registrymine.nx

buildroot/runtime/_hdl_build/nx_registrymine.nx

15890 B367 linesdepth 3pulls 5 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_registrymine.nx -- REGISTRY-PLANE MINER (miner-sota MS06d, 2026-07-23) closing the census's last two uncovered classes in ONE organ: MC07 capabilities (bigrock-) and MC11 residual-catalog (minergap-). Both share the canonical registry row shape, so this is deliberately GENERIC (raci-, commontask-, work- fit it too) rather than two near-identical organs -- rule-15 applied BEFORE the duplication. It answers the question a registry cannot answer about itself: WHO OWNS WHAT, and what is ORPHANED. UNOWNED = owner is "-" or empty (a capability nobody is accountable for -- the real find) UNSCOPED = scope is "-" or empty (a row that cannot be routed to a lane) plus per-owner load (total + open), status distribution, severity distribution, owned_permil. Source is a seg-store plane via the ALLOWLIST-RESOLVED loader, or a FILE when loader is "-" (deterministic gate fixtures). Composes nx_sovjson_lib (sj_*). Read-only. No hw writes (Rule 26). mine <source> [loader|-] [minsup] -> JSON: totals, by_owner ranked, by_status, sev, gaps selftest <scratch-prefix> -> gate T1..T8 row cols: id TAB title TAB sev TAB status TAB owner TAB scope TAB note license_tier: ORIGINAL

dependencies 4 imports · 0 importers

nx_sovjson_lib.nx nx_syscalls.nx nx_gate_verdict.nx nx_tool_run.nx nx_registrymine.nx

imports: nx_sovjson_lib.nxnx_syscalls.nxnx_gate_verdict.nxnx_tool_run.nx

imported by: nobody (leaf or entry point)

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

main sj_puts sys_write sys_exit sj_vlen sj_lit_eq rm_selftest gv_ctr sys_mmap gv_head gv_puts sys_write ↻ sys_mmap ↻ sj_cat sj_catn sys_mmap ↻ sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real sys_openat_wr sys_write ↻ sys_close rm_mine_json sys_mmap ↻ rm_load sj_lit_eq ↻ sj_vlen ↻ rm_read sys_openat_rd sys_read sys_close ↻ sys_mmap ↻ rm_allow_path sj_allow_path sys_mmap ↻ sys_openat_rd ↻ sys_read ↻ sys_close ↻ sj_le sj_col

structs

none

consts

19const RM_MAGIC_4088: i64 = 4088
21const RM_CAP: i64 = 1048576
22const RM_OUT: i64 = 65536
23const RM_PATH: i64 = 512
24const RM_SLOTS: i64 = 256
25const RM_TOPN: i64 = 20
26const RM_ALLOW: i64 = 131072
27const RM_PERMIL: i64 = 1000
28const RM_SEVN: i64 = 12
29const RM_NAME_MAX: i64 = 120
30const RM_MODE_644: i64 = 420

functions

32func rm_read(path: *u8, buf: *u8, cap: i64) -> i64
41func rm_find(q: *u8, n: i64, lit: *u8) -> i64
called by 1: rm_selftest calls 1: sj_vlen
55func rm_allow_path(name: *u8, outp: *u8) -> i64 { return sj_allow_path(name, outp) }
called by 1: rm_load calls 1: sj_allow_path
56func rm_key(d: *u8, o: i64, name: *u8) -> i64
called by 1: rm_mine_json calls 1: sj_cat
67func rm_absent(q: *u8, s: i64, e: i64) -> i64
called by 1: rm_mine_json
73func rm_intern(q: *u8, cs: i64, ce: i64, ss: *i64, se: *i64, np: *i64) -> i64
called by 1: rm_mine_json
90func rm_load(src: *u8, loader: *u8, buf: *u8, lcx: *i64) -> i64
111func rm_mine_json(src: *u8, loader: *u8, minsup: i64, d: *u8) -> i64
282func rm_selftest(prefix: *u8) -> i64
339func main(argc: i64, argv: *i64) -> i64