code wiki / _hdl_build / nx_drift_disposition.nx

nx_drift_disposition.nx

buildroot/runtime/_hdl_build/nx_drift_disposition.nx

7427 B117 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic drift
docsdependenciesstructsconstsfunctions

about

nx_drift_disposition.nx -- DECIDE + DISPOSITION the WMS dep-drift clog (the live publisher-death at scale). Operator 2026-07-04: "we need THEM to DECIDE + get these things FIXED till trusted like you are; i can't have the nishi publisher situation where the queue clogs and dies." nx_queue_health DETECTS 35 dep-drift rows (deps naming ids that don't exist -> can NEVER unblock, silently = the death) + exits RED, but nothing DECIDES them. THIS drains that RED: for each drifted row it emits a DISPOSITION worklist line (id, the phantom dep, title, gate) so the row's OWNER can decide -- REPOINT the dep to the right id, or CLEAR it if the prereq is already done/gone. Nothing stays a silent stuck row: every drift becomes a VISIBLE, owned decision. COMPOSES nx_assign_core (an_load/an_id_at/an_deps_at/an_title_at/an_gate_at/an_find) -- the SAME loader nx_queue_health uses -- so this is the DECIDE half of the existing DETECT (no fork, Cardinal 15). Writes knowledge/status/drift_worklist.txt (the owner-actionable list) + prints a summary. READ-ONLY on the queue (it does NOT auto-rewrite deps -- a mis-wired program is worse than a visible stuck row; the OWNER decides the repoint, per Claude-is-tutor-not-doer). license_tier: ORIGINAL genealogy_id: operator-2026-07-04-queue-death + nx_queue_health-drift-detector lineage_id: nishi_drift_disposition_v1 expect_exit: 0

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_assign_core.nx nx_drift_disposition.nx

imports: nx_syscalls.nxnx_assign_core.nx

imported by: nobody (leaf or entry point)

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

main dd_w sys_write an_newcx sys_mmap an_load sys_mmap ↻ sys_openat_rd sys_read sys_close an_id_at an_deps_at an_gate_at an_title_at sys_exit sys_openat_wr sys_mmap ↻ dd_first_baddep an_deps_at ↻ sys_mmap ↻ an_find an_streq an_id_at ↻ dd_classify dd_streq an_id_at ↻ an_title_at ↻ sys_close ↻ dd_n sys_mmap ↻ sys_write ↻

structs

none

consts

19const DD_WORKLIST: *u8 = "knowledge/status/drift_worklist.txt\x00"

functions

21func dd_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 1: main calls 1: sys_write
22func dd_streq(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 1: dd_classify
28func dd_classify(dep: *u8) -> *u8
called by 1: main calls 1: dd_streq
37func dd_n(fd: i64, v: i64) -> i64 { let b: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(fd,"-" as *u8,1)} let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{b[i]=t[k-1-i];i=i+1} sys_write(fd,b,k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
40func dd_first_baddep(cx: *i64, r: i64, out: *u8) -> i64
called by 1: main calls 3: an_deps_atsys_mmapan_find
64func main(argc: i64, argv: *i64) -> i64