code wiki / _hdl_build / nx_drift_disposition.nx
nx_drift_disposition.nx
buildroot/runtime/_hdl_build/nx_drift_disposition.nx
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
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
structs
| none |
consts
| 19 | const DD_WORKLIST: *u8 = "knowledge/status/drift_worklist.txt\x00" |
functions
| 21 | func 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 } |
| 22 | func 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 |
| 28 | func dd_classify(dep: *u8) -> *u8 |
| 37 | func 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 } |
| 40 | func dd_first_baddep(cx: *i64, r: i64, out: *u8) -> i64 |
| 64 | func main(argc: i64, argv: *i64) -> i64 |