code wiki / _hdl_build / nx_barcheck.nx

nx_barcheck.nx

buildroot/runtime/_hdl_build/nx_barcheck.nx

15493 B346 linesdepth 21pulls 148 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_barcheck.nx -- THE CITATION-ROT WATCHER (debt 1785822056). WHY THIS EXISTS, measured not guessed: on 2026-08-04 two comparison pages were caught carrying claims about OTHER people's software that had silently decayed -- ecosysdesign cited a propagation-cost band whose upper bound appears in NO cited source (1785817918) genealogy cited jscpd v5.0.12 and dependency-cruiser v18.0.0; both had moved (5.0.14 / 18.1.1) in 25 days Both were found only because a human-directed evidence run happened to re-read them. ~41 compare matrices carry the same exposure and NOTHING WATCHED THEM. AN EVIDENCE PROGRAM THAT ONLY CHECKS *OUR* CODE IS HALF A PROGRAM: the claims we make about OTHERS decay too, and faster -- their release cadence is not ours to control. WHAT IT DOES: re-reads every declared version bar from the RIVAL PROJECT'S OWN registry over the sovereign TLS lane, diffs against the banked value, and goes RED when a bar has rotted. Data-driven (rule 11): the bars live in knowledge/barcheck.conf, never in this code. row: <domain>|<label>|<kind npm or gh>|<id>|<banked-version> npm -> registry.npmjs.org/<id>/latest key version gh -> api.github.com/repos/<id>/releases/latest key tag_name UNAUTHENTICATED BY DESIGN: this reads public release metadata only. The estate's GitHub PAT is an open sev-9 (1785769931) and must never be spent on a job that does not need it. NON-VACUITY IS STRUCTURAL, NOT ASSERTED: T4/T5 are gv_bite cells. T4 re-checks a REAL row against a deliberately corrupted banked value and REQUIRES the stale detector to fire on it while staying silent on the true value. T5 REQUIRES a fabricated package to come back UNREACHABLE while a real one resolves. A checker that cannot report STALE cannot report FRESH. expect_exit: 0 license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 7 imports · 0 importers

nx_syscalls.nx nx_estate_path.nx nx_gate_verdict.nx nx_x509_trust_store.nx nx_trust_store_load_from_certdata. nx_https_fetch_follow.nx nx_gzip_wrap.nx nx_barcheck.nx

imports: nx_syscalls.nxnx_estate_path.nxnx_gate_verdict.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_https_fetch_follow.nxnx_gzip_wrap.nx

imported by: nobody (leaf or entry point)

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

main ep_anchor sys_openat_rd sys_close sys_chdir sys_mmap gv_ctr sys_mmap ↻ gv_head gv_puts sys_write nx_trust_store_load_from_c sys_mmap ↻ sys_read_file sys_openat_rd ↻ sys_lseek sys_mmap ↻ sys_read sys_close ↻ nx_nss_certdata_parse sys_mmap ↻ _pat_class_cert _pat_value_octal _pat_end _find_newline _starts_with _parse_octal_line sys_mmap ↻ _is_space _decode_octal_escape _is_octal trust_store_alloc sys_mmap ↻ nx_x509_trust_store_load sys_mmap ↻ x509_parse sys_mmap ↻ asn1_cursor_init asn1_expect_tag sys_mmap ↻

structs

none

consts

35const BK_CERTS: i64 = 512
36const BK_STORECAP: i64 = 4194304
37const BK_FETCHCAP: i64 = 4194304
38const BK_GZOUT: i64 = 8388608
39const BK_MAXROWS: i64 = 64
40const BK_FIELD: i64 = 192
41const BK_HOPS: i64 = 8
42const BK_OUTBUF: i64 = 32768
43const BK_QUOTE: i64 = 34
44const BK_COLON: i64 = 58
45const BK_SPACE: i64 = 32
46const BK_PIPE: i64 = 124
47const BK_NL: i64 = 10
48const BK_HASH: i64 = 35

functions

50func bk_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 1: main calls 1: sys_write
51func bk_nl() -> i64 { let b: *u8 = sys_mmap(8); b[0] = BK_NL as u8; sys_write(1, b, 1); return 0 }
called by 1: main calls 2: sys_mmapsys_write
52func bk_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: bk_find
53func bk_cat(d: *u8, o: i64, s: *u8) -> i64 { var i: i64 = 0; var p: i64 = o; while s[i] != (0 as u8) { d[p] = s[i]; p = p + 1; i = i + 1 } return p }
55func bk_eq(a: *u8, b: *u8) -> i64
65func bk_find(hay: *u8, n: i64, needle: *u8) -> i64
called by 1: bk_json_str calls 1: bk_len
83func bk_json_str(buf: *u8, n: i64, key: *u8, out: *u8, cap: i64) -> i64
called by 1: bk_fetch_version calls 2: sys_mmapbk_find
129func bk_fetch_version(kind: *u8, id: *u8, store: *TrustStore, page: *u8, out: *u8) -> i64
191func main(argc: i64, argv: *i64) -> i64