code wiki / (root) / nx_aliascensus.nx

nx_aliascensus.nx

buildroot/runtime/nx_aliascensus.nx

13411 B268 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_aliascensus.nx -- THE GUARD FOR THE CATALOGUE IDENTITY FIX, AND THE 99-ROW RE-DERIVATION IT OWED. Built 2026-09-04 to close both halves of sev-8 row 1788487164. That row's done-rule had two parts and the fix only met the first: nx_catalog now reports the REQUESTED name's own source instead of the alias target's. The second part -- "a tooth asserts that for an aliased name the reported SOURCE size equals a direct stat of that name's own source" -- had no organ, and a fix without a guard is a fix that cannot be shown to still hold tomorrow. THE DEFECT THIS EXISTS TO PREVENT, MEASURED. nx_catalog_lib cl_regresolve resolves a tool name through tool_allowlist.conf field 2, takes the BASENAME, strips the .prev/.new/.elf/.sov suffix chain and calls the result the effective organ identity. cl_ladder then keyed SOURCE, BUILT and STAGED on THAT, so the catalogue published another organ's bytes under the name you asked for: four of four figures wrong for nx_https_get, and nx_https_get3 -- which has NO FILES on any candidate path -- published with a complete four-rung lifecycle. 99 of 1586 rows alias; 20 of those own real artifacts that were silently replaced, including nx_fs and nx_fs_write, so the estate's own read and write tools had never been catalogued correctly. FIVE separate lanes built BUILT-vs-PROMOTED drift tables on this instrument in one day. WHAT THIS ORGAN CLASSIFIES, and the partition SUMS to the rows it read: SELF field 2's stripped basename equals the tool name -- no aliasing, nothing to check ALIAS-MASKED the name aliases elsewhere AND has a source of its own -- the sharp class, because the catalogue used to report the target's bytes over a real artifact that exists ALIAS-PURE the name aliases elsewhere and has NO source of its own -- an honest entry point; the correct report is SOURCE absent with a real PROMOTED, never an invented lifecycle UNREADABLE a row this organ could not parse -- its own bucket, never folded into a known one nx_aliascensus census [allowlist] -> per-class counts, a NAMED worklist for ALIAS-MASKED, envelope nx_aliascensus selftest -> teeth, exit 0 GREEN / 1 RED Exit: 0 ok/GREEN | 1 RED | 2 usage | 3 UNREADABLE allowlist. verdict= is the LAST token on the last line. license_tier: ORIGINAL. Reads the allowlist and stats sources. Writes only stdout. No hw writes (Rule 26). ⚠DUPLICATION NAMED, NOT HIDDEN: the line/column/number helpers below are the SECOND copy in this estate (nx_debt_triple has the first). The DRY law fires at three, so extraction is owed at the next use and is recorded here rather than discovered later.

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_rowparse_lib.nx nx_aliascensus.nx

imports: nx_syscalls.nxnx_rowparse_lib.nx

imported by: nobody (leaf or entry point)

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

main rp_lit_eq rp_slen rp_slen ↻ sys_write sys_exit sys_mmap nxa_die sys_write ↻ sys_exit ↻ nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ rp_put rp_slen ↻ rp_le rp_col_tab rp_col ac_basename rp_span_eq ac_own_src sys_mmap ↻ ac_cat3 rp_put ↻ rp_putspan ac_fsize sys_openat_rd sys_lseek sys_close rp_putn sys_mmap ↻ sys_openat_rd ↻

structs

none

consts

35const AC_EXIT_OK: i64 = 0
36const AC_EXIT_RED: i64 = 1
37const AC_EXIT_USAGE: i64 = 2
38const AC_EXIT_UNREAD: i64 = 3
39const AC_SPAN: i64 = 8
40const AC_OUT: i64 = 1048576
41const AC_CONF: i64 = 4194304
42const AC_PATH: i64 = 4096
43const AC_SLASH: i64 = 47
44const AC_DOT: i64 = 46
45const AC_WORKLIST_SHOWN: i64 = 40
87const AC_SEEK_END: i64 = 2

functions

50func ac_basename(b: *u8, s: i64, l: i64, out: *i64) -> i64
called by 1: main
76func ac_cat3(p: *u8, a: *u8, b: *u8, s: i64, l: i64, c: *u8) -> i64
called by 1: ac_own_src calls 2: rp_putrp_putspan
88func ac_fsize(path: *u8) -> i64
97func ac_own_src(nm: *u8, s: i64, l: i64) -> i64
called by 1: main calls 3: sys_mmapac_cat3ac_fsize
106func main(argc: i64, argv: **u8) -> i64