nx_compare_regen.nx
buildroot/runtime/nx_compare_regen.nx
about
nx_compare_regen.nx -- ON-NAS regeneration of the whole Nishi Compare publish surface (operator 2026-07-09:
"no frozen snapshots"). Re-MEASURES every matrix domain against the synced source tree (buildroot/runtime),
GATE-CHECKED: for each artifact the generator's liar-kill gate must exit 0 FIRST -- a RED measurement is NEVER
published (fail-closed). Then emits json+html per domain + the hub index json/html + the in-code OpenAPI, and
hot-swaps each into the LIVE docroot via write-.new + sys_renameat (atomic; a concurrent reader never tears).
Because nx_compare_serve reads the SAME docroot files, MCP tools/call and public REST update together, single
source. argv: [1]=buildroot dir (default "buildroot"), [2]=docroot prefix (default "../sites/nishifamily/compare/",
i.e. the live docroot relative to buildroot). The MCP allowlist row PINS these args (caller argv ignored) so a
tools/call caller cannot redirect writes. Targets must already exist (this regenerates, never scaffolds).
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
| 12 | const K_MAGIC_1048576: i64 = 1048576 |
| 13 | const K_MAGIC_4096: i64 = 4096 |
| 14 | const K_MAGIC_2000: i64 = 2000 |
functions
| 16 | func 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 } |
| 17 | func wn(fd: i64, v: i64) -> i64 |
| 23 | func scopy(dst: *u8, doff: i64, src: *u8) -> i64 { var i: i64 = 0; while src[i] != (0 as u8) { dst[doff+i] = src[i]; i = i + 1 } return doff + i } |
| 24 | func rg_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 31 | func rg_write_atomic(path: *u8, buf: *u8, n: i64) -> i64 |
| 45 | func rg_scaffold(droot: *u8, dom: *u8) -> i64 |
| 52 | func rg_run(elf: *u8, a1: *u8, a2: *u8, out: *u8, cap: i64, outlen: *i64) -> i64 |
| 62 | func rg_emit(elf: *u8, a1: *u8, mode: *u8, firstbyte: i64, minbytes: i64, target: *u8, out: *u8, cap: i64) -> i64 |
| 73 | func main(argc: i64, argv: *i64) -> i64 |