code wiki / _hdl_build / nx_doctor_sov_verify.nx
nx_doctor_sov_verify.nx
buildroot/runtime/_hdl_build/nx_doctor_sov_verify.nx
about
nx_doctor_sov_verify.nx -- the NISHI DOCTOR's one-step batch sovereign verifier (operator: "have the
nishi doctor get tutored to do this in one step and less than ten seconds"). ONE invocation builds +
runs + reports MANY modules through the pure-sovereign path (nx_cc -> nxasm_x86 -> run, NO gcc, NO .sh,
NO shell loop -- the loop is NishiLang, so it never hits the wsl $VAR-mangling trap). Each module:
compile (stdout->/tmp/<m>.s, stderr muted, recompile-retry), assemble+link with nxasm_x86_main, run,
capture the real exit via sys_wait4. Prints one line per module + a PASS/FAIL summary; exits 0 iff all
passed (treats the module's own expect_exit==0 convention). Usage:
nx_doctor_sov_verify <module1> <module2> ...
license_tier: ORIGINAL Reuses the sovereign spine from nx_sov_build_run.
dependencies 1 imports · 0 importers
imports: nx_syscalls.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
| 11 | const DSV_MAGIC_4096: i64 = 4096 |
| 13 | const DSV_MIN_ASM_BYTES: i64 = 128 |
| 14 | const DSV_MAX_RETRIES: i64 = 12 |
| 15 | const DSV_RUN_TIMEOUT_MS: i64 = 8000 // the <10s law: a hung module is KILLED + reported, never waited on |
functions
| 17 | func dsv_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 18 | func dsv_putn(v: i64) -> i64 { let bb: *u8 = sys_mmap(28); var m: i64=v; if m<0 {m=0-m;sys_write(1,"-" as *u8,1)}; let t: *u8 = sys_mmap(28); var k: i64=0; if m==0 {t[0]=48;k=1}; while m>0 {t[k]=48+(m%10); m=m/10; k=k+1}; var i: i64=0; while i<k {bb[i]=t[k-1-i]; i=i+1}; sys_write(1, bb, k); return 0 } |
| 19 | func dsv_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[off+i] = s[i]; i = i + 1 } return off + i } called by 1: dsv_build_run_one |
| 22 | func dsv_run(path: *u8, argv: *i64, envp: *i64, redir_out: i64, redir_err: i64) -> i64 |
| 35 | func dsv_filesize(path: *u8) -> i64 |
| 48 | func dsv_build_run_one(name: *u8, compiler: *u8, asm_tool: *u8, envp: *i64, devnull: i64) -> i64 |
| 86 | func dsv_run_watchdog(path: *u8, argv: *i64, envp: *i64, timeout_ms: i64) -> i64 |
| 107 | func main(argc: i64, argv: *i64) -> i64 |