code wiki / _hdl_build / nx_apistack_canary.nx
nx_apistack_canary.nx
buildroot/runtime/_hdl_build/nx_apistack_canary.nx
about
nx_apistack_canary.nx -- CAP-API-CANARY: canary / blue-green traffic splitting for /api deploys. Deterministic
per-key routing: a request key (shard id / session) hashes to a bucket 0..99; if bucket < pct it goes to the
canary, else stable. STICKY (same key -> same side) + reproducible (integer hash, no RNG) = the sovereign exceed
over probabilistic cloud canaries. pct=0 -> all stable (instant rollback); pct=100 -> full cutover. Pairs with the
self-safe deploy marker (nx_deploy_marker) for a per-shard atomic promote. license_tier: ORIGINAL
dependencies 1 imports · 1 importers
imports: nx_syscalls.nx
imported by: nx_apistack_canary_gate.nx
structs
| none |
consts
| 7 | const K_MAGIC_3750763034362895579: i64 = 3750763034362895579 |
| 8 | const K_MAGIC_1099511628211: i64 = 1099511628211 |
functions
| 11 | func cy_keyhash(s: *u8, n: i64) -> i64 called by 1: main |
| 17 | func cy_is_canary(pct: i64, key_hash: i64) -> i64 called by 1: main |