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

推荐订阅源

F
Fortinet All Blogs
V2EX - 技术
V2EX - 技术
The Last Watchdog
The Last Watchdog
宝玉的分享
宝玉的分享
T
Tenable Blog
WordPress大学
WordPress大学
K
Kaspersky official blog
Microsoft Security Blog
Microsoft Security Blog
大猫的无限游戏
大猫的无限游戏
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Hacker News - Newest:
Hacker News - Newest: "LLM"
P
Palo Alto Networks Blog
Help Net Security
Help Net Security
V
Vulnerabilities – Threatpost
Know Your Adversary
Know Your Adversary
C
CXSECURITY Database RSS Feed - CXSecurity.com
A
Arctic Wolf
Forbes - Security
Forbes - Security
Microsoft Azure Blog
Microsoft Azure Blog
爱范儿
爱范儿
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
The Cloudflare Blog
Hugging Face - Blog
Hugging Face - Blog
H
Hacker News: Front Page
W
WeLiveSecurity
博客园 - 【当耐特】
G
Google Developers Blog
Martin Fowler
Martin Fowler
TaoSecurity Blog
TaoSecurity Blog
Hacker News: Ask HN
Hacker News: Ask HN
人人都是产品经理
人人都是产品经理
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
AI
AI
N
Netflix TechBlog - Medium
C
Cisco Blogs
I
Intezer
aimingoo的专栏
aimingoo的专栏
博客园 - 聂微东
G
GRAHAM CLULEY
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
www.infosecurity-magazine.com
www.infosecurity-magazine.com
小众软件
小众软件
Blog — PlanetScale
Blog — PlanetScale
MyScale Blog
MyScale Blog
L
Lohrmann on Cybersecurity
Engineering at Meta
Engineering at Meta

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 test: merge chat context notice checks · openclaw/openclaw@5c2f4af 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 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 test: trim doctor command hotspots · openclaw/openclaw@c66f16a test: isolate agent auth and spawn hotspots · openclaw/openclaw@9285935 test: stabilize MCP startup disposal race · openclaw/openclaw@dd9d2eb test: merge browser contract server suites · openclaw/openclaw@5817a76 test: narrow ollama provider discovery setup · openclaw/openclaw@a0d9598 build: declare qa-lab aimock runtime dependency · openclaw/openclaw@24431e5 test: speed up safe-bins exec harness · openclaw/openclaw@ee856ab test: preserve tool helpers in embedded runner mocks · openclaw/openclaw@acd86a0 refactor: move memory embeddings into provider plugins · openclaw/openclaw@77e6e4c test: reuse system-run temp fixtures · openclaw/openclaw@7e9ff0f test: trim hotspot wait overhead · openclaw/openclaw@12a59b0 Check: avoid duplicate boundary prep · openclaw/openclaw@baf11b8 test: reduce hotspot fixture overhead · openclaw/openclaw@3a59edd feat(ui): overhaul settings and slash command UX (#67819) thanks @Bun… · openclaw/openclaw@2cfb660 QA Matrix: exit cleanly on failure · openclaw/openclaw@42805d2 QA Matrix: isolate scenario coverage · openclaw/openclaw@7e659e1 Matrix: refresh crypto bootstrap state · openclaw/openclaw@94081d8 QA Lab: add provider registry · openclaw/openclaw@bb7e982 Matrix: add plugin changelog · openclaw/openclaw@4acab55 test: trim more hotspot overhead · openclaw/openclaw@f485311 test: trim remaining hotspot tests · openclaw/openclaw@6ba8626 test: narrow hotspot mocks · openclaw/openclaw@dbc8179 test: isolate gemini embedding request helpers · openclaw/openclaw@cd330f5 test: trim memory and mcp hotspots · openclaw/openclaw@fd48dfa test: slim provider registry mocks · openclaw/openclaw@2e08c77 test: harden Parallels update smoke · openclaw/openclaw@1a98090 feat: default Anthropic to Opus 4.7 · openclaw/openclaw@628b454 fix: harden node-host shell payload mutability checks · openclaw/openclaw@75c551e fix: land node-host approval binding for native binaries (#66731) (th… · openclaw/openclaw@29919bb CI: add daily schedule to CodeQL workflow (#67645) · openclaw/openclaw@69d25f5 fix(gateway): capture config hash after plugin auto-enable to prevent… · openclaw/openclaw@8c11210 fix: repair sanitized replay tool results before send (#67620) (thank… · openclaw/openclaw@c3c7a99 fix: restrict HTML timeout short-circuit to transient statuses · openclaw/openclaw@de129a6 fix: keep TUI watchdog bound to active run (#67401) (thanks @xantorres) · openclaw/openclaw@3525273 Gateway/skills: dedupe skills prefix-match + drop dead fallback on log · openclaw/openclaw@d7f489f Extensions/lmstudio: back off inference preload after consecutive fai… · openclaw/openclaw@b555214 TUI/streaming: add watchdog that resets the activity indicator after … · openclaw/openclaw@f44ab20 Agents/tool-loop: enable unknown-tool stream guard by default · openclaw/openclaw@36ed367 Gateway/skills: invalidate session skills snapshot on config write · openclaw/openclaw@b23d59a fix: classify HTML provider error pages correctly (#67642) (thanks @s… · openclaw/openclaw@e588e90 fix(skills): remove unused model-usage import (#67641) · openclaw/openclaw@55f05df docs(changelog): credit codex fix superseded PRs · openclaw/openclaw@e485f24 fix(openai-codex): normalize stale transport metadata in resolution a… · openclaw/openclaw@90801ba CI: pin Docker-related GitHub Actions (#67632) · openclaw/openclaw@f697b01 Android: modernize WebView and discovery API usage (#67627) · openclaw/openclaw@44a6e50 fix(deps): bump hono to 4.12.14 and @hono/node-server to 1.19.14 (GHS… · openclaw/openclaw@fbccc18 fix(deps): bump dompurify to 3.4.0 (#67614) · openclaw/openclaw@2c2dc00 CI: add explicit permissions to all workflow jobs (fixes code-scannin… · openclaw/openclaw@01b7516 fix: register bundled TTS providers and route overrides correctly (#6… · openclaw/openclaw@6ea3cdd fix: align host tilde paths with OS home (#62804) (thanks @stainlu) · openclaw/openclaw@ecfaf64 fix: flush creds queue before reconnect socket open (#67464) (thanks … · openclaw/openclaw@405c63f fix: strip standalone <function> tool call tags from visible text (#6… · openclaw/openclaw@78df859 fix(agents): preserve cli session metadata before transcript persist … · openclaw/openclaw@898fd04 docs(changelog): move cli transcript entry · openclaw/openclaw@c1817c6 fix(agents): normalize cli transcript api field · openclaw/openclaw@3a3fae0 docs(changelog): note cli transcript persistence · openclaw/openclaw@6c343f1 fix(agents): persist cli transcript turns · openclaw/openclaw@b8ef507 fix(msteams): harden security-sensitive flows (#65841) · openclaw/openclaw@c56b56e [Dashboard] Fix exec approval modal overflow for long command content… · openclaw/openclaw@053c5b0 Docs: remove QA changelog entry · openclaw/openclaw@7fd5771 QA: fix private runtime source loading (#67428) · openclaw/openclaw@d5933af docs(gateway): correct protocol.md schema path, hello-ok example, aut… · openclaw/openclaw@489404d CI: pin Node 22 runners to 22.18.0 · openclaw/openclaw@4ffa621 models.authStatus: normalize provider ids + tighten env-backed escape… · openclaw/openclaw@f2fdb9d Update CHANGELOG.md · openclaw/openclaw@7694a92 test(parallels): clean up npm update guard jobs · openclaw/openclaw@045ea7b Plugins: prefer scanDir override paths · openclaw/openclaw@b2974da fix(dreaming): default storage.mode to "separate" so phase blocks sto… · openclaw/openclaw@8c392f0 fix(memory-core): skip dreaming transcript ingestion via session stor… · openclaw/openclaw@a1b01f0 fix: dedupe replayed exec.finished node events (#67281) · openclaw/openclaw@5dcf526
Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16
gumadeiras · 2026-04-17 · via Recent Commits to openclaw:main

@@ -3,12 +3,15 @@ import os from "node:os";

33

import path from "node:path";

44

import { expect } from "vitest";

55

import { createChannelConversationBindingManager } from "../../../src/channels/plugins/conversation-bindings.js";

6+

import type { ChannelPlugin } from "../../../src/channels/plugins/types.js";

67

import type { OpenClawConfig } from "../../../src/config/config.js";

78

import {

89

getSessionBindingService,

910

type SessionBindingCapabilities,

1011

type SessionBindingRecord,

1112

} from "../../../src/infra/outbound/session-binding-service.js";

13+

import { setActivePluginRegistry } from "../../../src/plugins/runtime.js";

14+

import { createTestRegistry } from "../../../src/test-utils/channel-plugins.js";

1215

import {

1316

sessionBindingContractChannelIds,

1417

type SessionBindingContractChannelId,

@@ -23,6 +26,7 @@ type SessionBindingContractEntry = {

2326

bindAndResolve: () => Promise<SessionBindingRecord>;

2427

unbindAndVerify: (binding: SessionBindingRecord) => Promise<void>;

2528

cleanup: () => Promise<void> | void;

29+

beforeEach?: () => Promise<void> | void;

2630

};

2731

const contractApiPromises = new Map<string, Promise<Record<string, unknown>>>();

2832

@@ -96,17 +100,8 @@ function resetMatrixSessionBindingStateDir() {

9610097101

async function createContractMatrixThreadBindingManager() {

98102

resetMatrixSessionBindingStateDir();

99-

const { setMatrixRuntime, createMatrixThreadBindingManager } = await getContractApi<{

100-

setMatrixRuntime: (runtime: unknown) => void;

101-

createMatrixThreadBindingManager: (params: {

102-

accountId: string;

103-

auth: typeof matrixSessionBindingAuth;

104-

client: unknown;

105-

idleTimeoutMs: number;

106-

maxAgeMs: number;

107-

enableSweeper: boolean;

108-

}) => Promise<unknown>;

109-

}>("matrix");

103+

const { setMatrixRuntime, createMatrixThreadBindingManager } =

104+

await getContractApi<MatrixContractApi>("matrix");

110105

setMatrixRuntime({

111106

state: {

112107

resolveStateDir: () => matrixSessionBindingStateDir,

@@ -126,11 +121,145 @@ const baseSessionBindingCfg = {

126121

session: { mainKey: "main", scope: "per-sender" },

127122

} satisfies OpenClawConfig;

128123124+

type ChannelConversationBindingManagerFactory = NonNullable<

125+

NonNullable<ChannelPlugin["conversationBindings"]>["createManager"]

126+

>;

127+128+

type BlueBubblesContractApi = {

129+

blueBubblesConversationBindingTesting: {

130+

resetBlueBubblesConversationBindingsForTests: () => void;

131+

};

132+

createBlueBubblesConversationBindingManager: ChannelConversationBindingManagerFactory;

133+

};

134+135+

type DiscordContractApi = {

136+

createThreadBindingManager: (params: {

137+

accountId: string;

138+

cfg?: OpenClawConfig;

139+

persist: boolean;

140+

enableSweeper: boolean;

141+

}) => unknown;

142+

discordThreadBindingTesting: {

143+

resetThreadBindingsForTests: () => void;

144+

};

145+

};

146+147+

type FeishuContractApi = {

148+

createFeishuThreadBindingManager: (params: {

149+

accountId?: string;

150+

cfg: OpenClawConfig;

151+

}) => unknown;

152+

feishuThreadBindingTesting: {

153+

resetFeishuThreadBindingsForTests: () => void;

154+

};

155+

};

156+157+

type IMessageContractApi = {

158+

createIMessageConversationBindingManager: ChannelConversationBindingManagerFactory;

159+

imessageConversationBindingTesting: {

160+

resetIMessageConversationBindingsForTests: () => void;

161+

};

162+

};

163+164+

type MatrixContractApi = {

165+

createMatrixThreadBindingManager: (params: {

166+

accountId: string;

167+

auth: typeof matrixSessionBindingAuth;

168+

client: unknown;

169+

idleTimeoutMs: number;

170+

maxAgeMs: number;

171+

enableSweeper: boolean;

172+

}) => Promise<unknown>;

173+

resetMatrixThreadBindingsForTests: () => void;

174+

setMatrixRuntime: (runtime: unknown) => void;

175+

};

176+177+

type TelegramContractApi = {

178+

createTelegramThreadBindingManager: (params: {

179+

accountId: string;

180+

persist: boolean;

181+

enableSweeper: boolean;

182+

}) => unknown;

183+

resetTelegramThreadBindingsForTests: () => Promise<void>;

184+

};

185+186+

function setRegistryBackedConversationBindingPlugin(params: {

187+

id: SessionBindingContractChannelId;

188+

createManager: ChannelConversationBindingManagerFactory;

189+

}) {

190+

const plugin = {

191+

id: params.id,

192+

meta: {

193+

id: params.id,

194+

label: params.id,

195+

selectionLabel: params.id,

196+

blurb: "session binding contract fixture",

197+

},

198+

capabilities: { chatTypes: ["direct"] },

199+

config: {

200+

listAccountIds: () => ["default"],

201+

resolveAccount: () => ({}),

202+

},

203+

conversationBindings: {

204+

supportsCurrentConversationBinding: true,

205+

createManager: params.createManager,

206+

},

207+

} as unknown as ChannelPlugin;

208+

setActivePluginRegistry(

209+

createTestRegistry([

210+

{

211+

pluginId: params.id,

212+

plugin,

213+

source: "test",

214+

},

215+

]),

216+

);

217+

}

218+219+

async function prepareBlueBubblesSessionBindingContract() {

220+

const api = await getContractApi<BlueBubblesContractApi>("bluebubbles");

221+

api.blueBubblesConversationBindingTesting.resetBlueBubblesConversationBindingsForTests();

222+

setRegistryBackedConversationBindingPlugin({

223+

id: "bluebubbles",

224+

createManager: api.createBlueBubblesConversationBindingManager,

225+

});

226+

}

227+228+

async function prepareDiscordSessionBindingContract() {

229+

const api = await getContractApi<DiscordContractApi>("discord");

230+

api.discordThreadBindingTesting.resetThreadBindingsForTests();

231+

}

232+233+

async function prepareFeishuSessionBindingContract() {

234+

const api = await getContractApi<FeishuContractApi>("feishu");

235+

api.feishuThreadBindingTesting.resetFeishuThreadBindingsForTests();

236+

}

237+238+

async function prepareIMessageSessionBindingContract() {

239+

const api = await getContractApi<IMessageContractApi>("imessage");

240+

api.imessageConversationBindingTesting.resetIMessageConversationBindingsForTests();

241+

setRegistryBackedConversationBindingPlugin({

242+

id: "imessage",

243+

createManager: api.createIMessageConversationBindingManager,

244+

});

245+

}

246+247+

async function prepareMatrixSessionBindingContract() {

248+

const api = await getContractApi<MatrixContractApi>("matrix");

249+

api.resetMatrixThreadBindingsForTests();

250+

}

251+252+

async function prepareTelegramSessionBindingContract() {

253+

const api = await getContractApi<TelegramContractApi>("telegram");

254+

await api.resetTelegramThreadBindingsForTests();

255+

}

256+129257

const sessionBindingContractEntries: Record<

130258

SessionBindingContractChannelId,

131259

Omit<SessionBindingContractEntry, "id">

132260

> = {

133261

bluebubbles: {

262+

beforeEach: prepareBlueBubblesSessionBindingContract,

134263

expectedCapabilities: {

135264

adapterAvailable: true,

136265

bindSupported: true,

@@ -193,21 +322,15 @@ const sessionBindingContractEntries: Record<

193322

},

194323

},

195324

discord: {

325+

beforeEach: prepareDiscordSessionBindingContract,

196326

expectedCapabilities: {

197327

adapterAvailable: true,

198328

bindSupported: true,

199329

unbindSupported: true,

200330

placements: ["current", "child"],

201331

},

202332

getCapabilities: async () => {

203-

const { createThreadBindingManager } = await getContractApi<{

204-

createThreadBindingManager: (params: {

205-

accountId: string;

206-

cfg?: OpenClawConfig;

207-

persist: boolean;

208-

enableSweeper: boolean;

209-

}) => unknown;

210-

}>("discord");

333+

const { createThreadBindingManager } = await getContractApi<DiscordContractApi>("discord");

211334

createThreadBindingManager({

212335

accountId: "default",

213336

cfg: baseSessionBindingCfg,

@@ -220,14 +343,7 @@ const sessionBindingContractEntries: Record<

220343

});

221344

},

222345

bindAndResolve: async () => {

223-

const { createThreadBindingManager } = await getContractApi<{

224-

createThreadBindingManager: (params: {

225-

accountId: string;

226-

cfg?: OpenClawConfig;

227-

persist: boolean;

228-

enableSweeper: boolean;

229-

}) => unknown;

230-

}>("discord");

346+

const { createThreadBindingManager } = await getContractApi<DiscordContractApi>("discord");

231347

createThreadBindingManager({

232348

accountId: "default",

233349

cfg: baseSessionBindingCfg,

@@ -267,19 +383,16 @@ const sessionBindingContractEntries: Record<

267383

},

268384

},

269385

feishu: {

386+

beforeEach: prepareFeishuSessionBindingContract,

270387

expectedCapabilities: {

271388

adapterAvailable: true,

272389

bindSupported: true,

273390

unbindSupported: true,

274391

placements: ["current"],

275392

},

276393

getCapabilities: async () => {

277-

const { createFeishuThreadBindingManager } = await getContractApi<{

278-

createFeishuThreadBindingManager: (params: {

279-

accountId?: string;

280-

cfg: OpenClawConfig;

281-

}) => unknown;

282-

}>("feishu");

394+

const { createFeishuThreadBindingManager } =

395+

await getContractApi<FeishuContractApi>("feishu");

283396

createFeishuThreadBindingManager({

284397

accountId: "default",

285398

cfg: baseSessionBindingCfg,

@@ -290,12 +403,8 @@ const sessionBindingContractEntries: Record<

290403

});

291404

},

292405

bindAndResolve: async () => {

293-

const { createFeishuThreadBindingManager } = await getContractApi<{

294-

createFeishuThreadBindingManager: (params: {

295-

accountId?: string;

296-

cfg: OpenClawConfig;

297-

}) => unknown;

298-

}>("feishu");

406+

const { createFeishuThreadBindingManager } =

407+

await getContractApi<FeishuContractApi>("feishu");

299408

createFeishuThreadBindingManager({

300409

accountId: "default",

301410

cfg: baseSessionBindingCfg,

@@ -335,6 +444,7 @@ const sessionBindingContractEntries: Record<

335444

},

336445

},

337446

imessage: {

447+

beforeEach: prepareIMessageSessionBindingContract,

338448

expectedCapabilities: {

339449

adapterAvailable: true,

340450

bindSupported: true,

@@ -397,6 +507,7 @@ const sessionBindingContractEntries: Record<

397507

},

398508

},

399509

matrix: {

510+

beforeEach: prepareMatrixSessionBindingContract,

400511

expectedCapabilities: {

401512

adapterAvailable: true,

402513

bindSupported: true,

@@ -447,20 +558,16 @@ const sessionBindingContractEntries: Record<

447558

},

448559

},

449560

telegram: {

561+

beforeEach: prepareTelegramSessionBindingContract,

450562

expectedCapabilities: {

451563

adapterAvailable: true,

452564

bindSupported: true,

453565

unbindSupported: true,

454566

placements: ["current", "child"],

455567

},

456568

getCapabilities: async () => {

457-

const { createTelegramThreadBindingManager } = await getContractApi<{

458-

createTelegramThreadBindingManager: (params: {

459-

accountId: string;

460-

persist: boolean;

461-

enableSweeper: boolean;

462-

}) => unknown;

463-

}>("telegram");

569+

const { createTelegramThreadBindingManager } =

570+

await getContractApi<TelegramContractApi>("telegram");

464571

createTelegramThreadBindingManager({

465572

accountId: "default",

466573

persist: false,

@@ -472,13 +579,8 @@ const sessionBindingContractEntries: Record<

472579

});

473580

},

474581

bindAndResolve: async () => {

475-

const { createTelegramThreadBindingManager } = await getContractApi<{

476-

createTelegramThreadBindingManager: (params: {

477-

accountId: string;

478-

persist: boolean;

479-

enableSweeper: boolean;

480-

}) => unknown;

481-

}>("telegram");

582+

const { createTelegramThreadBindingManager } =

583+

await getContractApi<TelegramContractApi>("telegram");

482584

createTelegramThreadBindingManager({

483585

accountId: "default",

484586

persist: false,