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

10805 B150 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic deploy
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_gate_verdict.nx nx_gatekit_lib.nx nx_deploy_ready_scope_gate.nx

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

main gv_head gv_puts sys_write gv_ctr sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gk_mkdir sys_mkdir gk_write sys_openat_wr gk_len gk_write_all sys_write ↻ sys_close sg_manifest sys_mmap ↻ gk_cat gk_write ↻ gv_check gv_puts ↻ gk_contains sys_mmap ↻ gk_read sys_openat_rd sys_read sys_close ↻

structs

none

consts

25const SG_SUBJECT_DEFAULT: *u8 = "/volume1/homes/elderwesto/nishihost/nx_deploy_ready.elf"
26const SG_FX: *u8 = "/tmp/nx_deploy_ready_scope_gate"
27const SG_FX_K: *u8 = "/tmp/nx_deploy_ready_scope_gate/knowledge"
28const SG_FX_R: *u8 = "/tmp/nx_deploy_ready_scope_gate/knowledge/registry"
29const SG_FX_DOMAIN: *u8 = "/tmp/nx_deploy_ready_scope_gate/knowledge/registry/deploy_domain.conf"
30const SG_FX_SHARED: *u8 = "/tmp/nx_deploy_ready_scope_gate/knowledge/registry/deploy_sharedfate.conf"
31const SG_FX_MAN_A: *u8 = "/tmp/nx_deploy_ready_scope_gate/man_a.tsv"
32const SG_FX_MAN_B: *u8 = "/tmp/nx_deploy_ready_scope_gate/man_b.tsv"
33const SG_FX_MAN_C: *u8 = "/tmp/nx_deploy_ready_scope_gate/man_c.tsv"
34const SG_FX_MAN_D: *u8 = "/tmp/nx_deploy_ready_scope_gate/man_d.tsv"
35const SG_FX_EV_A: *u8 = "/tmp/nx_deploy_ready_scope_gate/ev_a.log"
36const SG_FX_EV_B: *u8 = "/tmp/nx_deploy_ready_scope_gate/ev_b.log"
37const SG_FX_EV_C: *u8 = "/tmp/nx_deploy_ready_scope_gate/ev_c.log"
38const SG_FX_EV_D: *u8 = "/tmp/nx_deploy_ready_scope_gate/ev_d.log"
39const SG_CAP: i64 = 262144
40const SG_TAB: i64 = 9
41const SG_EXIT_BLOCKED: i64 = 3
44const SG_T_SUPD: *u8 = "supd"
45const SG_T_PERFD: *u8 = "perfd"
46const SG_T_SRCHD: *u8 = "srchd"
47const SG_T_NOSUCH: *u8 = "nosuchtarget"

functions

49func sg_manifest(path: *u8, evlog: *u8) -> i64
called by 1: main calls 3: sys_mmapgk_catgk_write
63func sg_run(subject: *u8, man: *u8, target: *u8, out: *u8, outlen: *i64) -> i64
called by 1: main calls 1: gk_run_capture
67func main(argc: i64, argv: *i64) -> i64