code wiki / (root) / nx_varcensus_candidate_t139.nx

nx_varcensus_candidate_t139.nx

buildroot/runtime/nx_varcensus_candidate_t139.nx

69333 B1488 linesdepth 7pulls 10 transitivereach 1 importersview sourcekind tooltopic varcensus
docsdependenciesstructsconstsfunctions

about

nx_varcensus.nx -- THE VaM CORPUS CENSUS SURFACE (laptop-local lane, 2026-09-11). nx_varcensus names <file.var> one row per central-directory record (the package's own manifest) nx_varcensus meta <file.var> meta.json's DIRECT top-level members: key, kind, size; short strings nx_varcensus census <dir> <outdir> <rules.conf> EVERY .var under <dir>, recursively, into TSV reports + a summary WHY A SECOND CLI BESIDE nx_varfacts: nx_varfacts is the refcorpus WRITER (it imports nx_refcorpus for rc_put_row and the NAS plane); this surface runs where the corpus lives (the laptop) and writes reports. Both consume the ONE walk in nx_varfacts_lib (vf_cd_locate / vf_cd_entry / vf_member_data / vf_json_*): no second zip reader and no second JSON reader exist here, and the classifier is DATA (nx_varcensus_lib rules). Legacy census/meta reads meta.json only. Private member <file.var> <exact-member-name> <maxbytes> reads one selected member for bounded integrity/schema measurements; member content is never emitted, interpreted as executable code, or published. THE CENSUS CONTRACT (each asserted, each printed with its sum): packages walked = ok + no_eocd + zip64_eocd + window + short + read_fail + record_refused + unopenable for the OK packages: members = sum over role classes = sum over format classes; meta parsed + absent + unreadable + unparsed = ok packages; licence label rows sum to ok packages. A package that is not OK is named in unreadable.tsv. A meta string longer than VC_SHOW_STR_MAX prints its LENGTH only in the meta verb -- free text is not needed to learn a schema, and the bound is announced on every row it applies to (shown=0), never silent. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 3 imports · 1 importers

nx_syscalls.nx nx_varfacts_candidate_t139.nx nx_varcensus_lib.nx nx_varcensus_candidate_t139.nx nx_varcensus_member_gate_t139.nx

imports: nx_syscalls.nxnx_varfacts_candidate_t139.nxnx_varcensus_lib.nx

imported by: nx_varcensus_member_gate_t139.nx

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

main vc_w vc_wn sys_write vc_slen sys_exit vc_streq vc_member_measure sys_openat_rd vc_w ↻ sys_lseek 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 ↻ vc_window vf_eocd_window sys_mmap ↻ vc_pread sys_lseek ↻ sys_read sys_munmap vf_cd_locate vf_u32 vf_u16 sys_close vc_member_read sys_mmap ↻ vf_cd_entry

structs

none

consts

25const VC_FD_OUT: i64 = 1
26const VC_FD_ERR: i64 = 2
27const VC_EXIT_OK: i64 = 0
28const VC_EXIT_IO: i64 = 1
29const VC_EXIT_USAGE: i64 = 2
30const VC_EXIT_MISMATCH: i64 = 3
31const VC_EXIT_REFUSED: i64 = 4
32const VC_SEEK_SET: i64 = 0
33const VC_SEEK_END: i64 = 2
34const VC_DEC: i64 = 10
35const VC_ASCII_0: i64 = 48
36const VC_ASCII_MINUS: i64 = 45
37const VC_PRINT_LO: i64 = 32
38const VC_DEL: i64 = 127
39const VC_QMARK: i64 = 63
40const VC_PAD: i64 = 16
41const VC_LINE_ROOM: i64 = 1024
42const VC_ST_N: i64 = 4
43const VC_ST_SIZE: i64 = 0
44const VC_ST_LOC: i64 = 1
45const VC_ST_WIN: i64 = 2
46const VC_ST_READFAIL: i64 = 9
47const VC_SHOW_STR_MAX: i64 = 80
48const VC_SHOW_ELEMS: i64 = 5
49const VC_MB_LEN: i64 = 0
50const VC_MB_STATE: i64 = 1
51const VC_MB_FOUND: i64 = 2
52const VC_MB_METHOD: i64 = 3
53const VC_MB_CSIZE: i64 = 4
54const VC_MB_USIZE: i64 = 5
55const VC_MB_CRC_EXPECTED: i64 = 6
56const VC_MB_CRC_ACTUAL: i64 = 7
57const VC_MB_N: i64 = 8
58const VC_MD_DUPLICATE: i64 = 6
59const VC_MD_LIMIT: i64 = 7
60const VC_MD_ENCRYPTED: i64 = 8
61const VC_META_NAME: *u8 = "meta.json"
62const VC_DEPS_KEY: *u8 = "dependencies"
63const VC_CONTENT_KEY: *u8 = "contentList"
64const VC_LIC_KEY: *u8 = "licenseType"
65const VC_CREATOR_KEY: *u8 = "creatorName"
66const VC_PACKAGE_KEY: *u8 = "packageName"
67const VC_PROGVER_KEY: *u8 = "programVersion"
70const VC_PATH_MAX: i64 = 4096 // Linux PATH_MAX: a longer path cannot be opened by name at all (counted, never skipped silently)
71const VC_DENT_BUF: i64 = 65536 // one getdents64 batch; the walk loops until the call returns 0
72const VC_NAME_BUF: i64 = 65536 // a ZIP member name length is a u16, so no member name is longer
73const VC_STAT_BUF: i64 = 144
74const VC_S_MODE: i64 = 24
75const VC_S_IFMT: i64 = 0xf000
76const VC_S_IFDIR: i64 = 0x4000
77const VC_S_IFREG: i64 = 0x8000
78const VC_DT_UNKNOWN: i64 = 0
79const VC_FLAG_UTF8: i64 = 2048
80const VC_LEGACY_LIC: i64 = 64
81const VC_NLETTERS: i64 = 26
82const VC_ASCII_UPPER_A: i64 = 65
83const VC_TAB: i64 = 9
84const VC_LF: i64 = 10
85const VC_SLASH: i64 = 47
86const VC_DOT: i64 = 46
87const VC_ROW_SEP: i64 = 44
88const VC_EQ: i64 = 61
90const VC_P_OK: i64 = 0
91const VC_P_NOEOCD: i64 = 1
92const VC_P_ZIP64: i64 = 2
93const VC_P_WINDOW: i64 = 3
94const VC_P_SHORT: i64 = 4
95const VC_P_READFAIL: i64 = 5
96const VC_P_RECORD: i64 = 6
97const VC_P_UNOPENABLE: i64 = 7
102const VC_P_EMPTY: i64 = 8
103const VC_P_NOEOCD_PK: i64 = 9
104const VC_P_NOEOCD_OTHER: i64 = 10
105const VC_P_N: i64 = 11
106const VC_HEAD_LEN: i64 = 4
108const VC_M_PARSED: i64 = 0
109const VC_M_ABSENT: i64 = 1
110const VC_M_UNREADABLE: i64 = 2
111const VC_M_UNPARSED: i64 = 3
112const VC_M_N: i64 = 4
114const VC_W_DIRS: i64 = 0
115const VC_W_DIRS_UNREADABLE: i64 = 1
116const VC_W_VARS: i64 = 2
117const VC_W_VARS_TOP: i64 = 3
118const VC_W_OTHER_FILES: i64 = 4
119const VC_W_SYMLINKS: i64 = 5
120const VC_W_OTHER_TYPES: i64 = 6
121const VC_W_TOO_LONG: i64 = 7
122const VC_W_N: i64 = 8
124const VC_L_AGREE: i64 = 0
125const VC_L_DISAGREE: i64 = 1
126const VC_L_LEGACY_ONLY: i64 = 2
127const VC_L_DIRECT_ONLY: i64 = 3
128const VC_L_NEITHER: i64 = 4
129const VC_L_N: i64 = 5

functions

131func vc_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
132func vc_streq(a: *u8, b: *u8) -> i64
called by 2: vc_walkmain
138func vc_wn(fd: i64, s: *u8, n: i64) -> i64
149func vc_w(fd: i64, s: *u8) -> i64 { return vc_wn(fd, s, vc_slen(s)) }
150func vc_cat(b: *u8, o: i64, s: *u8) -> i64
155func vc_catn(b: *u8, o: i64, v: i64) -> i64
called by 2: vc_namesvc_meta
168func vc_catb(b: *u8, o: i64, src: *u8, s: i64, n: i64) -> i64
called by 2: vc_namesvc_meta
181func vc_pread(fd: i64, off: i64, len: i64, buf: *u8) -> i64
194func vc_state_name(s: i64) -> *u8
called by 2: vc_namesvc_meta
203func vc_pstate_name(s: i64) -> *u8
called by 1: vc_census
219func vc_rank_before(c: *i64, x: i64, y: i64) -> i64
229func vc_counter_sorted_tsv(a: *i64, c: *i64) -> i64
263func vc_pstate_of(loc: i64) -> i64
called by 1: vc_census
271func vc_md_name(s: i64) -> *u8
282func vc_kind_name(k: i64) -> *u8
called by 1: vc_meta
293func vc_window(fd: i64, size: i64, box: *i64, st: *i64) -> *u8
321func vc_member_read(fd: i64, size: i64, win: *u8, winn: i64, box: *i64, selected: *u8, maxbytes: i64, mbox: *i64) -> *u8
381func vc_meta_read(fd: i64, size: i64, win: *u8, winn: i64, box: *i64, mbox: *i64) -> *u8
called by 2: vc_metavc_census calls 1: vc_member_read
385func vc_names(path: *u8) -> i64
465func vc_meta(path: *u8) -> i64
613func vc_cmp(a: *u8, b: *u8) -> i64
625func vc_sort(paths: *i64, offs: *i64) -> i64
called by 1: vc_census calls 3: vcl_vec_nvc_cmpvcl_at
649func vc_ext_key(s: *u8, n: i64, out: *u8) -> i64
called by 2: vc_walkvc_census calls 2: vc_catvcl_lc
668func vc_prefix2_key(s: *u8, n: i64, out: *u8) -> i64
called by 1: vc_census calls 1: vc_cat
687func vc_walk(root: *u8, paths: *i64, offs: *i64, exts: *i64, ws: *i64, unread: *i64) -> i64
796func vc_write_out(dir: *u8, name: *u8, a: *i64, total: *i64) -> i64
813func vc_kv(a: *i64, k: *u8, v: i64) -> i64
822func vc_get_str(data: *u8, n: i64, obj: i64, key: *u8, jm: *i64, out: *u8) -> i64
831func vc_app_counts(a: *i64, rs: *i64, axis: i64, counts: *i64, nclass: i64) -> i64
848func vc_counter_tsv(a: *i64, c: *i64, prefix: *u8) -> i64
861func vc_census(root: *u8, outdir: *u8, rulespath: *u8) -> i64
1376func vc_member_measure(path: *u8, selected: *u8, maxbytes: i64) -> i64
1451func vc_positive_limit(s: *u8) -> i64
called by 1: main
1465func main(argc: i64, argv: *i64) -> i64