CL 8899432: [actor] Add dynamic observation mode to ActorKeyedServiceProtoWrapper [chromium/src : main]

0 views
Skip to first unread message

Sergio Vasquez (Gerrit)

unread,
Dec 4, 2026, 3:49:18 PM (2 days ago) Dec 4
to Chase Hartsell, Min Qin, Wenyu Fu, Chromium LUCI CQ, chromium...@chromium.org, mfoltz+wa...@chromium.org
Attention needed from Chase Hartsell, Min Qin and Wenyu Fu

Sergio Vasquez added 7 comments on change 8899432

Message

Addressed all 7 comments and synced the CL description; PTAL for re-LGTM (code changes reset Code-Review+1).

7 comments

Commit Message
Line 9, Patchset 8:Adds a `ShouldSkipAsyncObservationCallback` overload to
Chase Hartsell . resolved

The description still names ShouldSkipAsyncObservationCallback, which went away when this became PostActionObservationMode. Could you update it and mention kSkipAll and what it leaves out of the result?

Sergio Vasquez

Done — updated the CL description to name PostActionObservationMode / PostActionObservationModeCallback and document what kSkipAll omits and preserves.

File chrome/browser/actor/actor_keyed_service_proto_wrapper.h
Line 75, Patchset 8: PostActionObservationModeCallback post_action_observation_mode);
Chase Hartsell . resolved

super nit: could the result callback stay last, with the mode callback before it? IMO makes more sense for the PerformActionsCallback to remain last. Also the param name reads like a value, maybe post_action_observation_mode_callback?

Sergio Vasquez

Done — moved post_action_observation_mode_callback before callback and updated the parameter name (and downstream call site in crrev.com/c/8893465).

Line 67, Patchset 8: // Same as above, and if `post_action_observation_mode` is non-null,
Chase Hartsell . resolved

Could the comment say when this runs? It's skipped for rejected, paused and task-gone batches, and since it runs synchronously right before observation starts, it shouldn't stop the task or destroy the wrapper (the controller CHECKs the task exists).

Sergio Vasquez

Done — updated the doc comment to document synchronous execution before observation, the skipped batch cases (rejected, paused, task-gone), and the precondition not to stop/destroy the task or wrapper.

File chrome/browser/actor/actor_keyed_service_proto_wrapper.cc
Line 217, Patchset 8: if (observation_mode == PostActionObservationMode::kSkipAll) {
Chase Hartsell . resolved

nit: could we log a journal entry here saying observation was skipped? Otherwise an OK result with no tabs or windows has nothing in the journal explaining why.

Sergio Vasquez

Done — added a SkipTabObservation journal log entry on the kSkipAll path.

Line 218, Patchset 8: std::move(callback).Run(BuildBaseActionsResult(start_time, action_results));
Chase Hartsell . resolved

Could we add a test for kSkipAll with a failing action, checking the result still has the error code and failed index? That seems like the main case for draining. A test that the callback isn't run when the batch ends paused would be good too.

Sergio Vasquez

Done — added PerformActionsObservationModeSkipAllPreservesFailingActionResult (verifying action_result and index_of_failed_action == 1) and PerformActionsObservationModeNotCalledWhenBatchEndsPaused.

File chrome/browser/actor/actor_keyed_service_proto_wrapper_unittest.cc
Line 367, Patchset 8: PerformActionsEvaluatesPostActionObservationModeAtCompletion) {
Chase Hartsell . resolved

This test covers four behaviors and the override cases are only really checked by the shared journal compare at the end, so a failure won't say which case broke. Could we split it into one test per behavior (override to collect all, override to skip async, callback runs after accept, skip all, unknown task)?

Sergio Vasquez

Done — split into 7 single-behavior tests (OverridesToCollectAll, OverridesToSkipAsync, EvaluatedAfterActionsAccepted, SkipAllBypassesTabObservation, SkipAllPreservesFailingActionResult, NotCalledWhenTaskUnknown, NotCalledWhenBatchEndsPaused).

Line 434, Patchset 8: EXPECT_TRUE(future.Get().tabs().empty());
Chase Hartsell . resolved

IIUC tabs and windows would be empty here even on the normal path, since the fixture has no browser windows and the action is a wait. Could the skip-all test assert that no TabObservationController journal entry was recorded instead?

Sergio Vasquez

Done — the kSkipAll tests now assert recorder.GetEntries("TabObservationController").empty() and !recorder.GetEntries("SkipTabObservation").empty().

Open in Gerrit

Related details

Attention is currently required from:
  • Chase Hartsell
  • Min Qin
  • Wenyu Fu
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: I0257cb16f9da1066400a935fe82d3f456a7b70a1
Gerrit-Change-Number: 8899432
Gerrit-PatchSet: 10
Gerrit-Owner: Sergio Vasquez <vse...@google.com>
Gerrit-Reviewer: Chase Hartsell <cha...@chromium.org>
Gerrit-Reviewer: Min Qin <qin...@chromium.org>
Gerrit-Reviewer: Sergio Vasquez <vse...@google.com>
Gerrit-Reviewer: Wenyu Fu <wen...@chromium.org>
Gerrit-Attention: Chase Hartsell <cha...@chromium.org>
Gerrit-Attention: Min Qin <qin...@chromium.org>
Gerrit-Attention: Wenyu Fu <wen...@chromium.org>
Gerrit-Comment-Date: Fri, 04 Dec 2026 20:49:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Chase Hartsell <cha...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Sergio Vasquez (Gerrit)

unread,
Dec 4, 2026, 3:49:24 PM (2 days ago) Dec 4
to Chase Hartsell, Min Qin, Wenyu Fu, Chromium LUCI CQ, chromium...@chromium.org, mfoltz+wa...@chromium.org
Attention needed from Chase Hartsell, Min Qin and Wenyu Fu

Sergio Vasquez voted Commit-Queue+1 on change 8899432

Commit-Queue+1
Gerrit-Comment-Date: Fri, 04 Dec 2026 20:49:15 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Sergio Vasquez (Gerrit)

unread,
Dec 4, 2026, 4:42:04 PM (2 days ago) Dec 4
to Chase Hartsell, Min Qin, Wenyu Fu, Chromium LUCI CQ, chromium...@chromium.org, mfoltz+wa...@chromium.org
Attention needed from Chase Hartsell, Min Qin and Wenyu Fu

Sergio Vasquez voted Commit-Queue+1 on change 8899432

Rebased onto main (zero code diff vs PS10); re-running CQ+1 after the ToT glic_invoke_browsertest.cc revert.

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Chase Hartsell
  • Min Qin
  • Wenyu Fu
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: I0257cb16f9da1066400a935fe82d3f456a7b70a1
Gerrit-Change-Number: 8899432
Gerrit-PatchSet: 11
Gerrit-Owner: Sergio Vasquez <vse...@google.com>
Gerrit-Reviewer: Chase Hartsell <cha...@chromium.org>
Gerrit-Reviewer: Min Qin <qin...@chromium.org>
Gerrit-Reviewer: Sergio Vasquez <vse...@google.com>
Gerrit-Reviewer: Wenyu Fu <wen...@chromium.org>
Gerrit-Attention: Chase Hartsell <cha...@chromium.org>
Gerrit-Attention: Min Qin <qin...@chromium.org>
Gerrit-Attention: Wenyu Fu <wen...@chromium.org>
Gerrit-Comment-Date: Fri, 04 Dec 2026 21:41:54 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Chase Hartsell (Gerrit)

unread,
Dec 4, 2026, 4:43:34 PM (2 days ago) Dec 4
to Sergio Vasquez, Min Qin, Wenyu Fu, Chromium LUCI CQ, chromium...@chromium.org, mfoltz+wa...@chromium.org
Attention needed from Min Qin, Sergio Vasquez and Wenyu Fu

Chase Hartsell voted Code-Review+1 on change 8899432

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Min Qin
  • Sergio Vasquez
  • Wenyu Fu
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement 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: I0257cb16f9da1066400a935fe82d3f456a7b70a1
    Gerrit-Change-Number: 8899432
    Gerrit-PatchSet: 11
    Gerrit-Owner: Sergio Vasquez <vse...@google.com>
    Gerrit-Reviewer: Chase Hartsell <cha...@chromium.org>
    Gerrit-Reviewer: Min Qin <qin...@chromium.org>
    Gerrit-Reviewer: Sergio Vasquez <vse...@google.com>
    Gerrit-Reviewer: Wenyu Fu <wen...@chromium.org>
    Gerrit-Attention: Sergio Vasquez <vse...@google.com>
    Gerrit-Attention: Min Qin <qin...@chromium.org>
    Gerrit-Attention: Wenyu Fu <wen...@chromium.org>
    Gerrit-Comment-Date: Fri, 04 Dec 2026 21:43:23 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Min Qin (Gerrit)

    unread,
    1:48 AM (13 hours ago) 1:48 AM
    to Sergio Vasquez, Chase Hartsell, Wenyu Fu, Chromium LUCI CQ, chromium...@chromium.org, mfoltz+wa...@chromium.org
    Attention needed from Sergio Vasquez and Wenyu Fu

    Min Qin voted Code-Review+1 on change 8899432

    Code-Review+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Sergio Vasquez
    • Wenyu Fu
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement 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: I0257cb16f9da1066400a935fe82d3f456a7b70a1
    Gerrit-Change-Number: 8899432
    Gerrit-PatchSet: 12
    Gerrit-Owner: Sergio Vasquez <vse...@google.com>
    Gerrit-Reviewer: Chase Hartsell <cha...@chromium.org>
    Gerrit-Reviewer: Min Qin <qin...@chromium.org>
    Gerrit-Reviewer: Sergio Vasquez <vse...@google.com>
    Gerrit-Reviewer: Wenyu Fu <wen...@chromium.org>
    Gerrit-Attention: Sergio Vasquez <vse...@google.com>
    Gerrit-Attention: Wenyu Fu <wen...@chromium.org>
    Gerrit-Comment-Date: Sun, 06 Dec 2026 06:48:31 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Sergio Vasquez (Gerrit)

    unread,
    11:57 AM (3 hours ago) 11:57 AM
    to Min Qin, Chase Hartsell, Wenyu Fu, Chromium LUCI CQ, chromium...@chromium.org, mfoltz+wa...@chromium.org
    Attention needed from Wenyu Fu

    Sergio Vasquez voted Commit-Queue+2 on change 8899432

    Commit-Queue+2
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Wenyu Fu
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement 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: I0257cb16f9da1066400a935fe82d3f456a7b70a1
    Gerrit-Change-Number: 8899432
    Gerrit-PatchSet: 12
    Gerrit-Owner: Sergio Vasquez <vse...@google.com>
    Gerrit-Reviewer: Chase Hartsell <cha...@chromium.org>
    Gerrit-Reviewer: Min Qin <qin...@chromium.org>
    Gerrit-Reviewer: Sergio Vasquez <vse...@google.com>
    Gerrit-Reviewer: Wenyu Fu <wen...@chromium.org>
    Gerrit-Attention: Wenyu Fu <wen...@chromium.org>
    Gerrit-Comment-Date: Sun, 06 Dec 2026 16:57:38 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Chromium LUCI CQ (Gerrit)

    unread,
    12:03 PM (2 hours ago) 12:03 PM
    to Sergio Vasquez, Min Qin, Chase Hartsell, Wenyu Fu, chromium...@chromium.org, mfoltz+wa...@chromium.org

    Chromium LUCI CQ submitted change 8899432

    Change information

    Commit message:
    [actor] Add dynamic observation mode to ActorKeyedServiceProtoWrapper

    Adds a `PostActionObservationModeCallback` overload to
    `ActorKeyedServiceProtoWrapper::PerformActions()` with a 3-state
    `PostActionObservationMode` (`kCollectAll`, `kSkipAsync`, `kSkipAll`) so
    callers can choose post-action observation collection behavior at
    action-batch completion time rather than batch start time.

    When the callback returns `kSkipAll`, `OnPerformActionsFinished()` logs
    a `SkipTabObservation` journal entry, bypasses `TabObservationController`
    completely (avoiding crashed-tab reloads, observation retries, and
    observation histograms), and returns an action-only `ActionsResult`.
    That result omits `tabs`, `windows`, and observation latency steps while
    preserving `action_result`, `index_of_failed_action`, `error_message`,
    `extra_information`, script/JS tool results, and action/stabilization
    latency steps. Existing overloads delegate with a null callback,
    preserving `actions.skip_async_observation_collection()`.
    Bug: 584863288, 557277384
    Change-Id: I0257cb16f9da1066400a935fe82d3f456a7b70a1
    Commit-Queue: Sergio Vasquez <vse...@google.com>
    Reviewed-by: Chase Hartsell <cha...@chromium.org>
    Reviewed-by: Min Qin <qin...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1763891}
    Files:
    • M chrome/browser/actor/actor_keyed_service_proto_wrapper.cc
    • M chrome/browser/actor/actor_keyed_service_proto_wrapper.h
    • M chrome/browser/actor/actor_keyed_service_proto_wrapper_unittest.cc
    Change size: L
    Delta: 3 files changed, 441 insertions(+), 160 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Min Qin, +1 by Chase Hartsell
    • requirement satisfiedReview-Enforcement: Code-Review+1 by Min Qin, Code-Review+1 by Chase Hartsell
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I0257cb16f9da1066400a935fe82d3f456a7b70a1
    Gerrit-Change-Number: 8899432
    Gerrit-PatchSet: 13
    Gerrit-Owner: Sergio Vasquez <vse...@google.com>
    Gerrit-Reviewer: Chase Hartsell <cha...@chromium.org>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Min Qin <qin...@chromium.org>
    Gerrit-Reviewer: Sergio Vasquez <vse...@google.com>
    Gerrit-Reviewer: Wenyu Fu <wen...@chromium.org>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages