code wiki / _hdl_build / nx_deploy_ready_scope_gate.nx
nx_deploy_ready_scope_gate.nx
buildroot/runtime/_hdl_build/nx_deploy_ready_scope_gate.nx
about
nx_deploy_ready_scope_gate.nx -- proves the pre-deploy gate SCOPES its evidence-honesty block to the deploy
target's blast radius (own domain + shared-fate domains) and NEVER to an unrelated domain's RED.
THE DEFECT THIS GATE EXISTS FOR (measured 2026-09-02): nx_deploy_ready's evidence-honesty row was a GLOBAL
conjunction over knowledge/status/evidence_honesty.log, so two content domains (autodev, performersearch)
reading RED blocked the UNRELATED fleet-supervisor memory-leak deploy (daemonsup -> loadgov), and the deploy
shipped only through an audited override. Operator: "a supervisor deploy has no business being blocked by a
search domain's RED ... estate wide loose coupling small sharp intelligent pieces microservice type
architecture not single monolithic coding." A gate that blocks too broadly is overridden in practice and
protects nothing.
HOW IT PROVES IT: it builds an ISOLATED fixture tree under /tmp/nx_deploy_ready_scope_gate/ (its own
knowledge/registry/{deploy_checks.tsv,deploy_domain.conf,deploy_sharedfate.conf} + evidence logs), CHDIRs
into it, and forks the REAL subject binary (absolute path) so the subject reads the fixture confs at the
exact relative paths production uses -- zero contact with the live registry (the fixture-ratchet law).
Every scenario is a different evidence log or target; the teeth assert the JSON and the EXIT CODE both.
The fixture-reached-condition tooth runs FIRST (a fixture the defect cannot fail is not a test), and
gv_bite pairs the decoupling case with its own-domain-RED control so the gate cannot pass vacuously.
nx_deploy_ready_scope_gate [subject-elf-ABSOLUTE] (default: the promoted nishihost binary)
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_gatekit_lib.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
| 25 | const SG_SUBJECT_DEFAULT: *u8 = "/volume1/homes/elderwesto/nishihost/nx_deploy_ready.elf" |
| 26 | const SG_FX: *u8 = "/tmp/nx_deploy_ready_scope_gate" |
| 27 | const SG_FX_K: *u8 = "/tmp/nx_deploy_ready_scope_gate/knowledge" |
| 28 | const SG_FX_R: *u8 = "/tmp/nx_deploy_ready_scope_gate/knowledge/registry" |
| 29 | const SG_FX_DOMAIN: *u8 = "/tmp/nx_deploy_ready_scope_gate/knowledge/registry/deploy_domain.conf" |
| 30 | const SG_FX_SHARED: *u8 = "/tmp/nx_deploy_ready_scope_gate/knowledge/registry/deploy_sharedfate.conf" |
| 31 | const SG_FX_MAN_A: *u8 = "/tmp/nx_deploy_ready_scope_gate/man_a.tsv" |
| 32 | const SG_FX_MAN_B: *u8 = "/tmp/nx_deploy_ready_scope_gate/man_b.tsv" |
| 33 | const SG_FX_MAN_C: *u8 = "/tmp/nx_deploy_ready_scope_gate/man_c.tsv" |
| 34 | const SG_FX_MAN_D: *u8 = "/tmp/nx_deploy_ready_scope_gate/man_d.tsv" |
| 35 | const SG_FX_EV_A: *u8 = "/tmp/nx_deploy_ready_scope_gate/ev_a.log" |
| 36 | const SG_FX_EV_B: *u8 = "/tmp/nx_deploy_ready_scope_gate/ev_b.log" |
| 37 | const SG_FX_EV_C: *u8 = "/tmp/nx_deploy_ready_scope_gate/ev_c.log" |
| 38 | const SG_FX_EV_D: *u8 = "/tmp/nx_deploy_ready_scope_gate/ev_d.log" |
| 39 | const SG_CAP: i64 = 262144 |
| 40 | const SG_TAB: i64 = 9 |
| 41 | const SG_EXIT_BLOCKED: i64 = 3 |
| 44 | const SG_T_SUPD: *u8 = "supd" |
| 45 | const SG_T_PERFD: *u8 = "perfd" |
| 46 | const SG_T_SRCHD: *u8 = "srchd" |
| 47 | const SG_T_NOSUCH: *u8 = "nosuchtarget" |
functions
| 49 | func sg_manifest(path: *u8, evlog: *u8) -> i64 |
| 63 | func sg_run(subject: *u8, man: *u8, target: *u8, out: *u8, outlen: *i64) -> i64 |
| 67 | func main(argc: i64, argv: *i64) -> i64 |