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 3 imports · 0 importers
imports: nx_syscalls.nxnx_capability_triage_core.nxnx_bench_census_lib.nx
imported by: nobody (leaf or entry point)
structs
| none |
consts
| 25 | const V_MAGIC_1048576: i64 = 1048576 |
| 26 | const V_MAGIC_1048575: i64 = 1048575 |
| 27 | const V_MAGIC_65536: i64 = 65536 |
| 28 | const V_MAGIC_65535: i64 = 65535 |
| 29 | const V_MAGIC_1024: i64 = 1024 |
| 135 | const V_MAGIC_BUDGET: i64 = 0 // zero-tolerance default for a checked file/diff |
| 136 | const V_DATA_DENS_X100: i64 = 80 // >=0.8 magic/line = a data table (bias/mesh/font/KAT), not logic -> EXEMPT |
| 137 | const V_DATA_MIN_CNT: i64 = 50 // ...AND has many literals: floors out line-packed logic one-liners gaming density |
| 138 | const V_DENS_SCALE: i64 = 100 // density is reported x100 (fixed-point, no floats) |
| 139 | const V_RADIX10_LEN: i64 = 2 // "10" is two chars (the radix-extraction allowlist match) |
| 140 | const V_ASCII_NL: i64 = 10 |
| 141 | const V_ASCII_SP: i64 = 32 |
| 142 | const V_ASCII_LP: i64 = 40 // '(' |
| 143 | const V_ASCII_0: i64 = 48 |
| 144 | const V_ASCII_1: i64 = 49 |
| 145 | const V_ASCII_2: i64 = 50 |
| 146 | const V_ASCII_9: i64 = 57 |
| 147 | const V_ASCII_x: i64 = 120 |
| 148 | const V_ASCII_PCT: i64 = 37 // '%' |
| 149 | const V_ASCII_SLASH: i64 = 47 // '/' |
| 150 | const V_ASCII_DQ: i64 = 34 // '"' string delimiter -- numbers inside strings are text, not magic (skip like comments) |
| 151 | const V_ASCII_BS: i64 = 92 // '\' escape -- an escaped quote does not close the string |
functions
| 31 | 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 } |
| 32 | func v_putn(v: i64) -> i64 { nxi_out(v); return 0 } called by 1: v_scan_magic |
| 33 | 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 } called by 1: v_scan_magic |
| 35 | func v_countlit(buf: *u8, n: i64, lit: *u8) -> i64 |
| 51 | func v_hasstr(s: *u8, lit: *u8) -> i64 calls 1: v_countlit |
| 60 | func v_print_task(buf: *u8, ls: i64, le: i64) -> i64 |
| 66 | func v_field(buf: *u8, ls: i64, le: i64, idx: i64, out: *u8) -> i64 called by 1: v_scan_magic |
| 78 | func v_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: v_scan_magic |
| 81 | func v_line_int(buf: *u8, ls: i64, le: i64, tok: i64) -> i64 |
| 100 | func v_starts(buf: *u8, ls: i64, le: i64, pre: *u8) -> i64 called by 1: v_scan_magic |
| 110 | func v_exists(path: *u8) -> i64 { let sb: *u8 = sys_mmap(256); if sys_fstatat(path, sb) < 0 { return 0 } return 1 } |
| 111 | func v_probeable(name: *u8, n: i64) -> i64 called by 1: v_scan_magic |
| 120 | func v_grade(name: *u8) -> i64 |
| 153 | func v_isdig(c: u8) -> i64 { if c >= (V_ASCII_0 as u8) { if c <= (V_ASCII_9 as u8) { return 1 } } return 0 } |
| 154 | func v_isaln(c: u8) -> i64 |
| 161 | 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 |
| 162 | func v_scan_magic(buf: *u8, n: i64) -> i64 |
| 233 | func main(argc: i64, argv: *i64) -> i64 |