Add tests for group randomization with different layer member ID specs. [chromium/src : main]

0 views
Skip to first unread message

Caitlin Fischer (Gerrit)

unread,
Jan 9, 2026, 3:19:46 PMJan 9
to Alexei Svitkine, Roger McFarlane, Siaka Baro, Chromium LUCI CQ, chromium...@chromium.org, asvitki...@chromium.org, chromiumme...@microsoft.com
Attention needed from Alexei Svitkine

Caitlin Fischer voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Alexei Svitkine
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Id13bfe03a8995f82da27e536c7d7a823c1b562a9
Gerrit-Change-Number: 7422120
Gerrit-PatchSet: 2
Gerrit-Owner: Caitlin Fischer <caitlin...@google.com>
Gerrit-Reviewer: Alexei Svitkine <asvi...@chromium.org>
Gerrit-Reviewer: Caitlin Fischer <caitlin...@google.com>
Gerrit-CC: Roger McFarlane <rog...@chromium.org>
Gerrit-CC: Siaka Baro <siak...@google.com>
Gerrit-Attention: Alexei Svitkine <asvi...@chromium.org>
Gerrit-Comment-Date: Fri, 09 Jan 2026 20:19:41 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Alexei Svitkine (Gerrit)

unread,
Jan 9, 2026, 4:35:27 PMJan 9
to Caitlin Fischer, Roger McFarlane, Siaka Baro, Chromium LUCI CQ, chromium...@chromium.org, asvitki...@chromium.org, chromiumme...@microsoft.com
Attention needed from Caitlin Fischer

Alexei Svitkine added 1 comment

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Alexei Svitkine . resolved

You have some build errors.

Open in Gerrit

Related details

Attention is currently required from:
  • Caitlin Fischer
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Id13bfe03a8995f82da27e536c7d7a823c1b562a9
Gerrit-Change-Number: 7422120
Gerrit-PatchSet: 2
Gerrit-Owner: Caitlin Fischer <caitlin...@google.com>
Gerrit-Reviewer: Alexei Svitkine <asvi...@chromium.org>
Gerrit-Reviewer: Caitlin Fischer <caitlin...@google.com>
Gerrit-CC: Roger McFarlane <rog...@chromium.org>
Gerrit-CC: Siaka Baro <siak...@google.com>
Gerrit-Attention: Caitlin Fischer <caitlin...@google.com>
Gerrit-Comment-Date: Fri, 09 Jan 2026 21:35:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Caitlin Fischer (Gerrit)

unread,
Jan 9, 2026, 4:44:22 PMJan 9
to Alexei Svitkine, Roger McFarlane, Siaka Baro, Chromium LUCI CQ, chromium...@chromium.org, asvitki...@chromium.org, chromiumme...@microsoft.com

Caitlin Fischer voted and added 2 comments

Votes added by Caitlin Fischer

Commit-Queue+1

2 comments

Patchset-level comments
Alexei Svitkine . resolved

You have some build errors.

Caitlin Fischer

Indeed. I hadn't realized that base::StrCat() wasn't a drop-in replacement for absl::StrCat() :-(

File chrome/browser/metrics/variations/layer_constrained_study_randomization_browsertest.cc
Line 339, Patchset 3:// studies' LayerMemberReference.layer_member_ids field or when going from
Caitlin Fischer . unresolved

Note to self: Tweak the comment to make it clear that the client's slot's member needs to be unchanged.

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Id13bfe03a8995f82da27e536c7d7a823c1b562a9
    Gerrit-Change-Number: 7422120
    Gerrit-PatchSet: 4
    Gerrit-Owner: Caitlin Fischer <caitlin...@google.com>
    Gerrit-Reviewer: Alexei Svitkine <asvi...@chromium.org>
    Gerrit-Reviewer: Caitlin Fischer <caitlin...@google.com>
    Gerrit-CC: Roger McFarlane <rog...@chromium.org>
    Gerrit-CC: Siaka Baro <siak...@google.com>
    Gerrit-Comment-Date: Fri, 09 Jan 2026 21:44:16 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Alexei Svitkine <asvi...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Caitlin Fischer (Gerrit)

    unread,
    Jan 13, 2026, 2:45:59 PMJan 13
    to Alexei Svitkine, Roger McFarlane, Siaka Baro, Chromium LUCI CQ, chromium...@chromium.org, asvitki...@chromium.org, chromiumme...@microsoft.com
    Attention needed from Alexei Svitkine

    Caitlin Fischer added 1 comment

    File chrome/browser/metrics/variations/layer_constrained_study_randomization_browsertest.cc
    Line 339, Patchset 3:// studies' LayerMemberReference.layer_member_ids field or when going from
    Caitlin Fischer . resolved

    Note to self: Tweak the comment to make it clear that the client's slot's member needs to be unchanged.

    Caitlin Fischer

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alexei Svitkine
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Id13bfe03a8995f82da27e536c7d7a823c1b562a9
      Gerrit-Change-Number: 7422120
      Gerrit-PatchSet: 6
      Gerrit-Owner: Caitlin Fischer <caitlin...@google.com>
      Gerrit-Reviewer: Alexei Svitkine <asvi...@chromium.org>
      Gerrit-Reviewer: Caitlin Fischer <caitlin...@google.com>
      Gerrit-CC: Roger McFarlane <rog...@chromium.org>
      Gerrit-CC: Siaka Baro <siak...@google.com>
      Gerrit-Attention: Alexei Svitkine <asvi...@chromium.org>
      Gerrit-Comment-Date: Tue, 13 Jan 2026 19:45:52 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Caitlin Fischer <caitlin...@google.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Caitlin Fischer (Gerrit)

      unread,
      Jan 13, 2026, 2:46:05 PMJan 13
      to Alexei Svitkine, Roger McFarlane, Siaka Baro, Chromium LUCI CQ, chromium...@chromium.org, asvitki...@chromium.org, chromiumme...@microsoft.com
      Attention needed from Alexei Svitkine

      Caitlin Fischer voted Auto-Submit+1

      Auto-Submit+1
      Gerrit-Comment-Date: Tue, 13 Jan 2026 19:45:58 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Alexei Svitkine (Gerrit)

      unread,
      Jan 13, 2026, 2:56:53 PMJan 13
      to Caitlin Fischer, Roger McFarlane, Siaka Baro, Chromium LUCI CQ, chromium...@chromium.org, asvitki...@chromium.org, chromiumme...@microsoft.com
      Attention needed from Caitlin Fischer

      Alexei Svitkine added 4 comments

      File chrome/browser/metrics/variations/layer_constrained_study_randomization_browsertest.cc
      Line 224, Patchset 6 (Latest): user_data_dir.AppendASCII("VariationsSeedV2");
      Alexei Svitkine . unresolved

      I see this is being done in other tests too, but it's pretty fragile.

      WDYT about making a helper function to components/variations/variations_test_utils.h to write to the seed file?
      In fact, then you can pass in StoredSeedInfo and let the compress/serialize be done internally.

      Or better yet, pass in the seed itself, and have the helper write to both the local state and to the file.

      Line 337, Patchset 6 (Latest):// Verify that study-group randomization remains the same for a given client
      Alexei Svitkine . unresolved

      I find this setup is still a bit hard to follow.

      If I understand correctly, I think you have some number of test cases above that have the same expected fields. So perhaps it could be helpful to group them together with comments?

      Line 339, Patchset 6 (Latest):// order and weight, etc.) when (A) updating
      Alexei Svitkine . unresolved

      Nit: For readability, add a : after when and wrap before (A) and before (B).

      File components/variations/service/limited_entropy_randomization.h
      Line 87, Patchset 6 (Latest):// Determines the value returned by GetGoogleWebEntropyLimitInBits() in tests.
      Alexei Svitkine . unresolved

      Nit: I find "Determines" wording weird given it's not doing some logic to figure it out, but instead is just a setter.

      Also, right now you have no way to unset this. Since you're just using it from browsertests, that's OK since it doesn't persist to other tests.

      But then, please add a comment here saying that currently this doesn't get unset and thus it's only safe to use from browsertests. If this is to be used in unit tests, a way to clear it should be added.
      (Or just add the way to clear it.)

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Caitlin Fischer
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Id13bfe03a8995f82da27e536c7d7a823c1b562a9
        Gerrit-Change-Number: 7422120
        Gerrit-PatchSet: 6
        Gerrit-Owner: Caitlin Fischer <caitlin...@google.com>
        Gerrit-Reviewer: Alexei Svitkine <asvi...@chromium.org>
        Gerrit-Reviewer: Caitlin Fischer <caitlin...@google.com>
        Gerrit-CC: Roger McFarlane <rog...@chromium.org>
        Gerrit-CC: Siaka Baro <siak...@google.com>
        Gerrit-Attention: Caitlin Fischer <caitlin...@google.com>
        Gerrit-Comment-Date: Tue, 13 Jan 2026 19:56:46 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages