code wiki / _hdl_build / nx_adnet_advreport.nx
nx_adnet_advreport.nx
buildroot/runtime/_hdl_build/nx_adnet_advreport.nx
about
nx_adnet_advreport.nx -- RUNNER: the per-advertiser delivery report, made REACHABLE.
THE GAP: `ainv_report_for_advertiser` is gated (tenant isolation proven: own campaigns included, a
rival's EXCLUDED, unknown advertiser gets an EMPTY report rather than everyone's) but nothing could
CALL it. The public /advertise page promises "you see the delivery ratio -- served and viewable side
by side", and a claim on a public page with no surface behind it is a promise you will be asked to
honour. A gated function with no caller is, by this ecosystem's own law, still the baseline.
Shipped as a REGISTERED ORGAN, not a mgmt route, for two reasons:
1. every new route widens the control plane, and this needs no authority beyond reading four files;
2. the mgmt API currently cannot be modified at all -- /api/srcwrite truncates source at the ampersand character and
nx_mgmt_api.nx has 25 of them, so the route path is physically blocked until that is fixed.
Choosing the reachable door is not a workaround; it is the door that exists.
★ AUTH IS THE CALLER'S JOB, STILL. This takes an advertiser_bk on argv and does NOT authenticate it.
organ_run is operator-gated, so today that IS the boundary. Do NOT expose this to an advertiser
without establishing identity first -- baking a token check in here is how the check gets skipped by
the second caller.
nx_adnet_advreport <advertiser_bk> (live confs)
nx_adnet_advreport <advertiser_bk> <camps> <rates> <served> <view> <clicks> (fixtures; read-only)
expect_exit: 0 license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_adnet_invoice.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
| 25 | const ADR_CAMPS: *u8 = "/volume1/homes/elderwesto/nishihost/knowledge/status/adnet_campaigns.conf" as *u8 |
| 26 | const ADR_RATES: *u8 = "/volume1/homes/elderwesto/nishihost/knowledge/status/adnet_rates.conf" as *u8 |
| 27 | const ADR_SERVED: *u8 = "/volume1/homes/elderwesto/nishihost/adnet_impressions.log" as *u8 |
| 28 | const ADR_CLICKS: *u8 = "/volume1/homes/elderwesto/nishihost/adnet_clicks.log" as *u8 |
| 29 | const ADR_VIEW: *u8 = "/volume1/homes/elderwesto/nishihost/knowledge/status/adnet_viewable.log" as *u8 |
| 30 | const ADR_CAP: i64 = 262144 |
functions
| 32 | func adr_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 34 | func adr_run(adv: *u8, pc: *u8, pr: *u8, ps: *u8, pv: *u8, pk: *u8) -> i64 {
called by 1: main calls 6: aslot_id_okadr_putssys_mmapsys_read_fileainv_report_for_advertisersys_write |
| 73 | func main(argc: i64, argv: *i64) -> i64 { |