code wiki / (root) / nx_research_engine_gate.nx

nx_research_engine_gate.nx

buildroot/runtime/nx_research_engine_gate.nx

3628 B60 linesdepth 24pulls 156 transitivereach 0 importersview sourcekind gate/prooftopic research
docsdependenciesstructsconstsfunctions

about

nx_research_engine_gate.nx -- s-class gate for the shared research engine (nx_research_engine). Proves the EXTRACT (rf_strip) and the GZIP-guard (rf_is_gzip) DETERMINISTICALLY, no network -- the functionality the engine guarantees, measured + repeatable. This is the functionality the old copy-pasted fetchers carried, now CENTRALIZED into one DRY engine and tested ONCE (rule 15). No functionality reduced; gzip-guard + extract proven. (helpers carry a ge_ prefix -- the engine pulls in the TLS stack, so generic names like streq/slen/chk collide.) criteria: 1 rf_strip drops tags, keeps text: "<p>hi <b>there</b></p>" -> "hi there " 2 rf_strip SUPPRESSES <script> body: "<script>var x=1;</script>OK" -> "OK" 3 rf_strip collapses whitespace: "a b" -> "a b" 4 rf_strip handles <style> + blocks: "<div>A</div><style>x{}</style><p>B</p>" -> "A B " 5 rf_is_gzip: 0x1f 0x8b body detected (would skip), plain text NOT (would bank) expect_exit: 0 license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_research_engine.nx nx_gate_verdict.nx nx_research_engine_gate.nx

imports: nx_research_engine.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

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

main rf_puts sys_write ge_tstrip rf_strip rf_tag_eq ge_slen ge_streq ge_chk rf_puts ↻ rf_is_gzip rf_putn nxi_out nxi_fd sys_mmap ccz_cat_num sys_write ↻ sys_munmap gv_ctr sys_mmap ↻ gv_verdict gv_puts sys_write ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap ↻ gv_journal sys_openat_append sys_mmap ↻ gv_catn sys_mmap ↻ sys_munmap ↻ sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real gv_cat sys_write ↻ sys_close sys_munmap ↻

structs

none

consts

none

functions

16func ge_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: ge_tstrip
17func ge_streq(a: *u8, an: i64, b: *u8) -> i64
called by 1: ge_tstrip
23func ge_chk(name: *u8, ok: i64) -> i64
called by 1: main calls 1: rf_puts
27func ge_tstrip(h: *u8, expect: *u8) -> i64
called by 1: main calls 3: rf_stripge_slenge_streq
33func main() -> i64