nx_capreach.nx
buildroot/runtime/nx_capreach.nx
about
nx_capreach.nx -- WHEN A TOOL IS DENIED, WHAT ELSE REACHES ITS FUNCTION? (2026-09-04)
THE DEFECT THIS CLOSES, measured FIVE TIMES IN ONE SESSION BY ONE SEAT. A capability denial names a
TOOL. It does not name the FUNCTION that tool performs, and in this estate the function is almost always
reachable another way -- but a denial message ends the search, because it reads like a wall and offers
only "mint a cap". Measured instances, all 2026-09-04: nx_capsearch denied, reachable because
nx_spendgate FORKS it; nx_sov_build_run denied, reachable because nx_stale_check forks it; the deploy
lane denied, reachable through nx_restage; nx_sota_status denied, its VERDICT readable because the organ
runs on a beat and PERSISTS it to knowledge/status/sota_board.ledger. Each time a blocker was published
before the reach was enumerated, and each time the reach existed.
A FALSE I-AM-BLOCKED IS SELF-CONFIRMING, because nothing afterwards tests it.
TWO RELATIONS, AND THEY ARE THE TWO THAT ACTUALLY WORKED -- not the one that was easiest to write.
A SHARED-ELF detector was considered and REJECTED: tool_allowlist.conf does map several names onto one
elf (nx_status and nx_torstat both point at nx_hostctl), so it is trivially implementable, but NONE of
the five measured cases had that shape. Shipping it would have been a detector that cannot fire on the
cases that motivated it -- a different detector wearing the name of the problem.
ARTIFACT the target's own persisted output, which carries its verdict when the organ cannot be called.
*** SHIPPED IN THIS LEG. ***
FORK a source that names the target and is itself a registered tool: a callable composer.
*** NOT IMPLEMENTED IN THIS LEG, AND SAID SO HERE RATHER THAN LEFT IMPLIED. *** It needs a
whole-corpus scan and therefore its own cost envelope, so it is a NAMED NEXT LEG. This
paragraph exists because the first draft described BOTH relations as if both shipped --
the exact overclaiming-prose defect that nx_board_contract_gate's prose axis was built THE
SAME DAY to catch. A header is not a measurement, and an organ whose own comment oversells
it is the cheapest possible place for that defect to start.
PUBLISHES A LIST, NEVER A VERDICT. The estate has measured that a ranker whose top hit is not the answer
must print evidence and let a human decide (nx_spendgate ships with no threshold for exactly this
reason). A composer that merely NAMES the target may not expose it; this organ says so rather than
scoring it.
exit: 0 candidates printed . 2 usage . 3 no allowlist readable license_tier: ORIGINAL No hw writes.
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
| 36 | const CR_PATH: i64 = 1024 |
| 37 | const CR_CAP: i64 = 1048576 |
| 38 | const CR_NL: i64 = 10 |
| 39 | const CR_TAB: i64 = 9 |
| 40 | const CR_NAMECAP: i64 = 128 |
functions
| 42 | func cr_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 43 | func cr_w(s: *u8) -> i64 { sys_write(1, s, cr_slen(s)); return 0 } |
| 44 | func cr_cat(dst: *u8, off: i64, s: *u8) -> i64 { var o: i64 = off; var i: i64 = 0; while s[i] != (0 as u8) { dst[o] = s[i]; o = o + 1; i = i + 1 } dst[o] = 0 as u8; return o } called by 1: main |
| 45 | func cr_find(buf: *u8, n: i64, needle: *u8, from: i64) -> i64 |
| 58 | func cr_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 73 | func cr_exists(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd < 0 { return 0 } sys_close(fd); return 1 } |
| 77 | func cr_is_tool(al: *u8, n: i64, name: *u8) -> i64 |
| 92 | func main(argc: i64, argv: *i64) -> i64 |