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

推荐订阅源

P
Proofpoint News Feed
V
V2EX
WordPress大学
WordPress大学
Google DeepMind News
Google DeepMind News
Martin Fowler
Martin Fowler
小众软件
小众软件
Blog — PlanetScale
Blog — PlanetScale
月光博客
月光博客
The Cloudflare Blog
T
Tailwind CSS Blog
H
Help Net Security
腾讯CDC
爱范儿
爱范儿
人人都是产品经理
人人都是产品经理
H
Hackread – Cybersecurity News, Data Breaches, AI and More
The GitHub Blog
The GitHub Blog
Microsoft Security Blog
Microsoft Security Blog
Stack Overflow Blog
Stack Overflow Blog
D
DataBreaches.Net
C
Check Point Blog
量子位
酷 壳 – CoolShell
酷 壳 – CoolShell
美团技术团队
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com

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): suppress thread sends in DMs · openclaw/...
jailbirt · 2026-05-27 · via Recent Commits to openclaw:main

@@ -157,3 +157,90 @@ describe("googlechat monitor bot loop protection", () => {

157157

expect(runTurn).not.toHaveBeenCalled();

158158

});

159159

});

160+161+

describe("googlechat monitor direct messages", () => {

162+

it("omits thread metadata from DM reply context and typing messages", async () => {

163+

const runTurn = vi.fn();

164+

const buildContext = vi.fn((payload: unknown) => payload);

165+

const core = {

166+

logging: { shouldLogVerbose: () => false },

167+

channel: {

168+

routing: {

169+

resolveAgentRoute: () => ({

170+

agentId: "agent-1",

171+

accountId: "work",

172+

sessionKey: "session-1",

173+

}),

174+

},

175+

session: {

176+

resolveStorePath: () => "/tmp/openclaw-googlechat-test",

177+

readSessionUpdatedAt: () => undefined,

178+

recordInboundSession: vi.fn(),

179+

},

180+

reply: {

181+

resolveEnvelopeFormatOptions: () => ({}),

182+

formatAgentEnvelope: ({ body }: { body: string }) => body,

183+

dispatchReplyWithBufferedBlockDispatcher: vi.fn(),

184+

},

185+

turn: { buildContext, run: runTurn },

186+

},

187+

} as unknown as GoogleChatCoreRuntime;

188+

const runtime = { error: vi.fn(), log: vi.fn() } satisfies GoogleChatRuntimeEnv;

189+

const account = {

190+

accountId: "work",

191+

config: {

192+

typingIndicator: "message",

193+

},

194+

credentialSource: "inline",

195+

} as ResolvedGoogleChatAccount;

196+

const event = {

197+

type: "MESSAGE",

198+

eventTime: "2026-03-22T00:00:00.001Z",

199+

space: { name: "spaces/DM", type: "DM" },

200+

message: {

201+

name: "spaces/DM/messages/2",

202+

text: "hello",

203+

thread: { name: "spaces/DM/threads/thread-1" },

204+

sender: { name: "users/alice", displayName: "Alice", type: "HUMAN" },

205+

},

206+

} satisfies GoogleChatEvent;

207+208+

accessMocks.applyGoogleChatInboundAccessPolicy.mockResolvedValue({

209+

ok: true,

210+

commandAuthorized: undefined,

211+

effectiveWasMentioned: undefined,

212+

groupBotLoopProtection: undefined,

213+

groupSystemPrompt: undefined,

214+

});

215+

apiMocks.sendGoogleChatMessage.mockResolvedValue({

216+

messageName: "spaces/DM/messages/typing",

217+

});

218+219+

await testing.processMessageWithPipeline({

220+

event,

221+

account,

222+

config: {},

223+

runtime,

224+

core,

225+

mediaMaxMb: 10,

226+

});

227+228+

expect(buildContext).toHaveBeenCalledWith(

229+

expect.objectContaining({

230+

reply: {

231+

to: "googlechat:spaces/DM",

232+

originatingTo: "googlechat:spaces/DM",

233+

replyToId: undefined,

234+

replyToIdFull: undefined,

235+

},

236+

}),

237+

);

238+

expect(apiMocks.sendGoogleChatMessage).toHaveBeenCalledWith({

239+

account,

240+

space: "spaces/DM",

241+

text: "_OpenClaw is typing..._",

242+

thread: undefined,

243+

});

244+

expect(runTurn).toHaveBeenCalledOnce();

245+

});

246+

});