code wiki / (root) / nx_orchestrate_raci_evaluate_t144.nx

nx_orchestrate_raci_evaluate_t144.nx

buildroot/runtime/nx_orchestrate_raci_evaluate_t144.nx

18400 B349 linesdepth 6pulls 10 transitivereach 1 importersview sourcekind tooltopic orchestrate
docsdependenciesstructsconstsfunctions

about

nx_orchestrate_raci.nx -- ORCHESTRATION rung 3: the CONDUCTOR / the "call the API, it calls the team, the team runs the workstream" engine (operator 2026-07-10: "standard mcp apis so that we call the apis that call the teams that run the workstreams ... true orchestration like an orchestra ... key for autonomous capabilities"). ---- seq1789: WHY THIS FILE WAS RENAMED (restored capability, do not undo) -------------------------- This organ was `runtime/nx_orchestrate.nx`. A deduplication pass matched it against a COMPLETELY DIFFERENT organ that happened to share the filename -- `runtime/_hdl_build/nx_orchestrate.nx`, the wait-for-opening DEPLOY QUEUE POLLER -- and retired this one to `.dupe-reconciled`. They are not duplicates: one resolves RACI and engages a team, the other polls a deploy queue. Nothing in their CONTENT is shared; only the name was. What that cost, measured 2026-07-30: nx_orchestrate_gate could no longer compile (expand_imports failed), so it kept running its STALE binary -- which HANGS after two checks. That hang propagated: nx_swcompare_evidence forks its domain gates with no deadline, so `librarian` never returned at all and the failure surfaced as an MCP transport error, blaming the network for a retired source file. LAW: A DEDUPLICATOR THAT MATCHES ON NAME RETIRES CAPABILITY, NOT DUPLICATION. Sameness is a property of CONTENT; a filename is a label someone chose twice. Same family as the substring/role confusion in md_promote_deny -- identity inferred from a name instead of read from the thing itself. The name is now distinct from the poller's, so the collision cannot recur rather than being remembered. Given an ACTIVITY (workstream), this organ: (1) RESOLVES its RACI from the sovereign RACI store -- the ONE Accountable role, the Responsible role(s), Consulted, Informed. NEVER fabricates: an activity with no Accountable row -> DENY (returns -1), so the orchestra cannot engage a role that does not own the work. (2) BINDS the runnable workstream ORGAN from knowledge/orchestration/workstreams.conf (activity<TAB>organ). (3) RECORDS the engagement durably on the seg-store (orchestration- prefix) -- who was engaged, what ran. (4) DISPATCHES: forks _offc/nx_sov_build_run.elf <organ> and wait4s it = the team actually runs the workstream (only with the run flag; resolve/plan still records the engagement). license_tier: ORIGINAL

dependencies 6 imports · 1 importers

nx_syscalls.nx nx_estate_path.nx nx_raci_sov.nx nx_seg_store.nx nx_utf8.nx nx_fio.nx nx_orchestrate_raci_evaluate_t nx_orchestrate_raci_evaluate_gate_

imports: nx_syscalls.nxnx_estate_path.nxnx_raci_sov.nxnx_seg_store.nxnx_utf8.nxnx_fio.nx

imported by: nx_orchestrate_raci_evaluate_gate_t144.nx

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

main or_w sys_write or_slen ep_anchor sys_openat_rd sys_close sys_chdir 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 ↻ or_eq orch_engage orch_engage_from sys_mmap_shared or_w ↻ orch_binding_read or_binding_init sys_mmap_shared ↻ fio_region_init fio_region_open fio_region_init ↻ fio_region_fail fio_region_close sys_openat_rd ↻ sys_lseek fio_region_next fio_region_close ↻

structs

34struct NxOrBinding

consts

45const OR_BIND_CELL:i64=128
46const OR_BIND_FIELDS:i64=5
47const OR_MAGIC_131072: i64 = 131072
48const OR_MAGIC_16384: i64 = 16384
51const OR_WS: *u8 = "knowledge/orchestration/workstreams.conf"
52const OR_STORE:*u8 = "knowledge/store/orchestration-"

functions

54func or_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
55func or_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} d[o]=0 as u8; return o }
56func or_w(s: *u8) -> i64 { sys_write(1, s, or_slen(s)); return 0 }
57func or_eq(a: *u8, b: *u8) -> i64 { var i: i64=0; while a[i]!=(0 as u8){ if a[i]!=b[i]{return 0} i=i+1 } if b[i]!=(0 as u8){return 0} return 1 }
called by 3: mainorch_rolesmain
58func or_read(path: *u8, buf: *u8, cap: i64) -> i64
65func or_field(buf: *u8, ls: i64, le: i64, col: i64, dst: *u8) -> i64
called by 1: orch_roles
74func or_has_letter(letters: *u8, L: u8) -> i64 { var i: i64=0; while letters[i]!=(0 as u8){ if letters[i]==L { return 1 } i=i+1 } return 0 }
called by 1: orch_roles
77func orch_roles(activity: *u8, L: u8, out: *u8) -> i64
104func orch_accountable(activity: *u8, out: *u8) -> i64
112func orch_organ(activity:*u8,out:*u8)->i64
118func or_record_hex(out:*u8,off:i64,s:*u8)->i64
called by 1: orch_record_args_to
122func orch_record_args_to(store:*u8,activity:*u8,acct:*u8,organ:*u8,verdict:*u8,verb:*u8,config:*u8,prefix:*u8)->i64
137func orch_record(activity:*u8,acct:*u8,organ:*u8,verdict:*u8)->i64{return orch_record_args_to(OR_STORE,activity,acct,organ,verdict,"","","")}
139func orch_dispatch_args(organ:*u8,verb:*u8,id:*u8,prefix:*u8)->i64
163func orch_dispatch(organ:*u8)->i64{return orch_dispatch_args(organ,"","","")}
167func orch_engage_selected(activity:*u8,do_run:i64,records:*u8,binding:*NxOrBinding,hasorgan:i64)->i64
206func orch_engage_from(activity:*u8,do_run:i64,workstreams:*u8,records:*u8)->i64
217func orch_engage(activity:*u8,do_run:i64)->i64{return orch_engage_from(activity,do_run,OR_WS,OR_STORE)}
called by 1: main calls 1: orch_engage_from
219func main(argc: i64, argv: *i64) -> i64
236func or_bind_name(s:*u8)->i64
called by 1: orch_dispatch_args
246func or_binding_init(b:*NxOrBinding)->i64
249func or_binding_release(b:*NxOrBinding)->i64
253func or_bind_name_span(buf:*u8,start:i64,n:i64)->i64
called by 1: orch_binding_select
261func orch_binding_select(buf:*u8,n:i64,activity:*u8,selected:*i64)->i64
294func orch_binding_read(path:*u8,activity:*u8,b:*NxOrBinding)->i64
326func orch_binding_buffer(buf:*u8,n:i64,activity:*u8,organ:*u8,verb:*u8,id:*u8,prefix:*u8)->i64
339func orch_binding_from(path:*u8,activity:*u8,organ:*u8,verb:*u8,id:*u8,prefix:*u8)->i64