code wiki / _hdl_build / nx_cms_abtest.nx

nx_cms_abtest.nx

buildroot/runtime/_hdl_build/nx_cms_abtest.nx

2694 B51 linesdepth 3pulls 3 transitivereach 3 importersview sourcekind librarytopic cms
docsdependenciesstructsconstsfunctions

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

nx_fnv.nx nx_syscalls.nx nx_cms_abtest.nx nx_abtest_probe.nx nx_aw_devserver.nx nx_cms_abtest_gate.nx

imports: nx_fnv.nxnx_syscalls.nx

imported by: nx_abtest_probe.nxnx_aw_devserver.nxnx_cms_abtest_gate.nx

structs

none

consts

11const NX_AB_RESOLUTION: i64 = 10000 // weight buckets / personalization resolution (basis points)

functions

13func 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
18func ab_hash(exp: *u8, visitor: *u8) -> i64
28func ab_assign(exp: *u8, visitor: *u8, num_variants: i64) -> i64
called by 2: probemain calls 1: ab_hash
34func ab_position(exp: *u8, visitor: *u8) -> i64
called by 2: ab_assign_weightedmain calls 1: ab_hash
41func ab_assign_weighted(exp: *u8, visitor: *u8, weights: *i64, nweights: i64) -> i64
called by 1: main calls 1: ab_position