code wiki / _hdl_build / nx_adnet_invoice_gate.nx

nx_adnet_invoice_gate.nx

buildroot/runtime/_hdl_build/nx_adnet_invoice_gate.nx

8336 B131 linesdepth 5pulls 7 transitivereach 0 importersview sourcekind gate/prooftopic adnet
docsdependenciesstructsconstsfunctions

about

nx_adnet_invoice_gate.nx -- GATE for the billing pipeline (nx_adnet_invoice). Independent re-derivation over fixture journals, not a call into the code under test to describe itself. The teeth that matter are the REFUSALS -- a biller is dangerous in the direction of over-charging: * an ad with NO rate row must emit an explicit REFUSED line, never a zero-priced or omitted one * an ad measured but never viewable must bill 0, not its served count * a rate card with a malformed number must REFUSE, not parse-to-zero * SPEND (the number a budget ceiling consumes) must be UNMEASURABLE rather than 0 when unpriced -- assuming zero spend is exactly how an exhausted campaign keeps serving expect_exit: 0 license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_adnet_invoice.nx nx_gate_verdict.nx nx_adnet_invoice_gate.nx

imports: nx_syscalls.nxnx_adnet_invoice.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 ti_puts sys_write ti_slen sys_mmap ti_slen ↻ ti_check ti_puts ↻ ainv_rate sys_mmap ↻ ad_eol aslot_field_b ad_tab ainv_num ainv_line_for aslot_id_ok ainv_rate ↻ ad_event_count ad_slen ad_eol ↻ anb_invoice_line_v anb_capped anb_total_milli anb_deliv_permille ad_cat anb_catd sys_mmap ↻ ti_has ti_slen ↻ ainv_report sys_mmap ↻ ad_eol ↻ aslot_field_b ↻ aslot_id_ok ↻ ainv_line_for ↻ ainv_spent_milli aslot_id_ok ↻ ainv_rate ↻ ad_event_count ↻ anb_total_milli ↻

structs

none

consts

none

functions

14func ti_slen(s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { i = i + 1 } return i }
called by 3: ti_putsti_hasmain
15func ti_puts(s: *u8) -> i64 { sys_write(1, s, ti_slen(s)); return 0 }
called by 2: ti_checkmain calls 2: sys_writeti_slen
16func ti_pn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
28func ti_has(buf: *u8, n: i64, pat: *u8) -> i64
called by 1: main calls 1: ti_slen
42func ti_check(name: *u8, cond: i64) -> i64
called by 1: main calls 1: ti_puts
48func main() -> i64