code wiki / _hdl_build / nx_classifier_sync.nx

nx_classifier_sync.nx

buildroot/runtime/_hdl_build/nx_classifier_sync.nx

5841 B141 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_classifier_sync.nx -- the AUDITOR's pattern-census DRIFT GATE. The library grows from BOTH ends (this arc added shapes 6-10's emitters; a concurrent arc added 11-14: MATH_KERNEL/WIRE_TLV/ STRUCT_WALK/IO_CONTRACT) -- and the classifier + library census silently fell behind (pl_n_patterns stuck at 10 while emit6-9 ship shape 14). This gate makes that class of skew IMPOSSIBLE to miss: it scans runtime/_hdl_build for nx_pattern_emit*.nx sources, parses each header's "(shape N" claim (the EMITTERS are the ground truth -- they exist and gate; the census is derived), and fails unless (a) pl_n_patterns() >= max shape claimed by any emitter (the library census is current) (b) plc_max_covered() >= max shape claimed (every shape has a classifier route) Verdict line appends to knowledge/status/classifier_sync.log -- pulse-able like every gate. RACI: AUDITOR verb (detect the skew); the Builder fixes it by adding rows. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_pattern_classify.nx nx_itoa_lib.nx nx_syscalls.nx nx_classifier_sync.nx

imports: nx_pattern_classify.nxnx_itoa_lib.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap cs_gate cs_max_emitter_shape sys_openat_rd sys_mmap ↻ sys_getdents64 dirent_name cs_is_emit cs_cat cs_shape_claim sys_mmap ↻ sys_read_file sys_openat_rd ↻ sys_lseek sys_mmap ↻ sys_read sys_close dirent_reclen sys_close ↻ pl_n_patterns plc_max_covered plc_table sys_mmap ↻ plc_table_rows cs_report sys_openat_append cs_w sys_write cs_wn nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real sys_close ↻ cs_w ↻

structs

none

consts

14const K_MAGIC_1200: i64 = 1200
15const K_MAGIC_65536: i64 = 65536

functions

17func cs_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 2: cs_reportmain calls 1: sys_write
22func cs_wn(fd: i64, v: i64) -> i64 { nxi_fd(fd, v); return 0 }
called by 2: cs_reportmain calls 1: nxi_fd
23func cs_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){ dst[off+i]=s[i]; i=i+1 } dst[off+i]=0 as u8; return off+i }
26func cs_is_emit(name: *u8) -> i64
43func cs_shape_claim(path: *u8) -> i64
77func cs_max_emitter_shape() -> i64
106func cs_gate(out: *i64) -> i64
117func cs_report(out: *i64, green: i64) -> i64
130func main() -> i64