code wiki / _hdl_build / nx_ad_nb_fold_gate.nx

nx_ad_nb_fold_gate.nx

buildroot/runtime/_hdl_build/nx_ad_nb_fold_gate.nx

6018 B76 linesdepth 5pulls 7 transitivereach 0 importersview sourcekind gate/prooftopic ad
docsdependenciesstructsconstsfunctions

about

nx_ad_nb_fold_gate.nx -- GATE: the AD domain FOLDED onto the universal builder catalog. Seed the SAME ad emitters into (a) the ad-only registry (er_register) and (b) the universal Nishi-builder catalog (nb_register, domain="ad"), render a banner from EACH, and assert they are BYTE-IDENTICAL -- so the one universal catalog (nb_*) is a faithful SSOT for the ad domain, exactly as it already is for web + game. Plus a NEGATIVE CONTROL (unknown ids fall back to defaults, no crash) and SOVEREIGNTY (0 third-party JS in both banners; the detector still fires on a planted tag). Additive: the live er_* path is untouched. license_tier: ORIGINAL

dependencies 5 imports · 0 importers

nx_ad_emitter_apply.nx nx_ad_emitter_registry.nx nx_nishi_builder.nx nx_ad_serve.nx nx_syscalls.nx nx_ad_nb_fold_gate.nx

imports: nx_ad_emitter_apply.nxnx_ad_emitter_registry.nxnx_nishi_builder.nxnx_ad_serve.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main g_p sys_write sys_openat_wr sys_close er_register er_present sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close ↻ er_field er_streq sys_mmap ↻ sys_openat_append sys_write ↻ sys_close ↻ nb_register nb_present sys_mmap ↻ sys_read_file ↻ nb_field nb_streq sys_mmap ↻ sys_openat_append ↻ sys_write ↻ sys_close ↻ sys_mmap ↻ ab_emit_from_registry sys_mmap ↻ er_lookup sys_mmap ↻ sys_read_file ↻ er_field ↻ er_streq ↻ ap_wh ap_split4

structs

none

consts

13const FR_PATH: *u8 = "/tmp/nishi_ad_fold_registry.tsv"
14const FN_PATH: *u8 = "/tmp/nishi_ad_fold_nb.tsv"

functions

16func g_p(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 calls 1: sys_write
17func g_i(v: i64) -> i64 { let t: *u8 = sys_mmap(24); var m: i64 = v; var k: i64 = 0; if m == 0 { t[0]=48 as u8; k=1 } while m>0 { t[k]=(48+(m%10)) as u8; m=m/10; k=k+1 } let o: *u8=sys_mmap(24); var w: i64=0; var q: i64=k-1; while q>=0 { o[w]=t[q]; w=w+1; q=q-1 } sys_write(1,o,w); return 0 }
called by 1: main calls 2: sys_mmapsys_write
18func gb_eq(a: *u8, na: i64, b: *u8, nb: i64) -> i64 { if na != nb { return 0 } var i: i64 = 0; while i < na { if a[i] != b[i] { return 0 } i = i + 1 } return 1 }
called by 1: main
20func main(argc: i64, argv: *i64) -> i64