code wiki / (root) / nx_mgmt_call_gate.nx

nx_mgmt_call_gate.nx

buildroot/runtime/nx_mgmt_call_gate.nx

4276 B87 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic mgmt
docsdependenciesstructsconstsfunctions

about

nx_mgmt_call_gate.nx -- TEETH FOR THE CONTROL-PLANE DRIVER FAILURE PATH, PROVEN WITHOUT CAUSING A FAILURE. WHY THIS EXISTS: nx_mgmt_call diagnostics were invisible to every MCP caller because they went to fd 2 while the tools-API capture surfaces fd 1. Fixed 2026-08-07 by writing FETCH-FAIL and MINT-FAIL to BOTH. But a fix to a FAILURE path is unverified until the failure happens, and the honest options looked bad: wait for the next outage, or manufacture one on a shared control plane. Neither is acceptable. THE THIRD OPTION IS THE ONE WORTH HAVING: the organ resolves its key bundle as the RELATIVE path "opaque_keys.bin", so running it from a directory with no key bundle drives the MINT-FAIL branch deterministically -- no daemon touched, no port bound, nothing mutated. * A FAILURE PATH IS TESTABLE WITHOUT A FAILURE WHENEVER ITS PRECONDITION IS AN INPUT YOU CONTROL -- look for that input before reaching for an outage. T4 IS THE NEG-CONTROL AND IT CARRIES THE PROOF: T1-T3 would ALSO pass if the binary were simply broken and always failed. T4 runs the SAME argv from the CORRECT cwd and demands success, so the pair shows the failure is caused by the missing key bundle and nothing else. license_tier: ORIGINAL Read-only: forks the driver twice, writes nothing, binds nothing. (Rule 26) expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_tool_run.nx nx_gate_verdict.nx nx_mgmt_call_gate.nx

imports: nx_syscalls.nxnx_tool_run.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

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

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ sys_mmap ↻ sys_chdir sys_mmap ↻ tr_run_capture sys_mmap ↻ sys_pipe2 sys_fork sys_close sys_dup3 sys_execve_clean sys_close_inherited sys_close_inherited_proc sys_openat_rd sys_mmap ↻ sys_getdents64 dirent_reclen sys_close ↻ sys_munmap sys_execve tr_exec_failed

structs

none

consts

22const MG_ELF: *u8 = "/volume1/homes/elderwesto/nishihost/nx_mgmt_call.elf"
23const MG_HOME: *u8 = "/volume1/homes/elderwesto/nishihost"
24const MG_NOKEYS: *u8 = "/tmp"
25const MG_CAP: i64 = 65536

functions

27func mg_has(buf: *u8, n: i64, needle: *u8) -> i64
called by 1: main
45func main(argc: i64, argv: *i64) -> i64