code wiki / _hdl_build / nx_adnet_creative_gate.nx

nx_adnet_creative_gate.nx

buildroot/runtime/_hdl_build/nx_adnet_creative_gate.nx

5758 B110 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic adnet
docsdependenciesstructsconstsfunctions

about

nx_adnet_creative_gate.nx -- GATE for advertiser creative intake (nx_adnet_creative). Fixtures are synthesised IN this gate rather than read from disk, so it is an independent re-derivation: the gate builds a PNG header itself and asserts what the lib concludes about it. The load-bearing teeth are the two that protect a paying client and the host page: * CONTENT-ADDRESSING IS DETERMINISTIC AND SENSITIVE -- same bytes -> same url (idempotent re-upload), one byte different -> different url (replacing artwork mints a new url, so the creative can be served cacheable without ever going stale). * THE WEIGHT CEILING ACTUALLY REFUSES -- the four live house banners are 196,733 bytes each; if this tooth ever passes an oversize creative the platform silently re-admits that class. expect_exit: 0 license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_adnet_creative.nx nx_gate_verdict.nx nx_adnet_creative_gate.nx

imports: nx_syscalls.nxnx_adnet_creative.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 tc_puts sys_write tc_slen sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ tc_mkpng tc_check tc_puts ↻ acr_validate acr_is_png acr_width acr_is_png ↻ acr_be32 acr_height acr_is_png ↻ acr_be32 ↻ acr_width ↻ acr_height ↻ acr_url sys_mmap ↻ acr_name acr_validate ↻ acr_digest tc_eq acr_reason tc_pn

structs

none

consts

none

functions

15func tc_slen(s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { i = i + 1 } return i }
called by 1: tc_puts
16func tc_puts(s: *u8) -> i64 { sys_write(1, s, tc_slen(s)); return 0 }
called by 2: tc_checkmain calls 2: sys_writetc_slen
17func tc_pn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
29func tc_eq(a: *u8, b: *u8) -> i64
called by 1: main
35func tc_check(name: *u8, cond: i64) -> i64
called by 1: main calls 1: tc_puts
42func tc_mkpng(b: *u8, n: i64, w: i64, h: i64) -> i64
called by 1: main
55func main() -> i64