code wiki / (root) / nx_container_compose.nx

nx_container_compose.nx

buildroot/runtime/nx_container_compose.nx

7732 B171 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic container
docsdependenciesstructsconstsfunctions

about

nx_container_compose.nx -- R2 of the Nishi Container Host: SOVEREIGN multi-service orchestration planner (the docker-compose / k8s-ordering analog). Reads a service registry (data: NAME:dep1,dep2 per line), computes a dependency-ordered launch plan via topological sort, and REJECTS cycles + missing deps (never-brick: an unsatisfiable stack must not "launch"). = the declarative multi-service core that closes the census orchestration_multi axis. Per-service container PEs come from R1 nx_container_spec_emit (composable). GATE: real Elder AI stack orders correctly (svcconfig -> sdserver -> genimg); cycle -> rejected; missing-dep -> rejected. Topo self-checks its own output (deps must precede dependents). NO fake greens. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_runtime.nx nx_container_compose.nx

imports: nx_syscalls.nxnx_runtime.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main cc_p cc_w sys_write sys_mmap cc_read sys_openat_rd sys_read sys_close cc_compose sys_mmap ↻ cc_findname cc_streq cc_bit cc_pn cc_wn sys_mmap ↻ sys_write ↻ sys_openat_wr cc_w ↻ sys_close ↻

structs

none

consts

10const CCP_MAGIC_8192: i64 = 8192
11const CCP_MAGIC_8191: i64 = 8191
13const CCP_TSV: *u8 = "knowledge/status/container_compose.tsv"
14const CMAX: i64 = 12
15const CNL: i64 = 24
16const CDEP: i64 = 96

functions

18func cc_w(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 }
called by 2: cc_pmain calls 1: sys_write
19func cc_wn(fd: i64, v: i64) -> i64
called by 1: cc_pn calls 2: sys_mmapsys_write
32func cc_p(s: *u8) -> i64 { return cc_w(1, s) }
called by 1: main calls 1: cc_w
33func cc_pn(v: i64) -> i64 { return cc_wn(1, v) }
called by 1: main calls 1: cc_wn
34func cc_read(path: *u8, buf: *u8, cap: i64) -> i64
called by 1: main calls 3: sys_openat_rdsys_readsys_close
47func cc_streq(a: *u8, b: *u8) -> i64
called by 1: cc_findname
53func cc_bit(k: i64) -> i64 { var b: i64 = 1; var i: i64 = 0; while i < k { b = b * 2; i = i + 1 } return b }
called by 1: cc_compose
54func cc_findname(names: *u8, count: i64, tok: *u8) -> i64
called by 1: cc_compose calls 1: cc_streq
61func cc_compose(buf: *u8, n: i64, names: *u8, order: *i64) -> i64
called by 1: main calls 3: sys_mmapcc_findnamecc_bit
132func main() -> i64