Repository navigation
Conversation
…TA-574) Unleash keeps a user in a percentage-rollout group by `userId`, falling back to a `sessionId` that changes every launch, so a logged-out install would get a new cohort each time it opened. The main process now sends `properties[experimentCohortHash]` on every flag fetch: a salted SHA-256 of the install's instance ID, which can't be matched to the raw ID. A rollout can then use it for stickiness. Needs Trust & Safety sign-off before release: it's a stable per-install ID, sent regardless of analytics consent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of STA-574. Independent of #24969 and the login analytics PR, but needed before
vortex-sta-574-login-promptis switched on in production.Important
Needs Trust & Safety sign-off before release.
Why
Unleash keeps a user in a percentage-rollout group by
userIdand, without one, falls back tosessionId, which changes every launch. So a logged-out install, exactly who the STA-574 modal is for, would land in a new cohort each time Vortex opened.What
The main process now sends
properties[experimentCohortHash]on every flag fetch, including the first. It's a salted SHA-256 of the install's instance ID, so it can't be matched to the raw instance ID in telemetry or deployment manifests. It's kept when the renderer updates the logged-in user's context.What needs sign-off: it's still a stable pseudonymous identifier for the install, sent on every flag fetch regardless of analytics consent.
Unleash setup
experimentCohortHashas a context field.vortex-sta-574-login-promptas a gradual rollout (for example 50%) that groups users byexperimentCohortHash.Removing it
Delete
unleash/experimentCohort.ts, its call inApplication.ts, and the setter and property inunleash/client.ts. Rollouts then fall back to Unleash's default stickiness.Testing
Unit tests cover:
Typecheck and lint pass. E2E was not run. Not tested live, because the outgoing flag request isn't visible from the app.
🤖 Generated with Claude Code