nx_orchestrate_raci.nx
buildroot/runtime/nx_orchestrate_raci.nx
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 is side-effect-free).
license_tier: ORIGINAL
dependencies 3 imports · 1 importers
imports: nx_syscalls.nxnx_raci_sov.nxnx_seg_store.nx
imported by: nx_orchestrate_gate.nx
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 33 | const OR_MAGIC_131072: i64 = 131072 |
| 34 | const OR_MAGIC_16384: i64 = 16384 |
| 37 | const OR_WS: *u8 = "knowledge/orchestration/workstreams.conf" |
| 38 | const OR_STORE:*u8 = "knowledge/store/orchestration-" |
functions
| 40 | func or_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: or_w |
| 41 | func 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 } called by 1: orch_record |
| 42 | func or_w(s: *u8) -> i64 { sys_write(1, s, or_slen(s)); return 0 } |
| 43 | func 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 } |
| 44 | func or_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 51 | func or_field(buf: *u8, ls: i64, le: i64, col: i64, dst: *u8) -> i64 |
| 60 | func 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 |
| 63 | func orch_roles(activity: *u8, L: u8, out: *u8) -> i64 called by 3: mainorch_accountableorch_engage calls 5: sys_mmapraci_read_allor_fieldor_eqor_has_letter |
| 90 | func orch_accountable(activity: *u8, out: *u8) -> i64 |
| 98 | func orch_organ(activity: *u8, out: *u8) -> i64 |
| 117 | func orch_record(activity: *u8, acct: *u8, organ: *u8, verdict: *u8) -> i64 |
| 131 | func orch_dispatch(organ: *u8) -> i64 |
| 151 | func orch_engage(activity: *u8, do_run: i64) -> i64 |
| 180 | func main(argc: i64, argv: *i64) -> i64 |