code wiki / (root) / nx_wpt_spine.nx

nx_wpt_spine.nx

buildroot/runtime/nx_wpt_spine.nx

9710 B243 linesdepth 5pulls 5 transitivereach 5 importersview sourcekind librarytopic wpt
docsdependenciesstructsconstsfunctions

about

nx_wpt_spine.nx -- LIB: the shared TEST-TELEMETRY SPINE (2026-08-19). Extracted from nx_wpt_runner v3 the day nx_wpt_reftest became its second consumer (the DRY law: the second copy is where drift starts). One implementation of: - engine identity (sha256 of the calling binary itself, via /proc/self/exe), - deterministic corpus enumeration (sorted names) + content hash (name+NUL+bytes, sorted order), - the TSV history scan (newest row matching dir[/engine][/corpus]) + column reads, - the 16-hex truncated digest form (64 bits, DECLARED truncation), - history append. Row schema (documented once, here, OTel CI/CD mapped): epoch_s(cicd.pipeline.run start) col1=suite(test.suite name) col2=engine_sha16(service.version) col3=corpus_sha16(vcs.ref analog) then consumer-declared counter columns, dur_ms, verdict LAST. license_tier: ORIGINAL

dependencies 2 imports · 3 importers

nx_syscalls.nx nx_sha256.nx nx_wpt_spine.nx nx_wpt_acquire_lib.nx nx_wpt_reftest.nx nx_wpt_runner.nx

imports: nx_syscalls.nxnx_sha256.nx

imported by: nx_wpt_acquire_lib.nxnx_wpt_reftest.nxnx_wpt_runner.nx

structs

none

consts

30const WSP_FS: i64 = 124
31const WSP_FS_LEGACY: i64 = 9

functions

32func wsp_is_fs(c: i64) -> i64
38func wsp_scat(dst: *u8, off: i64, src: *u8) -> i64 { var i: i64 = 0; while src[i] != (0 as u8) { dst[off+i] = src[i]; i = i + 1 } return off + i }
39func wsp_scatn(dst: *u8, off: i64, src: *u8, n: i64) -> i64 { var i: i64 = 0; while i < n { dst[off+i] = src[i]; i = i + 1 } return off + n }
40func wsp_ends_with(s: *u8, n: i64, suf: *u8, sn: i64) -> i64
46func wsp_hex16(dig: *u8, out: *u8) -> i64
59func wsp_engine_sha(out: *u8) -> i64
72func wsp_name_lt(a: *u8, b: *u8) -> i64
87func wsp_collect_names(dir: *u8, suf: *u8, namebuf: *u8, nbcap: i64, offs: *i64, maxn: i64) -> i64
137func wsp_corpus_sha(dir: *u8, namebuf: *u8, offs: *i64, n: i64, out: *u8) -> i64
164func wsp_field_eq(h: *u8, p: i64, q: i64, v: *u8) -> i64
175func wsp_hist_find(h: *u8, hn: i64, c1v: *u8, c2v: *u8, c3v: *u8, rowout: *i64) -> i64
204func wsp_hist_col_int(h: *u8, ro: i64, rl: i64, c: i64) -> i64
222func wsp_base_of(dir: *u8, out: *u8) -> i64
237func wsp_append(histpath: *u8, row: *u8, ro: i64) -> i64