code wiki / (root) / nx_code_index_gate.nx

nx_code_index_gate.nx

buildroot/runtime/nx_code_index_gate.nx

6606 B146 linesdepth 8pulls 13 transitivereach 0 importersview sourcekind gate/prooftopic code
docsdependenciesstructsconstsfunctions

about

nx_code_index_gate.nx -- gate for the e3 semantic organ index (core = nx_code_index.nx), run against the LIVE :8033 no-float coder serve (BASE weights -- production embedder). T1 BUILD fresh store, 6 real organ headers indexed -> added=6, count=6 T2 IDEMPOT re-run build -> added=0, count still 6 (rule 10; crash-resume re-runs are safe) T3 RETRIEVE 6 diagonal NL queries -> top-1 hits reported; PASS bar >= 3/6 = the MEASURED base-weight baseline (2026-07-15: hits were gguf/http/llm; misses lib_std/forge/ csprng are MODEL QUALITY -- csprng's own-header probe scored 199 pm twice, deterministic, so no pipeline bug). RATCHET: raise the bar when the embedder improves (e5 contrastive tune); the jina oracle gate banks the tuned-weights target. T4 DETERM same query twice -> identical top-1 name AND identical pm (cross-request, via daemon) T5 NEG corrupt-magic store -> query and count both refuse (negative rc) license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 1 imports · 0 importers

nx_code_index.nx nx_code_index_gate.nx

imports: nx_code_index.nx

imported by: nobody (leaf or entry point)

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

main ci_ws cg_write_all sys_openat_wr cg_reset_store cg_write_all ↻ ci_index_list ci_store_ensure sys_read sys_openat_wr ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap sys_read ↻ sys_close ci_index_file ci_store_has ci_store_load sys_read_file ↻ std_slen ci_ws ↻ ci_header sys_read ↻ sys_now_ms sys_mmap ↻ sys_clock_gettime_mono ci_embed ci_build_body fc_json_esc_bytes ci_post_embed sys_socket nx_http_client_sockaddr_ip nx_connect_bounded nx_fcntl sys_connect sys_mmap ↻ sys_poll nx_http_client_build_reque nx_dec_emit_u63

structs

none

consts

15const CG_PORT: i64 = 8033

functions

17func cg_write_all(path: *u8, data: *u8, n: i64) -> i64
called by 2: cg_reset_storemain calls 1: sys_openat_wr
33func cg_reset_store(store: *u8) -> i64
called by 1: main calls 1: cg_write_all
46func cg_q(store: *u8, text: *u8, expect: *u8, nameb: *u8, pmo: *i64) -> i64
62func main() -> i64