code wiki / _hdl_build / nx_janitor_dupname.nx

nx_janitor_dupname.nx

buildroot/runtime/_hdl_build/nx_janitor_dupname.nx

5379 B96 linesdepth 2pulls 2 transitivereach 15 importersview sourcekind librarytopic janitor
docsdependenciesstructsconstsfunctions

about

nx_janitor_dupname.nx -- the "dup" part of the janitor's X-JAN-002 sprawl half (nx_janitor_sprawl already covers the "dead-organ"/orphaned-.tsv part; this is its sibling). It detects DUPLICATE ORGAN NAMES = SHADOWING collisions: the SAME basename in BOTH runtime/_hdl_build/ AND runtime/. nx_sov_build_run probes _hdl_build/ FIRST, so the _hdl_build copy SHADOWS the runtime one -- you run "nx_foo" by name and get the WRONG organ. This is the exact bug found this session (TWO nx_sovereignty_audit.nx: a per-file in-content checker shadowing the tree-walking debt counter). Sovereign getdents walk of the two dirs, intersect the basenames, flag every shadowed organ. READ-ONLY (never-brick): it FLAGS; renaming/resolving stays operator- gated (build pipelines + callers must be checked first). license_tier: ORIGINAL

dependencies 1 imports · 10 importers

nx_syscalls.nx nx_janitor_dupname.nx nx_capability_genealogy.nx nx_capability_shape_audit.nx nx_collision_plan.nx nx_collision_plan_gate.nx nx_collision_retire_safe.nx nx_dupname_worklist.nx nx_dupname_worklist_gate.nx nx_janitor_dupname_classify_gate.n nx_janitor_dupname_gate.nx nx_sovereignty_scorecard.nx

imports: nx_syscalls.nx

imported by: nx_capability_genealogy.nxnx_capability_shape_audit.nxnx_collision_plan.nxnx_collision_plan_gate.nxnx_collision_retire_safe.nxnx_dupname_worklist.nxnx_dupname_worklist_gate.nxnx_janitor_dupname_classify_gate.nxnx_janitor_dupname_gate.nxnx_sovereignty_scorecard.nx

structs

none

consts

none

functions

11func jdn_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 }
12func jdn_is_nx(nm: *u8) -> i64 { var nl: i64=0; while nm[nl]!=(0 as u8){nl=nl+1} if nl>3 { if nm[nl-3]==(46 as u8) { if nm[nl-2]==(110 as u8) { if nm[nl-1]==(120 as u8) { return 1 } } } } return 0 }
called by 1: jdn_collect
15func jdn_collect(dir: *u8, fnames: *u8, fnoff: *i64, startk: i64, maxk: i64) -> i64
44func jdn_scan(fnames: *u8, fnoff: *i64, hcount_out: *i64) -> i64
called by 9: mainmainmainmainmainmain+3 calls 1: jdn_collect
53func jdn_is_shadowed(fnames: *u8, fnoff: *i64, idx: i64, hcount: i64) -> i64
60func jdn_collisions(fnames: *u8, fnoff: *i64, hcount: i64, NF: i64) -> i64
66func jdn_is_collision(fnames: *u8, fnoff: *i64, hcount: i64, NF: i64, name: *u8) -> i64
called by 2: cg_generationsmain calls 1: jdn_streq
76func jdn_read(path: *u8, buf: *u8, cap: i64) -> i64
82func jdn_path(pfx: *u8, name: *u8, out: *u8) -> i64 { var o: i64=0; var i: i64=0; while pfx[i]!=(0 as u8){out[o]=pfx[i];o=o+1;i=i+1} i=0; while name[i]!=(0 as u8){out[o]=name[i];o=o+1;i=i+1} out[o]=0 as u8; return o }
85func jdn_pair_differs(name: *u8, br: *u8, bh: *u8, cap: i64) -> i64
called by 1: main calls 3: sys_mmapjdn_pathjdn_read