惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

IT之家
IT之家
H
Help Net Security
GbyAI
GbyAI
博客园_首页
G
Google Developers Blog
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
月光博客
月光博客
美团技术团队
B
Blog RSS Feed
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
博客园 - 叶小钗
有赞技术团队
有赞技术团队
T
The Blog of Author Tim Ferriss
Engineering at Meta
Engineering at Meta
Google DeepMind News
Google DeepMind News
Y
Y Combinator Blog
宝玉的分享
宝玉的分享
Microsoft Azure Blog
Microsoft Azure Blog
罗磊的独立博客
云风的 BLOG
云风的 BLOG
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
P
Proofpoint News Feed

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(googlechat): clear status after startup failures · op...
vincentkoc · 2026-06-17 · via Recent Commits to openclaw:main

File tree

  • extensions/googlechat/src

Original file line numberDiff line numberDiff line change

@@ -44,6 +44,17 @@ export async function startGoogleChatGatewayAccount(ctx: {

4444

audienceType: account.config.audienceType,

4545

audience: account.config.audience,

4646

});

47+

let stopped = false;

48+

const markStopped = () => {

49+

if (stopped) {

50+

return;

51+

}

52+

stopped = true;

53+

statusSink({

54+

running: false,

55+

lastStopAt: Date.now(),

56+

});

57+

};

4758

if (

4859

isGoogleChatNativeApprovalClientEnabled({

4960

cfg: ctx.cfg,

@@ -59,26 +70,28 @@ export async function startGoogleChatGatewayAccount(ctx: {

5970

abortSignal: ctx.abortSignal,

6071

});

6172

}

62-

await runPassiveAccountLifecycle({

63-

abortSignal: ctx.abortSignal,

64-

start: async () =>

65-

await startGoogleChatMonitor({

66-

account,

67-

config: ctx.cfg,

68-

runtime: ctx.runtime,

69-

abortSignal: ctx.abortSignal,

70-

webhookPath: account.config.webhookPath,

71-

webhookUrl: account.config.webhookUrl,

72-

statusSink,

73-

}),

74-

stop: async (unregister) => {

75-

unregister?.();

76-

},

77-

onStop: async () => {

78-

statusSink({

79-

running: false,

80-

lastStopAt: Date.now(),

81-

});

82-

},

83-

});

73+

try {

74+

await runPassiveAccountLifecycle({

75+

abortSignal: ctx.abortSignal,

76+

start: async () =>

77+

await startGoogleChatMonitor({

78+

account,

79+

config: ctx.cfg,

80+

runtime: ctx.runtime,

81+

abortSignal: ctx.abortSignal,

82+

webhookPath: account.config.webhookPath,

83+

webhookUrl: account.config.webhookUrl,

84+

statusSink,

85+

}),

86+

stop: async (unregister) => {

87+

unregister?.();

88+

},

89+

onStop: async () => {

90+

markStopped();

91+

},

92+

});

93+

} catch (error) {

94+

markStopped();

95+

throw error;

96+

}

8497

}

Original file line numberDiff line numberDiff line change

@@ -1,5 +1,6 @@

11

// Googlechat tests cover setup plugin behavior.

22

import {

3+

createStartAccountContext,

34

expectLifecyclePatch,

45

expectPendingUntilAbort,

56

startAccountAndTrackLifecycle,

@@ -12,6 +13,7 @@ import {

1213

} from "openclaw/plugin-sdk/plugin-test-runtime";

1314

import type { WizardPrompter } from "openclaw/plugin-sdk/plugin-test-runtime";

1415

import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/setup";

16+

import type { ChannelAccountSnapshot } from "openclaw/plugin-sdk/status-helpers";

1517

import { afterAll, afterEach, describe, expect, it, vi } from "vitest";

1618

import type { OpenClawConfig } from "../runtime-api.js";

1719

import {

@@ -383,6 +385,22 @@ describe("googlechat setup", () => {

383385

expectLifecyclePatch(patches, { running: true });

384386

expectLifecyclePatch(patches, { running: false });

385387

});

388+
389+

it("clears running status when monitor startup fails", async () => {

390+

hoisted.startGoogleChatMonitor.mockRejectedValue(new Error("webhook bind failed"));

391+

const patches: ChannelAccountSnapshot[] = [];

392+
393+

const task = startGoogleChatGatewayAccount(

394+

createStartAccountContext({

395+

account: buildAccount(),

396+

statusPatchSink: (next) => patches.push({ ...next }),

397+

}),

398+

);

399+
400+

await expect(task).rejects.toThrow("webhook bind failed");

401+

expectLifecyclePatch(patches, { running: true });

402+

expectLifecyclePatch(patches, { running: false });

403+

});

386404

});

387405
388406

describe("resolveGoogleChatAccount", () => {