code wiki / _hdl_build / nx_ad_feedback_gate.nx
nx_ad_feedback_gate.nx
buildroot/runtime/_hdl_build/nx_ad_feedback_gate.nx
about
nx_ad_feedback_gate.nx -- GATE (runnable) for ADS-013 GREAT/OK/BAD feedback. Proves on baked
controls + the REAL sovereign store:
poll : the one-tap widget is clean (GREAT/OK/BAD + campaign present, thirdparty_js=0)
escape : a malicious campaign id is HTML-escaped (no live tag) -- XSS-safe
tally : aggregate sentiment counts are exact (no identity, only class-bucket counts)
k-anon : a campaign below the floor is SUPPRESSED (a few taps can't single out the few)
ANTI-SNOOP (load-bearing): the rollup is persisted to knowledge/store/ad- and the ON-DISK bytes
are scanned for visitor session tokens -> ZERO found (leaked=0). The persisted record
is built only from counts, so it cannot carry an identifier; the gate proves it on
the real stored bytes, and a tampered record makes the scanner FIRE (anti-false-green).
Evidence -> knowledge/status/ad_feedback.log (FEEDBACKGATE authored=organ ... verdict=GREEN).
license_tier: ORIGINAL
dependencies 7 imports · 0 importers
imports: nx_ad_feedback.nxnx_ad_store.nxnx_seg_store.nxnx_ad_serve.nxnx_kanon.nxnx_syscalls.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
structs
| none |
consts
| 22 | const FG_LOG: *u8 = "knowledge/status/ad_feedback.log" |
| 23 | const FG_KEY: *u8 = "adfeedback:demo-coffee" |
functions
| 25 | func fg_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 } |
| 26 | func fg_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 } |
| 29 | func fg_streq_store(key: *u8, rec: *u8, reclen: i64) -> i64 |
| 40 | func fg_emit(fd: i64, poll3p: i64, esc3p: i64, g: i64, o: i64, b: i64, rel_big: i64, rel_small: i64, persisted: i64, leaked: i64, fired: i64, ok: i64) -> i64 |
| 55 | func main() -> i64 |