Skip to content

Conversation

@madhuchavva
Copy link
Collaborator

@madhuchavva madhuchavva commented Jan 6, 2026

  1. Add Sticky Bucketing to ensure users persist in their assigned variations.
use std::sync::Arc;
use growthbook_rust::sticky_bucket::InMemoryStickyBucketService;

let sticky_service = Arc::new(InMemoryStickyBucketService::new());

let client = GrowthBookClientBuilder::new()
    .api_url(api_url)
    .client_key(sdk_key)
    .sticky_bucket_service(sticky_service)
    .build()
    .await?;
  1. Update test spec to 0.7.1 and skips savedGroups tests as it is unsupported in this version
All scenarios defined in `all_cases.json` for `stickyBucket` are verified:

- use fallbackAttribute when missing hashAttribute: (Fixed bug to ensure fallback is used during hashing if primary is missing).
- performs evaluation without sticky bucket: Standard bucketing when no sticky doc exists.
- evaluates based on stored sticky bucket: Respects persisted assignment.
- does not consume a sticky bucket not belonging to the user: Validates attribute matching.
- upgrades a sticky bucket doc...: Promotes sticky assignment to primary attribute.
- favors a sticky bucket doc based on hashAttribute...: Priority handling.
- resets sticky bucketing when the bucketVersion changes: Versioning support.
- stops test enrollment when... blocked: Version blocking logic.
- disables sticky bucketing when disabled by experiment: Flags support.

@madhuchavva madhuchavva merged commit 5869cc5 into main Jan 12, 2026
2 checks passed
@madhuchavva madhuchavva deleted the feat/sticky branch January 12, 2026 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants