code wiki / _hdl_build / nx_ad_conversion_gate.nx
nx_ad_conversion_gate.nx
buildroot/runtime/_hdl_build/nx_ad_conversion_gate.nx
about
nx_ad_conversion_gate.nx -- GATE (runnable) for ADS-018 privacy-preserving conversion measure.
The DELIVERABLE organ: loads the SAME rules + k-anon floor used in production FROM THE SOVEREIGN
STORE (adcfg:botrules, adcfg:kanon_k -- pure Nishi, no TSV) and proves the full pipeline
(consent-gate -> bot-filter -> aggregate -> k-anon) on baked adversarial controls, parametrized
by the configured K. Cannot false-green: each neg control must drop its events, and a small
campaign must suppress.
happy : consented human conversions summing to >= K -> released count == the exact sum
consent: an UNCONSENTED bucket -> contributes 0 (consent-gated)
bot : a CONSENTED but bot-class bucket -> contributes 0 (invalid-traffic)
k-anon : a consented human campaign with < K total -> SUPPRESSED ("<k", release == -1)
Evidence -> knowledge/status/ad_conversion.log (CONVERSIONGATE authored=organ ... verdict=GREEN).
license_tier: ORIGINAL
dependencies 5 imports · 0 importers
imports: nx_ad_conversion.nxnx_ad_store.nxnx_ad_botfilter.nxnx_kanon.nxnx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 21 | const CG_LOG: *u8 = "knowledge/status/ad_conversion.log" |
functions
| 23 | func cg_w(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 } |
| 24 | func cg_wn(fd: i64, v: i64) -> i64 { let bb: *u8 = sys_mmap(28); var m: i64=v; if m<0 {m=0-m; sys_write(fd,"-" as *u8,1)}; let t: *u8 = sys_mmap(28); var k: i64=0; if m==0 {t[0]=48;k=1}; while m>0 {t[k]=(48+(m%10)) as u8; m=m/10; k=k+1}; var i: i64=0; while i<k {bb[i]=t[k-1-i]; i=i+1}; sys_write(fd, bb, k); return 0 } |
| 26 | func cg_emit(fd: i64, k: i64, rawh: i64, relh: i64, relk: i64, ok: i64) -> i64 |
| 36 | func cg_set(ev: *i64, b: i64, consent: i64, ctype: i64, ua: i64, src: i64, js: i64, n: i64) -> i64 called by 1: main |
| 46 | func main() -> i64 |