code wiki / _hdl_build / nx_route_diff.nx
nx_route_diff.nx
buildroot/runtime/_hdl_build/nx_route_diff.nx
about
nx_route_diff.nx -- toolsplane (seq162 DETECTION half). The mgmt route-set SHRINK detector: the 9-debt
regression class this week was routes (/api/promote,/tools/register,/cap/mint) silently vanishing on a
deploy. nx_api_contract catches a HARDCODED-critical route going missing; THIS catches ANY route vanishing
vs a captured baseline (full-set diff), transactionally: `snapshot` before a deploy, `check` after -> a
REMOVED route = a contract regression (exit 3 + rollback hint). Reads the live route set by fork-capturing
the sovereign nx_https_get.elf (GET /api, public, 127.0.0.1:8443 override) -- ZERO mgmt-binary touch. The
ENFORCEMENT/auto-rollback half stays mgmt-owned; this is the composable observer (orchestrator can queue
snapshot->deploy->check). READ-ONLY over the live API; baseline + verdict to the evidence layer.
nx_route_diff snapshot | check
ENVELOPE: 128 routes, 64KB capture, declared. exit: 0 GREEN(no shrink) | 3 RED-SHRINK | 4 fetch-fail | 2 usage.
license_tier: ORIGINAL expect_exit: 0
dependencies 1 imports · 0 importers
imports: nx_tool_run.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
| 13 | const K_MAGIC_32000: i64 = 32000 |
| 14 | const K_MAGIC_8000: i64 = 8000 |
| 15 | const K_MAGIC_65536: i64 = 65536 |
| 16 | const K_MAGIC_8192: i64 = 8192 |
| 17 | const K_MAGIC_32768: i64 = 32768 |
| 18 | const K_MAGIC_16384: i64 = 16384 |
| 19 | const K_MAGIC_16300: i64 = 16300 |
| 20 | const K_MAGIC_16000: i64 = 16000 |
functions
| 22 | func rd_w(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 } called by 1: main |
| 23 | func rd_b(rep: *u8, pos: i64, s: *u8) -> i64 { var p: i64 = pos; var i: i64 = 0; while s[i] != (0 as u8) { if p < K_MAGIC_32000 { rep[p] = s[i]; p = p + 1 } i = i + 1 } return p } |
| 24 | func rd_bn(rep: *u8, pos: i64, v: i64) -> i64 { var p: i64 = pos; var m: i64 = v; if m < 0 { if p < K_MAGIC_32000 { rep[p] = 45 as u8; p = p + 1 } m = 0 - m } let t: *u8 = sys_mmap(28); var k: i64 = 0; if m == 0 { t[0] = 48 as u8; k = 1 } while m > 0 { t[k] = (48 + (m % 10)) as u8; m = m / 10; k = k + 1 } var i: i64 = 0; while i < k { if p < K_MAGIC_32000 { rep[p] = t[k - 1 - i]; p = p + 1 } i = i + 1 } return p } |
| 25 | func rd_reads(path: *u8, buf: *u8, cap: i64) -> i64 calls 1: sys_read |
| 34 | func rd_word(buf: *u8, s: i64, e: i64, pat: *u8, pl: i64) -> i64 called by 1: rd_extract |
| 47 | func rd_extract(buf: *u8, n: i64, blob: *u8, offs: *i64, maxr: i64) -> i64 calls 1: rd_word |
| 74 | func rd_span_eq_z(a: *u8, ls: i64, le: i64, z: *u8) -> i64 |
| 82 | func rd_in_baseline(bbuf: *u8, bn: i64, z: *u8) -> i64 calls 1: rd_span_eq_z |
| 95 | func rd_line_in_cur(bbuf: *u8, ls: i64, le: i64, blob: *u8, offs: *i64, cnt: i64) -> i64 calls 1: rd_span_eq_z |
| 101 | func main(argc: i64, argv: *i64) -> i64 calls 1: rd_w |