nx_verify.nx
buildroot/runtime/nx_verify.nx
about
nx_verify.nx -- CONSOLIDATED Nishi-unique verification tool (per NISHI_TOOL_ARCHITECTURE: 50+
organs -> 15 verb-based tools; "new capability = a VERB, not a new micro-organ"). This is the
nx_verify tool: ONE entry point, verbs, that ABSORBS the session's separate self-analysis organs
so they stop sprawling as individual stubs. Imports the canonical nx_capability_triage_core (no
reinvention). SUPERSEDES the standalone nx_capability_triage.nx + nx_triage_ground.nx CLIs (their
cores stay as libs; these two verbs are now the interface).
nx_verify triage [registry] -> route/wire/build/measure per capability + operator proposals
(anti-navel-gazing: SOTA credited ONLY on 3rd-party bench)
nx_verify ground [registry] -> cross-check has_organ vs DISK FACTS (gate>organ>absent); flags
any claim the disk can't back (DISCREPANCY)
Future verify verbs (claim / crossval / census / adversary) fold in HERE, not as new organs.
Always exit 0; journals a summary. license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_capability_triage_core.nx
imported by: nobody (leaf or entry point)
structs
| none |
consts
| 15 | const V_MAGIC_1048576: i64 = 1048576 |
| 16 | const V_MAGIC_1048575: i64 = 1048575 |
| 17 | const V_MAGIC_65536: i64 = 65536 |
| 18 | const V_MAGIC_65535: i64 = 65535 |
| 19 | const V_MAGIC_1024: i64 = 1024 |
| 102 | const V_MAGIC_BUDGET: i64 = 0 // zero-tolerance default for a checked file/diff |
| 103 | const V_DATA_DENS_X100: i64 = 80 // >=0.8 magic/line = a data table (bias/mesh/font/KAT), not logic -> EXEMPT |
| 104 | const V_DATA_MIN_CNT: i64 = 50 // ...AND has many literals: floors out line-packed logic one-liners gaming density |
| 105 | const V_DENS_SCALE: i64 = 100 // density is reported x100 (fixed-point, no floats) |
| 106 | const V_RADIX10_LEN: i64 = 2 // "10" is two chars (the radix-extraction allowlist match) |
| 107 | const V_ASCII_NL: i64 = 10 |
| 108 | const V_ASCII_SP: i64 = 32 |
| 109 | const V_ASCII_LP: i64 = 40 // '(' |
| 110 | const V_ASCII_0: i64 = 48 |
| 111 | const V_ASCII_1: i64 = 49 |
| 112 | const V_ASCII_2: i64 = 50 |
| 113 | const V_ASCII_9: i64 = 57 |
| 114 | const V_ASCII_x: i64 = 120 |
| 115 | const V_ASCII_PCT: i64 = 37 // '%' |
| 116 | const V_ASCII_SLASH: i64 = 47 // '/' |
| 117 | const V_ASCII_DQ: i64 = 34 // '"' string delimiter -- numbers inside strings are text, not magic (skip like comments) |
| 118 | const V_ASCII_BS: i64 = 92 // '\' escape -- an escaped quote does not close the string |
functions
| 21 | func v_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } calls 1: sys_write |
| 22 | func v_putn(v: i64) -> i64 { nxi_out(v); return 0 } calls 1: nxi_out |
| 23 | func v_streq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while a[i] != (0 as u8) { if a[i] != b[i] { return 0 } i = i + 1 } if b[i] != (0 as u8) { return 0 } return 1 } |
| 27 | func v_print_task(buf: *u8, ls: i64, le: i64) -> i64 calls 1: sys_write |
| 33 | func v_field(buf: *u8, ls: i64, le: i64, idx: i64, out: *u8) -> i64 |
| 45 | func v_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 48 | func v_line_int(buf: *u8, ls: i64, le: i64, tok: i64) -> i64 |
| 67 | func v_starts(buf: *u8, ls: i64, le: i64, pre: *u8) -> i64 |
| 77 | func v_exists(path: *u8) -> i64 { let sb: *u8 = sys_mmap(256); if sys_fstatat(path, sb) < 0 { return 0 } return 1 } |
| 78 | func v_probeable(name: *u8, n: i64) -> i64 |
| 87 | func v_grade(name: *u8) -> i64 |
| 120 | func v_isdig(c: u8) -> i64 { if c >= (V_ASCII_0 as u8) { if c <= (V_ASCII_9 as u8) { return 1 } } return 0 } |
| 121 | func v_isaln(c: u8) -> i64 |
| 128 | func v_matchat(buf: *u8, i: i64, n: i64, lit: *u8) -> i64 { var k: i64 = 0; while lit[k] != (0 as u8) { if i + k >= n { return 0 } if buf[i+k] != lit[k] { return 0 } k = k + 1 } return 1 } called by 1: v_scan_magic |
| 129 | func v_scan_magic(buf: *u8, n: i64) -> i64 calls 1: v_matchat |
| 188 | func main(argc: i64, argv: *i64) -> i64 |