code wiki / _hdl_build / nx_cms_abtest.nx
nx_cms_abtest.nx
buildroot/runtime/_hdl_build/nx_cms_abtest.nx
about
nx_cms_abtest.nx -- CMS A/B TESTING + PERSONALIZATION (sovereign, deterministic, privacy-native).
The Nelio / Google-Optimize class, made Nishi-native: variant assignment is a DETERMINISTIC salted
hash computed ON-BOX -- the visitor is NEVER sent to a cloud experimentation service, and assignment
is REPRODUCIBLE (recompute which arm any visitor was in from (experiment, visitor) alone, storing no
PII = privacy-native + auditable experiments, the exceed angle over cloud A/B). Composes the canonical
nx_fnv (FNV-1a; cardinal law: never re-implement a hash inline). Supports even splits, weighted
rollouts (data-driven weights, rule 11), and a sticky/deterministic guarantee. license_tier: ORIGINAL
dependencies 2 imports · 3 importers
imports: nx_fnv.nxnx_syscalls.nx
imported by: nx_abtest_probe.nxnx_aw_devserver.nxnx_cms_abtest_gate.nx
structs
| none |
consts
| 11 | const NX_AB_RESOLUTION: i64 = 10000 // weight buckets / personalization resolution (basis points) |
functions
| 13 | func ab_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: ab_hash |
| 18 | func ab_hash(exp: *u8, visitor: *u8) -> i64 |
| 28 | func ab_assign(exp: *u8, visitor: *u8, num_variants: i64) -> i64 |
| 34 | func ab_position(exp: *u8, visitor: *u8) -> i64 |
| 41 | func ab_assign_weighted(exp: *u8, visitor: *u8, weights: *i64, nweights: i64) -> i64 |