code wiki / (root) / nx_bench_harness.nx

nx_bench_harness.nx

buildroot/runtime/nx_bench_harness.nx

12306 B266 linesdepth 6pulls 9 transitivereach 3 importersview sourcekind benchtopic bench
docsdependenciesstructsconstsfunctions

about

nx_bench_harness.nx -- the bits-up search leaderboard engine. module: nishi-core.search.bench.harness depends: fx.nx, syscalls.nx, nx_str.nx, nx_source_tier.nx, nx_bench_metrics.nx, nx_bench_intent.nx capability: CORE_COMPUTE wired_status: FULLY_WIRED WHY (operator cardinal, 2026-05-29): the search engine must S-CLASS EXCEED the incumbents -- sovereignty is never the win. This module is the measured 1:1 head-to-head that proves (or refutes) the exceed: nx_bench_score_serp -- feed ONE engine's ranked SERP + the query's qrels, get ONE NxScorecard across every proven kernel (nDCG, S-recall, Cube filled/speed, primary-source precision, canonical rate, MAP, MRR, altitude). Q16.16 throughout => byte-identical on every machine. nx_bench_nishi_rank -- re-order a SHARED document universe by the Nishi research-delivery policy (primary-source-first + facet diversity). Score "same documents, our ranking" vs "same documents, the incumbent's ranking" and the exceed is a fair, measured re-ranking result -- the retrieval set is identical, only the ordering differs. The four kernels this composes carry their own research citations + KATs; the harness adds no new math, only the wiring + a single data-driven policy.

dependencies 7 imports · 3 importers

fx.nx syscalls.nx nx_str.nx nx_source_tier.nx nx_bench_metrics.nx nx_bench_intent.nx nx_facet_classify.nx nx_bench_harness.nx nx_bench_harness_test.nx nx_diora_frontend.nx nx_diora_leaderboard.nx

imports: fx.nxsyscalls.nxnx_str.nxnx_source_tier.nxnx_bench_metrics.nxnx_bench_intent.nxnx_facet_classify.nx

imported by: nx_bench_harness_test.nxnx_diora_frontend.nxnx_diora_leaderboard.nx

structs

37struct NxScorecard

consts

52const NX_SCORECARD_BYTES: i64 = 104 // 13 i64 fields * 8
61const NX_NISHI_DIVERSITY_BONUS: i64 = 32768
72const NX_NISHI_CONTENT_WEIGHT: i64 = 32768

functions

78func nx_bench_canon_len(s: *u8) -> i64
89func nx_bench_url_eq(a: *u8, b: *u8) -> i64
102func nx_bench_qrels_find(qr_url: **u8, qr_n: i64, url: *u8) -> i64
116func nx_bench_score_serp(serp_url: **u8, serp_title: **u8, serp_n: i64,
203func nx_bench_nishi_rank(pool_url: **u8, pool_title: **u8, pool_facet: *i64,
260func nx_bench_exceeds(nishi: *NxScorecard, incumbent: *NxScorecard) -> i64
called by 1: main