nx_librarian_audit.nx
buildroot/runtime/nx_librarian_audit.nx
about
nx_librarian_audit.nx -- LIBRARIAN rung 1: the FORMAT-SPRAWL INSTRUMENT. The operator's charge
(2026-07-10): "a bunch of tsv and other non native and non interoperable formats kicking around" --
this lib MEASURES that mechanically so the migration ladder is driven by numbers, not vibes. It walks
data roots via raw getdents64 and classifies every regular file by format class, tallying count+bytes:
0 tsv · 1 csv · 2 json/jsonl · 3 pipe-data (.q .axes .matrix .list .sota .cal .compdocs .flows
.steps) · 4 txt · 5 raw · 6 SEG-STORE (the sovereign native store: *seg-*.docs/.idx/.pos) · 7 log
8 conf · 9 other
The NATIVE share (class 6) over total data bytes is the honest permille the migration work must move.
Read-only by construction: opens directories and files O_RDONLY, writes nothing. license_tier: ORIGINAL
dependencies 1 imports · 1 importers
imports: nx_syscalls.nx
imported by: nx_librarian_audit_gate.nx
structs
| none |
consts
| 11 | const K_MAGIC_65536: i64 = 65536 |
| 12 | const K_MAGIC_1024: i64 = 1024 |
functions
| 15 | func la_ends(name: *u8, nlen: i64, suf: *u8) -> i64 called by 1: la_class |
| 26 | func la_has(name: *u8, nlen: i64, needle: *u8) -> i64 called by 1: la_class |
| 40 | func la_class(name: *u8, nlen: i64) -> i64 |
| 67 | func la_fsize(path: *u8) -> i64 |
| 77 | func la_scan_dir(dirpath: *u8, st: *i64) -> i64 |
| 121 | func la_permil(part: i64, total: i64) -> i64 called by 1: main |