code wiki / _hdl_build / nx_unwired.nx
nx_unwired.nx
buildroot/runtime/_hdl_build/nx_unwired.nx
about
nx_unwired.nx -- FIND EVERY FUNCTION THAT IS DEFINED AND NEVER CALLED, ACROSS THE WHOLE TREE.
WHY THIS IS AN ORGAN AND NOT A NOTE
-----------------------------------
On 2026-08-07 I fixed a measurement leak in nx_memroot, wrote the fix, built it, deployed it,
measured the "result", and recorded it in memory. `mr_body` was DEFINED AND NEVER CALLED. Two
string-replacements had matched nothing and reported success. The gate was green because the gate
had gone green before the tooth existed.
★★★★★★ A FUNCTION DEFINED AND NEVER CALLED IS A COMMENT.
★★★★★ A STRING REPLACE THAT MATCHES NOTHING IS A NO-OP THAT REPORTS SUCCESS -- VERIFY THE CALL
SITE, NOT THE DEFINITION.
The estate already had vocabulary for this failure -- BUILT+UNWIRED, "comments not code", the
adoption gap -- written down in several memory files. It was written down and it still happened,
three times in one session, because a law in a file is consulted at the rate advice is consulted.
★★★★★★ A LAW THAT IS ONLY WRITTEN DOWN IS ENFORCED AT THE RATE PEOPLE REMEMBER TO READ IT; THE SAME
LAW COMPILED INTO A GATE IS ENFORCED EVERY TIME.
FULL ECOSYSTEM SCOPE, NOT A SAMPLE: every `.nx` in the tree is both a definition source and a call
source, so a helper used only by a sibling organ is correctly seen as WIRED. Reporting on one file
would manufacture false positives for every library function.
★★★★★ A REACHABILITY QUESTION ASKED OF ONE FILE IS ANSWERED WRONG BY CONSTRUCTION.
usage: nx_unwired [--dir D] [--quiet]
exit: 0 = nothing unwired; 1 = unwired definitions exist
license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_memplane_lib.nxnx_gatekit_lib.nxnx_headmark_lib.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
| 30 | const UW_MAGIC_2166136261: i64 = 2166136261 |
| 31 | const UW_MAGIC_16777619: i64 = 16777619 |
| 32 | const UW_MAGIC_1073741823: i64 = 1073741823 |
| 33 | const UW_MAGIC_8192: i64 = 8192 |
| 34 | const UW_MAGIC_4096: i64 = 4096 |
| 35 | const UW_MAGIC_262144: i64 = 262144 |
| 36 | const UW_MAGIC_262000: i64 = 262000 |
| 45 | const UW_DIR: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/runtime/_hdl_build/" |
| 46 | const UW_MAXF: i64 = 32768 // corpus is 18,560 today; 16,384 would REFUSE, which is why it rose |
| 47 | const UW_HASH: i64 = 262144 // identifier -> slot (power of two) |
| 48 | const UW_FBUF: i64 = 4194304 |
| 49 | const UW_NAMEB: i64 = 1048576 // packed definition names |
functions
| 52 | func uw_h(s: *u8, n: i64) -> i64 called by 1: main |
| 64 | func uw_slot(keys: *i64, h: i64) -> i64 called by 1: main |
| 105 | func uw_defcomplete(buf: *u8, n: i64) -> i64 |
| 118 | func uw_exported(buf: *u8, n: i64) -> i64 |
| 122 | func uw_isid(c: i64) -> i64 called by 1: main |
| 131 | func uw_isnx(name: *u8) -> i64 |
| 144 | func main(argc: i64, argv: *i64) -> i64 |