Skip to content

SDK: client-side deterministic bucketing (assign locally from a signed config, no live round-trip) #24

Description

@jean9ross

Split from flame#17. That issue bundled two fixes: (1) parallelize the N+1 serial /assign loop — shipped — and (2) client-side deterministic bucketing. This tracks (2), the still-open half.

The gap

Even parallelized, the script-tag SDK still hard-depends on a live /assign round-trip to assign a visitor. A slow or failed API means the visitor can't be bucketed and sees control. The edge SDK (@cuped-io/flame-edge) already resolves server-side; this brings no-round-trip resolution to the script-tag path.

Scope

  • A config payload carrying per-experiment variant weights (+ salt/seed), delivered up front (e.g. alongside /experiments/active, or a standalone signed config blob).
  • Deterministic weighted bucketing client-side: stable hash of the user/device id → variant, matching the server's allocation so client and server agree on the assignment.
  • Signature / integrity so the config can't be tampered with client-side.
  • Fallback to the live /assign when no local config is present (backward compatible).

Origin: flame#17 (2026-07 platform audit, Phase 2 — SDK front door). The deeper half; parallelization shipped separately.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions