code wiki / _hdl_build / nx_orchestrate_raci_outcomes_t52.nx

nx_orchestrate_raci_outcomes_t52.nx

buildroot/runtime/_hdl_build/nx_orchestrate_raci_outcomes_t52.nx

10367 B202 linesdepth 4pulls 5 transitivereach 0 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 is side-effect-free). license_tier: ORIGINAL

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_estate_path.nx nx_raci_sov.nx nx_seg_store.nx nx_orchestrate_raci_outcomes_t

imports: nx_syscalls.nxnx_estate_path.nxnx_raci_sov.nxnx_seg_store.nx

imported by: nobody (leaf or entry point)

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 sys_mmap ↻ orch_accountable sys_mmap ↻ orch_roles sys_mmap ↻ raci_read_all ss_open ss_open2 raci_row_h sys_mmap ↻ rsv_key ss_hget ss_close ss_close_seg sys_munmap

structs

none

consts

34const OR_MAGIC_131072: i64 = 131072
35const OR_MAGIC_16384: i64 = 16384
38const OR_WS: *u8 = "knowledge/orchestration/workstreams.conf"
39const OR_STORE:*u8 = "knowledge/store/orchestration-"

functions

41func 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
42func 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
43func or_w(s: *u8) -> i64 { sys_write(1, s, or_slen(s)); return 0 }
called by 2: orch_engagemain calls 2: sys_writeor_slen
44func 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 }
45func or_read(path: *u8, buf: *u8, cap: i64) -> i64
52func or_field(buf: *u8, ls: i64, le: i64, col: i64, dst: *u8) -> i64
61func 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
64func orch_roles(activity: *u8, L: u8, out: *u8) -> i64
91func orch_accountable(activity: *u8, out: *u8) -> i64
called by 1: orch_engage calls 2: sys_mmaporch_roles
99func orch_organ(activity: *u8, out: *u8) -> i64
118func orch_record(activity: *u8, acct: *u8, organ: *u8, verdict: *u8) -> i64
132func orch_dispatch(organ: *u8) -> i64
152func orch_engage(activity: *u8, do_run: i64) -> i64
190func main(argc: i64, argv: *i64) -> i64