code wiki / _hdl_build / nx_dep_audit.nx

nx_dep_audit.nx

buildroot/runtime/_hdl_build/nx_dep_audit.nx

11661 B264 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic dep
docsdependenciesstructsconstsfunctions

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

nx_assign_core.nx nx_dep_audit.nx

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

main da_test an_newcx sys_mmap an_id_at an_deps_at da_row_danglings an_deps_at ↻ da_has_dot an_find an_streq an_id_at ↻ da_in_set an_streq ↻ da_class da_is_status_word an_streq ↻ da_best da_pfx an_id_at ↻ da_finding_to da_best ↻ da_w an_id_at ↻ da_status_str da_class_str da_gate da_w ↻ da_wn sys_openat_append an_newcx ↻ an_load sys_mmap ↻ sys_openat_rd sys_read sys_close an_id_at ↻ an_deps_at ↻ an_gate_at an_title_at

structs

none

consts

22const DA_MAGIC_262144: i64 = 262144
23const DA_MAGIC_262143: i64 = 262143
24const DA_MAGIC_4000: i64 = 4000
26const DA_QUEUE: *u8 = "knowledge/registry/assignment_queue.tsv"
27const DA_CALLOUTS: *u8 = "knowledge/registry/callouts.tsv"
28const DA_CREDS: *u8 = "knowledge/registry/cred_requests.tsv"
29const DA_LOG: *u8 = "knowledge/status/dep_audit.log"
30const DA_XCAP: i64 = 48

functions

32func 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 }
33func 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
35func 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
37func da_status_str(b: i64) -> *u8
called by 1: da_finding_to
47func da_is_status_word(t: *u8) -> i64
called by 1: da_class calls 1: an_streq
61func da_load_ids(path: *u8, arena: i64, idcap: i64, maxc: i64) -> i64
called by 1: main calls 1: sys_read
96func da_in_set(arena: i64, cnt: i64, idcap: i64, name: *u8) -> i64
called by 1: da_row_danglings calls 1: an_streq
102func da_pfx(a: *u8, b: *u8) -> i64
called by 1: da_best
111func da_best(cx: *i64, dep: *u8, selfr: i64) -> i64
127func da_class(cx: *i64, tok: *u8, r: i64) -> i64
133func da_class_str(c: i64) -> *u8
called by 1: da_finding_to
141func da_finding_to(fd: i64, cx: *i64, r: i64, tok: *u8, cls: i64) -> i64
155func da_row_danglings(cx: *i64, r: i64, lfd: i64, emit: i64, counts: *i64, cross: i64, ncross: i64) -> i64
196func da_test(dep: *u8) -> i64
210func da_gate(fd: i64, cpos: i64, cneg: i64, rows: i64, counts: *i64, ok: i64) -> i64
called by 1: main calls 2: da_wda_wn
228func main() -> i64