code wiki / _hdl_build / nx_drift_fix.nx
nx_drift_fix.nx
buildroot/runtime/_hdl_build/nx_drift_fix.nx
about
nx_drift_fix.nx -- APPLY the verifiable dep-drift fix to a COPY (never the SSOT), so the CRITIC (nx_queue_health)
can CONFIRM the drift drops -- evidence a fix works, not a self-declaration. Operator 2026-07-04: "i only
believe when i see evidence; the critic decides if you got it fixed + you check in with it."
THE VERIFIABLE FIX: a row whose DEPS field holds a STATUS-WORD (TODO/DONE/GEN/NOVEL/WIP/RED) is
definitionally mis-emitted (deps must be task-ids or "-"). The STATUS↔DEPS columns are swapped: swapping them
back makes deps = the old status (a real id that resolves, OR "-" for a root) and status = the status-word
(valid). This provably clears the 19 SWAP-class drifts. The 16 RENAME/REMOVED rows (deps looks like an id but
doesn't resolve) are NOT status-words -> NOT touched here (they need an owner REPOINT, not a swap).
SAFE: reads the SSOT, writes a COPY (out path = argv[2], default assignment_queue.fixed.tsv). The SSOT is
NEVER modified -- the real edit stays council-gated (proposed wms-drift-fix, DENIED without quorum). This just
produces the fixed artifact so the critic can grade it + the owner/council can see the exact diff before
approving. license_tier: ORIGINAL lineage_id: nishi_drift_fix_v1 expect_exit: 0
dependencies 1 imports · 0 importers
imports: nx_syscalls.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
| 17 | const DF_BUF: i64 = 4194304 |
functions
| 19 | func df_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 } |
| 20 | func df_n(fd: i64, v: i64) -> i64 { let b: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m} 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 } |
| 23 | func df_is_status_word(buf: *u8, s: i64, e: i64) -> i64 called by 1: main |
| 34 | func main(argc: i64, argv: *i64) -> i64 |