code wiki / _hdl_build / nx_adnet_campaign_gate.nx

nx_adnet_campaign_gate.nx

buildroot/runtime/_hdl_build/nx_adnet_campaign_gate.nx

8591 B117 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic adnet
docsdependenciesstructsconstsfunctions

about

nx_adnet_campaign_gate.nx -- GATE for the serve decision (nx_adnet_campaign). A biller is dangerous toward over-charging; a SERVE gate is dangerous toward giving inventory away and toward spending a client's budget they did not authorise. So the load-bearing teeth are the REFUSALS, and each is chosen so its pass and fail values differ observably: * BUDGET STOPS DELIVERY -- spent >= budget must return EXHAUSTED, not merely clamp a bill. This is the measured gap that motivated the lib: anb_capped clamps the invoice while serving continues forever. * UNMEASURABLE SPEND REFUSES -- spent < 0 must NOT be treated as zero. Assuming zero is exactly how an exhausted campaign keeps serving. * A TYPO IS NOT A SYNONYM FOR LIVE -- an unrecognised status must be MALFORMED, never default-on. * MALFORMED NEVER SERVES -- a row we cannot evaluate is when we are least entitled to spend money. expect_exit: 0 license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_adnet_campaign.nx nx_gate_verdict.nx nx_adnet_campaign_gate.nx

imports: nx_syscalls.nxnx_adnet_campaign.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 tg_puts sys_write tg_slen tg_slen ↻ tg_check tg_puts ↻ camp_verdict sys_mmap aslot_field_b ad_tab aslot_id_ok aslot_img_ok aslot_url_chars_ok camp_num

structs

none

consts

none

functions

16func tg_slen(s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { i = i + 1 } return i }
called by 2: tg_putsmain
17func tg_puts(s: *u8) -> i64 { sys_write(1, s, tg_slen(s)); return 0 }
called by 2: tg_checkmain calls 2: sys_writetg_slen
18func tg_pn(v: i64) -> i64
30func tg_check(name: *u8, cond: i64) -> i64
called by 1: main calls 1: tg_puts
35func tg_eq(a: *u8, b: *u8) -> i64
42func main() -> i64