code wiki / _hdl_build / nx_adnet_campaign_gate.nx
nx_adnet_campaign_gate.nx
buildroot/runtime/_hdl_build/nx_adnet_campaign_gate.nx
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
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
structs
| none |
consts
| none |
functions
| 16 | func tg_slen(s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { i = i + 1 } return i } |
| 17 | func tg_puts(s: *u8) -> i64 { sys_write(1, s, tg_slen(s)); return 0 } |
| 18 | func tg_pn(v: i64) -> i64 |
| 30 | func tg_check(name: *u8, cond: i64) -> i64 |
| 35 | func tg_eq(a: *u8, b: *u8) -> i64 |
| 42 | func main() -> i64 |