mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-21 10:16:44 +00:00
Disable Chrome MCP telemetry watchdog by default (#85886)
Summary: - The PR adds the Chrome DevTools MCP `--no-usage-statistics` default launch arg, honors explicit profile usage-statistics `mcpArgs`, adds regression tests, and adds a changelog entry. - Reproducibility: yes. source-reproducible: current main builds Chrome MCP launch args without the upstream o ... etry is initialized. I did not run a fresh failing current-main process leak loop in this read-only review. Automerge notes: - PR branch already contained follow-up commit before automerge: Disable Chrome MCP telemetry watchdog by default Validation: - ClawSweeper review passed for head68249b1f58. - Required merge gates passed before the squash merge. Prepared head SHA:68249b1f58Review: https://github.com/openclaw/openclaw/pull/85886#issuecomment-4526997996 Co-authored-by: Rohit <rohitjavvadi2@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
This commit is contained in:
co-authored by
Rohit
clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
takhoffman
parent
12f82270cf
commit
d581415026
@@ -67,6 +67,7 @@ Docs: https://docs.openclaw.ai
|
||||
- WebChat: keep the run-complete indicator in progress until deferred history replay renders the assistant reply, so Done no longer appears before response text. (#85374) Thanks @neeravmakwana.
|
||||
- Agents/compaction: skip agent-harness preflight for provider-owned CLI runtime sessions so over-threshold Claude CLI sessions continue through normal compaction instead of failing on a missing harness. Fixes #84857. (#84878) Thanks @zhangguiping-xydt.
|
||||
- Control UI/config: save form-mode edits from the source config snapshot so runtime-only provider defaults like empty `models.providers.<id>.baseUrl` are not written back and rejected. Fixes #85831. Thanks @garyd9.
|
||||
- Browser/existing-session: launch Chrome DevTools MCP with usage statistics disabled by default so its telemetry watchdog stays off unless an operator explicitly opts in. (#85886) Thanks @rohitjavvadi.
|
||||
- Telegram: normalize legacy durable group retry targets before retry sends, polls, and pins so group retries keep using the real chat id. (#85656) Thanks @luoyanglang.
|
||||
- Agents/PDF: route MiniMax PDF fallback policy through plugin metadata so MiniMax uses text extraction instead of VLM image fallback. (#85590, fixes #85575) Thanks @neeravmakwana.
|
||||
- WebChat: summarize internal message-tool source replies so tool cards no longer duplicate the visible reply body. (#84773) Thanks @jason-allen-oneal.
|
||||
|
||||
@@ -164,6 +164,7 @@ describe("chrome MCP page parsing", () => {
|
||||
"-y",
|
||||
"chrome-devtools-mcp@latest",
|
||||
"--autoConnect",
|
||||
"--no-usage-statistics",
|
||||
"--experimentalStructuredContent",
|
||||
"--experimental-page-id-routing",
|
||||
"--userDataDir",
|
||||
@@ -182,6 +183,7 @@ describe("chrome MCP page parsing", () => {
|
||||
"chrome-devtools-mcp@latest",
|
||||
"--browserUrl",
|
||||
"http://127.0.0.1:9222",
|
||||
"--no-usage-statistics",
|
||||
"--experimentalStructuredContent",
|
||||
"--experimental-page-id-routing",
|
||||
]);
|
||||
@@ -197,6 +199,7 @@ describe("chrome MCP page parsing", () => {
|
||||
"chrome-devtools-mcp@latest",
|
||||
"--wsEndpoint",
|
||||
"ws://127.0.0.1:9222/devtools/browser/abc",
|
||||
"--no-usage-statistics",
|
||||
"--experimentalStructuredContent",
|
||||
"--experimental-page-id-routing",
|
||||
]);
|
||||
@@ -219,6 +222,36 @@ describe("chrome MCP page parsing", () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it("lets explicit Chrome MCP usage-statistics args override the default opt-out", () => {
|
||||
expect(
|
||||
buildChromeMcpArgs({
|
||||
mcpArgs: ["--usage-statistics"],
|
||||
}),
|
||||
).toEqual([
|
||||
"-y",
|
||||
"chrome-devtools-mcp@latest",
|
||||
"--autoConnect",
|
||||
"--experimentalStructuredContent",
|
||||
"--experimental-page-id-routing",
|
||||
"--usage-statistics",
|
||||
]);
|
||||
});
|
||||
|
||||
it("does not duplicate an explicit Chrome MCP usage-statistics opt-out", () => {
|
||||
expect(
|
||||
buildChromeMcpArgs({
|
||||
mcpArgs: ["--no-usage-statistics"],
|
||||
}),
|
||||
).toEqual([
|
||||
"-y",
|
||||
"chrome-devtools-mcp@latest",
|
||||
"--autoConnect",
|
||||
"--experimentalStructuredContent",
|
||||
"--experimental-page-id-routing",
|
||||
"--no-usage-statistics",
|
||||
]);
|
||||
});
|
||||
|
||||
it("omits the npx package prefix for a custom Chrome MCP command", () => {
|
||||
expect(
|
||||
buildChromeMcpArgs({
|
||||
@@ -228,6 +261,7 @@ describe("chrome MCP page parsing", () => {
|
||||
).toEqual([
|
||||
"--browserUrl",
|
||||
"http://127.0.0.1:9222",
|
||||
"--no-usage-statistics",
|
||||
"--experimentalStructuredContent",
|
||||
"--experimental-page-id-routing",
|
||||
]);
|
||||
@@ -338,7 +372,9 @@ describe("chrome MCP page parsing", () => {
|
||||
|
||||
expect(message).toContain("Chrome MCP existing-session attach failed");
|
||||
expect(message).toContain("~/Library/Application Support/Google/Chrome/Profile 1");
|
||||
expect(message).toContain("attach failed for ~/Library/Application Support/Google/Chrome/Profile 1");
|
||||
expect(message).toContain(
|
||||
"attach failed for ~/Library/Application Support/Google/Chrome/Profile 1",
|
||||
);
|
||||
expect(message).not.toContain(homeDir);
|
||||
expect(message).not.toContain(userDataDir);
|
||||
});
|
||||
|
||||
@@ -72,10 +72,12 @@ type ChromeMcpSessionFactory = (
|
||||
const DEFAULT_CHROME_MCP_COMMAND = "npx";
|
||||
const DEFAULT_CHROME_MCP_PACKAGE_ARGS = ["-y", "chrome-devtools-mcp@latest"];
|
||||
const DEFAULT_CHROME_MCP_FEATURE_ARGS = [
|
||||
"--no-usage-statistics",
|
||||
// Direct chrome-devtools-mcp launches do not enable structuredContent by default.
|
||||
"--experimentalStructuredContent",
|
||||
"--experimental-page-id-routing",
|
||||
];
|
||||
const CHROME_MCP_USAGE_STATISTICS_FLAG_RE = /^--(?:no-)?usage-?statistics(?:=.*)?$/i;
|
||||
const CHROME_MCP_CONNECTION_FLAGS = new Set([
|
||||
"--autoConnect",
|
||||
"--auto-connect",
|
||||
@@ -342,10 +344,15 @@ async function closeChromeMcpSessionsForProfile(
|
||||
function buildChromeMcpArgsFromOptions(options: NormalizedChromeMcpProfileOptions): string[] {
|
||||
const commandPrefix =
|
||||
options.command === DEFAULT_CHROME_MCP_COMMAND ? DEFAULT_CHROME_MCP_PACKAGE_ARGS : [];
|
||||
const defaultFeatureArgs = options.extraArgs.some((arg) =>
|
||||
CHROME_MCP_USAGE_STATISTICS_FLAG_RE.test(arg),
|
||||
)
|
||||
? DEFAULT_CHROME_MCP_FEATURE_ARGS.filter((arg) => arg !== "--no-usage-statistics")
|
||||
: DEFAULT_CHROME_MCP_FEATURE_ARGS;
|
||||
return [
|
||||
...commandPrefix,
|
||||
...buildChromeMcpConnectionArgs(options),
|
||||
...DEFAULT_CHROME_MCP_FEATURE_ARGS,
|
||||
...defaultFeatureArgs,
|
||||
...buildChromeMcpUserDataDirArgs(options),
|
||||
...options.extraArgs,
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user