code wiki / _hdl_build / nx_connect_ads.nx

nx_connect_ads.nx

buildroot/runtime/_hdl_build/nx_connect_ads.nx

6044 B111 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind tooltopic connect
docsdependenciesstructsconstsfunctions

about

nx_connect_ads.nx -- CONNECT "brought to you by" ad rail (the FR census cell), COMPOSING the proven honest-ad engine (imports nx_ad_serve_policy: once-per-visit politeness + coarse-geo token-boundary targeting; its ONLY signals are a transient shown-flag and coarse geo -- no behavioral profile input EXISTS in the serve path, so faith/behavioral targeting is structurally impossible, not policy). CONNECT adds its own walls IN FRONT of the policy: - MINOR WALL: a minor (or unknown age band -- fail-closed) sees ZERO ads, ever (COPPA + the free-forever dignity law). Checked BEFORE any policy logic. - Art.9: there is no faith parameter anywhere in the chain; the NEG-CONTROL incumbent model (behavioral targeter keyed on a profile that includes faith) targets by faith -- the SAME checker proves ours cannot express that computation. - BUSINESS PAYS, never a user: the one paid slot is is_connection=0 (nx_connect_lds_free idiom). 100% sovereign. license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_ad_serve_policy.nx nx_connect_ads.nx

imports: nx_syscalls.nxnx_ad_serve_policy.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap sw sys_write ca_should_serve sp_should_serve sp_geo_match as_len tcheck sw ↻ ca_behavioral_serve count_paid_connection sn sys_mmap ↻ sys_write ↻ sys_exit

structs

none

consts

none

functions

16func sw(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 2: tcheckmain calls 1: sys_write
17func sn(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)} let t: *u8=sys_mmap(28); 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} var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1} sys_write(1,bb,k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
18func tcheck(pass: i64, label: *u8, fails: *i64) -> i64
called by 1: main calls 1: sw
26func ca_should_serve(is_minor: i64, already_shown: i64, geo: *u8, targets: *u8) -> i64
called by 1: main calls 1: sp_should_serve
32func ca_behavioral_serve(profile_faith: i64, campaign_faith_key: i64) -> i64
called by 1: main
36func count_paid_connection(prices: *i64, isconn: *i64, n: i64) -> i64
called by 1: main
42func main() -> i64