code wiki / (root) / nx_deploycover_gate.nx

nx_deploycover_gate.nx

buildroot/runtime/nx_deploycover_gate.nx

12815 B269 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_deploycover_gate.nx -- WHAT FRACTION OF THE RUNNING FLEET CAN ACTUALLY BE DEPLOYED? THE QUESTION NOTHING ELSE ASKS. The ecosystem has gates for whether an organ WORKS, and a control plane for BUILDING and DEPLOYING one. Nothing measures whether the deploy plane COVERS the fleet -- so a service can run for months with no sanctioned way to update it, and nothing says a word. MEASURED 2026-07-31 on this host: 15 services running, 9 rows in deploy_targets.conf. A fix to one of the uncovered 6+ CANNOT BE LANDED over the API at all. That is the structural root of the recurring SOURCE-EDITED-BUT-NOT-DEPLOYED state seen across three lanes today: not discipline, COVERAGE. Worse, /api/inventory ADVERTISES nx_hub_gw.elf and nx_torrent_gw.elf as managed deployables while deploy_targets.conf -- the allowlist /api/deploy actually reads -- contains neither. The declared coverage and the real coverage disagree, and only the smaller one is true. BOTH DIRECTIONS, deliberately (this is the fleet-drift discipline: manifest-to-reality AND reality-to-manifest): RUNNING-NOT-DEPLOYABLE -- a live service with no sanctioned update path. The dangerous direction: its fixes must go around the health-checked, auto-rollback deploy path. DEPLOYABLE-NOT-RUNNING -- an allowlist row for something not up. Usually benign (oneshots, toolchain), but a row pointing at nothing is also how an allowlist rots. ADVISORY BY DESIGN (exit 0 unless the SCAN fails). A low coverage number is a backlog, not a reason to fail every build. What DOES fail: reading zero rows or zero services, because an instrument that measured nothing must never render as a clean fleet. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_deploycover_gate.nx

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

main dc_p dc_len sys_write sys_mmap dc_slurp sys_openat_rd sys_read sys_close dc_basekey dc_put dc_slot dc_len ↻ dc_pn sys_mmap ↻ sys_write ↻ dc_slot ↻ dc_has dc_eq dc_slot ↻ sys_openat_append dc_wf dc_len ↻ sys_write ↻ dc_pnf sys_mmap ↻ sys_write ↻ sys_close ↻

structs

none

consts

28const DC_MAXN: i64 = 256
29const DC_LOG: *u8 = "knowledge/status/deploycover_gate.log"
30const DC_MODE: i64 = 420
31const DC_NAMELEN: i64 = 64

functions

33func dc_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 3: dc_pdc_wfmain
34func dc_p(s: *u8) -> i64 { let n: i64 = dc_len(s); sys_write(1, s, n); return 0 }
called by 1: main calls 2: dc_lensys_write
35func dc_wf(fd: i64, s: *u8) -> i64 { let n: i64 = dc_len(s); sys_write(fd, s, n); return 0 }
called by 1: main calls 2: dc_lensys_write
36func dc_pnf(fd: i64, v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
47func dc_pn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
59func dc_slurp(path: *u8, buf: *u8, cap: i64) -> i64
called by 1: main calls 3: sys_openat_rdsys_readsys_close
69func dc_slot(arr: *u8, i: i64) -> *u8 { return ((arr as i64) + i * DC_NAMELEN) as *u8 }
called by 3: dc_putdc_hasmain
71func dc_put(arr: *u8, cnt: i64, src: *u8, s: i64, e: i64) -> i64
called by 1: main calls 1: dc_slot
83func dc_eq(a: *u8, b: *u8) -> i64
called by 1: dc_has
93func dc_has(arr: *u8, cnt: i64, name: *u8) -> i64
called by 1: main calls 2: dc_eqdc_slot
103func dc_basekey(src: *u8, s: i64, e: i64, out: *u8) -> i64
called by 1: main
123func main() -> i64