code wiki / _hdl_build / nx_deploy_ready.nx
nx_deploy_ready.nx
buildroot/runtime/_hdl_build/nx_deploy_ready.nx
about
nx_deploy_ready.nx -- PRE-DEPLOY SAFETY GATE (operator: "prevent things like this... deploy... managed").
The capstone of the deploy-reliability trilogy: an agent/session calls this BEFORE deploying an organ to
learn if it is SAFE. Aggregates the supervised signals into ONE actionable verdict instead of 3 separate
checks -- proactive prevention (won't deploy into a drifted buildroot or after a contract regression).
Data-driven (rule 11): knowledge/registry/deploy_checks.tsv rows = name<TAB>file<TAB>marker<TAB>severity<TAB>remediation.
A check PASSES if <file> contains <marker>. severity BLOCK -> a fail makes deploy UNSAFE; WARN -> advisory.
nx_deploy_ready check [manifest] (JSON: deploy_safe + per-check pass/severity + blockers + remediations)
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
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 DR_CAP: i64 = 262144 |
| 12 | const DR_TAB: i64 = 9 |
| 13 | const DR_NL: i64 = 10 |
| 14 | const DR_HASH: i64 = 35 |
| 15 | const DR_STDERR: i64 = 2 |
| 16 | const DR_SPAN: i64 = 16 |
| 17 | const DR_EXIT_USAGE: i64 = 2 |
functions
| 19 | func dr_werr(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(DR_STDERR, s, n); return 0 } |
| 20 | func dr_vlen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: main |
| 21 | func dr_cat(d: *u8, o: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { d[o] = s[i]; o = o + 1; i = i + 1 } return o } called by 1: main |
| 22 | func dr_catn(d: *u8, o: i64, v: i64) -> i64 { let t: *u8 = sys_mmap(28); var m: i64 = v; if m < 0 { m = 0 } 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 { d[o] = t[k-1-i]; o = o + 1; i = i + 1 } return o } |
| 23 | func dr_cat_esc(d: *u8, o: i64, q: *u8, s: i64, e: i64) -> i64 { var i: i64 = s; while i < e { var c: i64 = q[i] as i64; if c == 34 { c = 39 } if c == 92 { c = 47 } if c < 32 { c = 32 } d[o] = c as u8; o = o + 1; i = i + 1 } return o } called by 1: main |
| 24 | func dr_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 33 | func dr_contains(buf: *u8, n: i64, lit: *u8) -> i64 called by 1: main |
| 47 | func dr_le(q: *u8, i: i64, n: i64) -> i64 { var e: i64 = i; var s: i64 = 1; while s == 1 { if e >= n { s = 0 } else { if q[e] == (DR_NL as u8) { s = 0 } else { e = e + 1 } } } return e } called by 1: main |
| 48 | func dr_col(q: *u8, ls: i64, le: i64, c: i64, out: *i64) -> i64 called by 1: main |
| 64 | func dr_cstr(q: *u8, s: i64, e: i64, dst: *u8) -> i64 { var i: i64 = 0; while s + i < e { dst[i] = q[s+i]; i = i + 1 } dst[i] = 0 as u8; return i } called by 1: main |
| 65 | func dr_span_is(q: *u8, s: i64, e: i64, lit: *u8) -> i64 { var i: i64 = 0; while s + i < e { if lit[i] == (0 as u8) { return 0 } if q[s+i] != lit[i] { return 0 } i = i + 1 } if lit[i] != (0 as u8) { return 0 } return 1 } called by 1: main |
| 66 | func main(argc: i64, argv: *i64) -> i64 |