feat(netflow-db): store packet- and byte-weighted MAAD measures

Scope accumulation keeps summed packets and bytes per unique address
instead of a bare address set. Rollups merge children by summing, so
per-address totals stay additive. Counters are stored unaligned, so each
entry grows by exactly 16 bytes.

Every MAAD computation now runs three measures for IPv4 and IPv6 at every
granularity: addresses (structure, spectrum, dimensions, unchanged),
packets and bytes (structure and dimensions only). A weighted measure
excludes addresses whose counter sums to 0, records the count as
zeroWeightAddrs in the row metadata and logs it.

address_structure_stats gains a measure key column with a CHECK that
limits spectrum rows to addresses. The table, product schema, pipeline
contract, result config and MAAD contract versions bump, and the measure
set joins the product identity, so a fresh product database is required.
Compare, export, verify and the web-verify queries key on or filter by
measure, and verify --require-maad-data checks that every measure is
present.
b987c2d57cflamboh committed on 9/26/2026, 11:17:42 PMparentb7aff01
15 files changedLine totals unavailable