code wiki / (root) / nx_search_neutrality_gate.nx

nx_search_neutrality_gate.nx

buildroot/runtime/nx_search_neutrality_gate.nx

8359 B193 linesdepth 4pulls 7 transitivereach 0 importersview sourcekind gate/prooftopic search
docsdependenciesstructsconstsfunctions

about

nx_search_neutrality_gate.nx -- the CONTENT-NEUTRALITY CHARTER as a gate. module: nishi-core.search.neutrality_gate depends: nx_bm25.nx (the real inverted-index/tf kernels on the live path) capability: GATE OPERATOR CHARTER (2026-06-10): "we want to be agnostic and not filter out anything that our search returns -- the user may find value; no dead-internet walls like current providers; we have freedom of speech and respect it." Mechanical meaning, proven here against the SAME index kernels the live SERP uses (never a parallel mock): N1 COMPLETENESS -- every indexed doc that matches the query IS in the result set. Retrieval drops nothing. N2 ORDER-NOT-EXCLUDE -- the ranked output contains EVERY doc (zero-match docs rank below all matches -- the live SERP's relevance hard-gate ORDERS, it never REMOVES). N3 SUPPRESSION-TAMPER RED -- a simulated host-blocklist lane (what incumbents do to vk.com/bunkr-class hosts) MUST be caught: the checker sees the missing doc and flags RED. A filter cannot creep in silently. Gate = N1 PASS && N2 PASS && N3 tamper DETECTED. One durable machine row to knowledge/status/search_neutrality.log for the Examiner (arc NEUTRALITY).

dependencies 4 imports · 0 importers

nx_str.nx nx_syscalls.nx nx_bm25.nx nx_search_inverted.nx nx_search_neutrality_gate.nx

imports: nx_str.nxnx_syscalls.nxnx_bm25.nxnx_search_inverted.nx

imported by: nobody (leaf or entry point)

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

main np sys_write nx_str_len sys_mmap nx_inv_new ng_doc nx_str_len ↻ nx_inv_index_row nx_inv_is_token_char nx_inv_hash_bytes_lower nx_inv_add_posting nx_inv_count_token nx_inv_slot_at nx_inv_slot_hash nx_inv_slot_set_hash nx_inv_slot_set_postings_c nx_inv_slot_postings_count nx_inv_finalize_offsets nx_inv_slot_at ↻ nx_inv_slot_hash ↻ nx_inv_slot_postings_count ↻ nx_inv_slot_set_postings_o nx_inv_slot_set_write_curs nx_inv_emit_row nx_inv_is_token_char ↻ nx_inv_hash_bytes_lower ↻ nx_inv_emit_posting nx_inv_slot_at ↻ nx_inv_slot_hash ↻ nx_inv_slot_postings_count ↻ nx_inv_slot_postings_offse nx_inv_slot_write_cursor nx_inv_slot_set_write_curs ↻ nx_inv_hash_bytes_lower ↻ ng_retrieve ng_on_blocked_host nx_bm25_tf nx_inv_is_token_char ↻ nx_inv_hash_bytes_lower ↻

structs

none

consts

56const NG_NDOC: i64 = 6

functions

34func np(s: *u8) -> i64 { sys_write(1, s, nx_str_len(s)); return 0 }
called by 1: main calls 2: sys_writenx_str_len
35func nn(v: i64) -> i64
called by 1: main calls 2: sys_writesys_mmap
43func nfp(fd: i64, s: *u8) -> i64 { sys_write(fd, s, nx_str_len(s)); return 0 }
called by 1: main calls 2: sys_writenx_str_len
44func nfn(fd: i64, v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
61func ng_doc(d: i64) -> *u8
called by 1: main
71func ng_on_blocked_host(d: i64) -> i64 { if d == 5 { return 1 } return 0 }
called by 1: ng_retrieve
75func ng_retrieve(texts: **u8, lens: *i64, h: i64, blocklist: i64, hits: *i64) -> i64
called by 1: main calls 2: ng_on_blocked_hostnx_bm25_tf
89func main() -> i64