Skip to content

Users under control group are significantly more than users under enabled group #6400

@karrtikr

Description

@karrtikr

Almost all users seem to fall under control group with current experimental setup.

[
    {
        "name": "AlwaysDisplayTestExplorer - experiment",
        "salt": "AlwaysDisplayTestExplorer",
        "min": 80,
        "max": 100
    },
    {
        "name": "AlwaysDisplayTestExplorer - control",
        "salt": "AlwaysDisplayTestExplorer",
        "min": 0,
        "max": 20
    }
]

Logic for checking if you are in an experiment: In Experiment(foo) =HASH>=min and < max.

Probable Bug : We expect to get HASH from CryptoUtils, which apparently is always returning 0 as hash value, so users always fall under AlwaysDisplayTestExplorer - control group.

export class CryptoUtils implements ICryptoUtils {
    public createHash<E extends keyof IHashFormat>(data: string, encoding: HexBase64Latin1Encoding, hashFormat: E): IHashFormat[E] {
        const hash = createHash('sha512').update(data).digest(encoding);
        return hashFormat === 'number' ? parseInt(hash, undefined) : hash as any;
    }
}

In the code, parseInt is being used incorrectly. Pass a second parameter, 16 to it instead of passing undefined, so it correctly parses hex encoded string to int.

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bugimportantIssue identified as high-priority

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions