nx_wpt_spine.nx
buildroot/runtime/nx_wpt_spine.nx
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
imports: nx_syscalls.nxnx_sha256.nx
imported by: nx_wpt_acquire_lib.nxnx_wpt_reftest.nxnx_wpt_runner.nx
structs
| none |
consts
| 30 | const WSP_FS: i64 = 124 |
| 31 | const WSP_FS_LEGACY: i64 = 9 |
functions
| 32 | func wsp_is_fs(c: i64) -> i64 |
| 38 | func 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 } |
| 39 | func 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 } |
| 40 | func wsp_ends_with(s: *u8, n: i64, suf: *u8, sn: i64) -> i64 |
| 46 | func wsp_hex16(dig: *u8, out: *u8) -> i64 |
| 59 | func wsp_engine_sha(out: *u8) -> i64 |
| 72 | func wsp_name_lt(a: *u8, b: *u8) -> i64 |
| 87 | func wsp_collect_names(dir: *u8, suf: *u8, namebuf: *u8, nbcap: i64, offs: *i64, maxn: i64) -> i64 |
| 137 | func wsp_corpus_sha(dir: *u8, namebuf: *u8, offs: *i64, n: i64, out: *u8) -> i64 |
| 164 | func wsp_field_eq(h: *u8, p: i64, q: i64, v: *u8) -> i64 |
| 175 | func wsp_hist_find(h: *u8, hn: i64, c1v: *u8, c2v: *u8, c3v: *u8, rowout: *i64) -> i64 |
| 204 | func wsp_hist_col_int(h: *u8, ro: i64, rl: i64, c: i64) -> i64 |
| 222 | func wsp_base_of(dir: *u8, out: *u8) -> i64 |
| 237 | func wsp_append(histpath: *u8, row: *u8, ro: i64) -> i64 |