code wiki / (root) / nx_facet_gate.nx

nx_facet_gate.nx

buildroot/runtime/nx_facet_gate.nx

4403 B114 linesdepth 6pulls 9 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_facet_gate.nx -- SREACH R2 GATE: the bits-up facet classifier vs the verified gold facets, at a permil bar. module: nishi-core.search.bench.facet_gate depends: nx_diora_data.nx (gold qrels), nx_facet_classify.nx capability: GATE WHY: R2 retires the oracle-from-gold facet labels. This gate is the proof: run nx_facet_classify over every gold doc, measure agreement as a permil, print every disagreement (url, gold, got) so a miss is a named defect, and write ONE machine-readable verdict row to a durable log the Examiner can grade. exit 0 iff permil >= bar. Bar rationale (Rule #11): 900 permil = at most 4 of the 45 verified docs may disagree. Facets feed ONLY the ranking diversity bonus (0.5 gain one-time), so a single mislabel shifts at most one slot -- 900 keeps the policy honest without demanding the classifier memorize the gold (which would re-create the leak this rung removes).

dependencies 2 imports · 0 importers

nx_diora_data.nx nx_facet_classify.nx nx_facet_gate.nx

imports: nx_diora_data.nxnx_facet_classify.nx

imported by: nobody (leaf or entry point)

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

main fg_puts nx_diora_qn nx_diora_fill_qrels fg_facet_name fg_putn sys_openat_append fg_fputs fg_fputn sys_now_realtime_sec sys_mmap sys_clock_gettime_real

structs

none

consts

23const NX_FACET_GATE_BAR_PERMIL: i64 = 900

functions

25func fg_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
26func fg_putn(v: i64) -> i64
called by 1: main
39func fg_fputs(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 }
called by 1: main
40func fg_fputn(fd: i64, v: i64) -> i64
called by 1: main
54func fg_facet_name(f: i64) -> *u8
called by 1: main
65func main() -> i64