code wiki / _hdl_build / nx_dep_audit.nx
nx_dep_audit.nx
buildroot/runtime/_hdl_build/nx_dep_audit.nx
about
nx_dep_audit.nx -- the ENGINEER+DOCTOR dangling-dep probe (operator 2026-06-13: "build the nishi
engineer to one step less than ten seconds [and] have the capabilities to address the errors").
A DANGLING DEP is a `deps` token (field 6) that names NO real queue row. The Engineer FINDS, the
Doctor ROOT-CAUSES: one <10s pass classifies each so the finding is actionable, not noise:
STATUS-IN-DEPS a lifecycle word (TODO/DONE/...) -- a SIL-umbrella VARIANT whose columns are
(parent/program, status) where normal rows are (status, deps); an_core mis-reads
it. NOT a missing foundation (e.g. GENEALOGIST-SIL: field5=NOORPHAN-SIL is the
real parent, field6=TODO is the status).
CROSS-REGISTRY a real row in callouts.tsv (CALLOUT-*) or cred_requests.tsv (CR-*) -- a valid
cross-registry dependency, not an error.
ORGAN-IN-DEPS an organ name (nx_*) where a ROW-ID belongs -- a category error.
LIKELY-RENAME a real queue row shares a strong prefix -> the dep was renamed/typo'd (suggest it).
MISSING no match anywhere -- a genuinely absent foundation, file for the owner.
TRUE-DANGLING = ORGAN + RENAME + MISSING (STATUS-IN-DEPS = schema variant; CROSS-REGISTRY = valid).
It SURFACES + DIAGNOSES + SUGGESTS; it never guess-edits deps (re-point/normalise needs intent).
Composes nx_assign_core (DRY: the queue loader + an_streq). SELF-VALIDATING: baked pos (real-row
dep -> 0) + neg (ghost dep -> 1). Sub-second single pass. Wired into the pulse (tp_tail_c) as the
deps-coherence gate, beside the two no-floating gates (capability_ladder, root_trace). license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_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
| 22 | const DA_MAGIC_262144: i64 = 262144 |
| 23 | const DA_MAGIC_262143: i64 = 262143 |
| 24 | const DA_MAGIC_4000: i64 = 4000 |
| 26 | const DA_QUEUE: *u8 = "knowledge/registry/assignment_queue.tsv" |
| 27 | const DA_CALLOUTS: *u8 = "knowledge/registry/callouts.tsv" |
| 28 | const DA_CREDS: *u8 = "knowledge/registry/cred_requests.tsv" |
| 29 | const DA_LOG: *u8 = "knowledge/status/dep_audit.log" |
| 30 | const DA_XCAP: i64 = 48 |
functions
| 32 | func da_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 } |
| 33 | func da_wn(fd: i64, v: i64) -> i64 { let bb: *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 {bb[i]=t[k-1-i]; i=i+1}; sys_write(fd, bb, k); return 0 } called by 1: da_gate |
| 35 | func da_has_dot(s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { if s[i] == (46 as u8) { return 1 } i = i + 1 } return 0 } called by 1: da_row_danglings |
| 37 | func da_status_str(b: i64) -> *u8 called by 1: da_finding_to |
| 47 | func da_is_status_word(t: *u8) -> i64 |
| 61 | func da_load_ids(path: *u8, arena: i64, idcap: i64, maxc: i64) -> i64 |
| 96 | func da_in_set(arena: i64, cnt: i64, idcap: i64, name: *u8) -> i64 |
| 102 | func da_pfx(a: *u8, b: *u8) -> i64 called by 1: da_best |
| 111 | func da_best(cx: *i64, dep: *u8, selfr: i64) -> i64 |
| 127 | func da_class(cx: *i64, tok: *u8, r: i64) -> i64 |
| 133 | func da_class_str(c: i64) -> *u8 called by 1: da_finding_to |
| 141 | func da_finding_to(fd: i64, cx: *i64, r: i64, tok: *u8, cls: i64) -> i64 |
| 155 | func da_row_danglings(cx: *i64, r: i64, lfd: i64, emit: i64, counts: *i64, cross: i64, ncross: i64) -> i64 |
| 196 | func da_test(dep: *u8) -> i64 |
| 210 | func da_gate(fd: i64, cpos: i64, cneg: i64, rows: i64, counts: *i64, ok: i64) -> i64 |
| 228 | func main() -> i64 |