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

推荐订阅源

cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V
V2EX
V
Visual Studio Blog
博客园_首页
Last Week in AI
Last Week in AI
Apple Machine Learning Research
Apple Machine Learning Research
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
S
SegmentFault 最新的问题
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Martin Fowler
Martin Fowler
Recent Announcements
Recent Announcements
J
Java Code Geeks
月光博客
月光博客
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
F
Fortinet All Blogs
P
Privacy & Cybersecurity Law Blog
C
CERT Recently Published Vulnerability Notes
C
CXSECURITY Database RSS Feed - CXSecurity.com
B
Blog RSS Feed
S
Schneier on Security
酷 壳 – CoolShell
酷 壳 – CoolShell
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
W
WeLiveSecurity
A
Arctic Wolf
U
Unit 42
博客园 - 司徒正美
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
有赞技术团队
有赞技术团队
Recorded Future
Recorded Future
Engineering at Meta
Engineering at Meta
Google DeepMind News
Google DeepMind News
大猫的无限游戏
大猫的无限游戏
Microsoft Security Blog
Microsoft Security Blog
Hacker News: Ask HN
Hacker News: Ask HN
量子位
B
Blog
T
The Exploit Database - CXSecurity.com
C
Cisco Blogs
博客园 - 三生石上(FineUI控件)
H
Help Net Security
博客园 - 叶小钗
C
Cyber Attacks, Cyber Crime and Cyber Security
L
LINUX DO - 热门话题
Hugging Face - Blog
Hugging Face - Blog
Google DeepMind News
Google DeepMind News
小众软件
小众软件
雷峰网
雷峰网
TaoSecurity Blog
TaoSecurity Blog
Schneier on Security
Schneier on Security

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 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
test: clear talk handoff broad matchers · openclaw/openclaw@1f30ea3
steipete · 2026-05-10 · via Recent Commits to openclaw:main

@@ -11,6 +11,48 @@ import {

1111

verifyTalkHandoffToken,

1212

} from "./talk-handoff.js";

131314+

function requireRecord(value: unknown, label: string): Record<string, unknown> {

15+

if (!value || typeof value !== "object" || Array.isArray(value)) {

16+

throw new Error(`Expected ${label}`);

17+

}

18+

return value as Record<string, unknown>;

19+

}

20+21+

function requireArray(value: unknown, label: string): unknown[] {

22+

if (!Array.isArray(value)) {

23+

throw new Error(`Expected ${label}`);

24+

}

25+

return value;

26+

}

27+28+

function expectFields(

29+

value: unknown,

30+

label: string,

31+

fields: Record<string, unknown>,

32+

): Record<string, unknown> {

33+

const record = requireRecord(value, label);

34+

for (const [key, expected] of Object.entries(fields)) {

35+

expect(record[key]).toEqual(expected);

36+

}

37+

return record;

38+

}

39+40+

function requireRoom(value: unknown, label = "handoff room"): Record<string, unknown> {

41+

return requireRecord(requireRecord(value, label).room, `${label} room`);

42+

}

43+44+

function requireEvents(value: unknown, label = "handoff result"): unknown[] {

45+

return requireArray(requireRecord(value, label).events, `${label} events`);

46+

}

47+48+

function expectEventFields(

49+

events: unknown[],

50+

index: number,

51+

fields: Record<string, unknown>,

52+

): Record<string, unknown> {

53+

return expectFields(events[index], `event ${index}`, fields);

54+

}

55+1456

describe("talk handoff store", () => {

1557

it("creates an expiring managed-room handoff without storing the plaintext token", () => {

1658

vi.useFakeTimers();

@@ -29,7 +71,7 @@ describe("talk handoff store", () => {

2971

});

3072

const record = getTalkHandoff(handoff.id);

317332-

expect(handoff).toMatchObject({

74+

const handoffRecord = expectFields(handoff, "created handoff", {

3375

roomId: `talk_${handoff.id}`,

3476

roomUrl: `/talk/rooms/talk_${handoff.id}`,

3577

sessionKey: "session:main",

@@ -44,16 +86,14 @@ describe("talk handoff store", () => {

4486

brain: "agent-consult",

4587

createdAt: Date.parse("2026-05-05T12:00:00.000Z"),

4688

expiresAt: Date.parse("2026-05-05T12:00:05.000Z"),

47-

room: {

48-

activeClientId: undefined,

49-

recentTalkEvents: [

50-

expect.objectContaining({

51-

type: "session.started",

52-

sessionId: `talk_${handoff.id}`,

53-

transport: "managed-room",

54-

}),

55-

],

56-

},

89+

});

90+

const room = requireRecord(handoffRecord.room, "created handoff room");

91+

expect(room.activeClientId).toBeUndefined();

92+

const events = requireArray(room.recentTalkEvents, "recent talk events");

93+

expectEventFields(events, 0, {

94+

type: "session.started",

95+

sessionId: `talk_${handoff.id}`,

96+

transport: "managed-room",

5797

});

5898

expect(handoff).not.toHaveProperty("tokenHash");

5999

if (record === undefined) {

@@ -75,17 +115,18 @@ describe("talk handoff store", () => {

75115

ok: false,

76116

reason: "invalid_token",

77117

});

78-

expect(joinTalkHandoff(handoff.id, handoff.token)).toMatchObject({

118+

const join = joinTalkHandoff(handoff.id, handoff.token);

119+

const joinRecord = expectFields(join, "join result", {

79120

ok: true,

80-

events: [expect.objectContaining({ type: "session.ready" })],

81-

record: expect.objectContaining({

82-

id: handoff.id,

83-

roomId: handoff.roomId,

84-

sessionKey: "session:main",

85-

}),

121+

});

122+

expectEventFields(requireEvents(joinRecord), 0, { type: "session.ready" });

123+

expectFields(joinRecord.record, "joined record", {

124+

id: handoff.id,

125+

roomId: handoff.roomId,

126+

sessionKey: "session:main",

86127

});

8712888-

expect(revokeTalkHandoff(handoff.id)).toMatchObject({ revoked: true });

129+

expectFields(revokeTalkHandoff(handoff.id), "revoke result", { revoked: true });

89130

expect(joinTalkHandoff(handoff.id, handoff.token)).toEqual({

90131

ok: false,

91132

reason: "not_found",

@@ -97,59 +138,53 @@ describe("talk handoff store", () => {

97138

const handoff = createTalkHandoff({ sessionKey: "session:main" });

9813999140

const firstJoin = joinTalkHandoff(handoff.id, handoff.token, { clientId: "conn-1" });

100-

expect(firstJoin).toMatchObject({

141+

expectFields(firstJoin, "first join", {

101142

ok: true,

102-

events: [

103-

expect.objectContaining({

104-

type: "session.ready",

105-

sessionId: handoff.roomId,

106-

payload: expect.objectContaining({ clientId: "conn-1" }),

107-

}),

108-

],

109-

record: {

110-

room: expect.objectContaining({

111-

activeClientId: "conn-1",

112-

}),

113-

},

114143

});

144+

const firstReady = expectEventFields(requireEvents(firstJoin, "first join"), 0, {

145+

type: "session.ready",

146+

sessionId: handoff.roomId,

147+

});

148+

expect(requireRecord(firstReady.payload, "first ready payload").clientId).toBe("conn-1");

149+

expect(

150+

requireRoom(requireRecord(firstJoin, "first join").record, "first join record")

151+

.activeClientId,

152+

).toBe("conn-1");

115153116154

const secondJoin = joinTalkHandoff(handoff.id, handoff.token, { clientId: "conn-2" });

117-

expect(secondJoin).toMatchObject({

155+

expectFields(secondJoin, "second join", {

118156

ok: true,

119-

events: [

120-

expect.objectContaining({

121-

type: "session.replaced",

122-

sessionId: handoff.roomId,

123-

payload: expect.objectContaining({

124-

previousClientId: "conn-1",

125-

nextClientId: "conn-2",

126-

}),

127-

}),

128-

expect.objectContaining({

129-

type: "session.ready",

130-

sessionId: handoff.roomId,

131-

payload: expect.objectContaining({ clientId: "conn-2" }),

132-

}),

133-

],

134-

record: {

135-

room: expect.objectContaining({

136-

activeClientId: "conn-2",

137-

}),

138-

},

139157

});

158+

const secondEvents = requireEvents(secondJoin, "second join");

159+

const replaced = expectEventFields(secondEvents, 0, {

160+

type: "session.replaced",

161+

sessionId: handoff.roomId,

162+

});

163+

expectFields(requireRecord(replaced.payload, "replaced payload"), "replaced payload", {

164+

previousClientId: "conn-1",

165+

nextClientId: "conn-2",

166+

});

167+

const ready = expectEventFields(secondEvents, 1, {

168+

type: "session.ready",

169+

sessionId: handoff.roomId,

170+

});

171+

expect(requireRecord(ready.payload, "ready payload").clientId).toBe("conn-2");

172+

expect(

173+

requireRoom(requireRecord(secondJoin, "second join").record, "second join record")

174+

.activeClientId,

175+

).toBe("conn-2");

140176141-

expect(revokeTalkHandoff(handoff.id)).toMatchObject({

177+

const revoked = revokeTalkHandoff(handoff.id);

178+

expectFields(revoked, "revoke result", {

142179

revoked: true,

143180

activeClientId: "conn-2",

144-

events: [

145-

expect.objectContaining({

146-

type: "session.closed",

147-

sessionId: handoff.roomId,

148-

payload: expect.objectContaining({ reason: "revoked" }),

149-

final: true,

150-

}),

151-

],

152181

});

182+

const closed = expectEventFields(requireEvents(revoked, "revoke result"), 0, {

183+

type: "session.closed",

184+

sessionId: handoff.roomId,

185+

final: true,

186+

});

187+

expect(requireRecord(closed.payload, "closed payload").reason).toBe("revoked");

153188

});

154189155190

it("records managed-room turn start, end, and cancellation events", () => {

@@ -161,53 +196,54 @@ describe("talk handoff store", () => {

161196

clientId: "conn-1",

162197

turnId: "turn-1",

163198

});

164-

expect(start).toMatchObject({

199+

expectFields(start, "turn start", {

165200

ok: true,

166201

turnId: "turn-1",

167-

events: [expect.objectContaining({ type: "turn.started", turnId: "turn-1" })],

168-

record: {

169-

room: expect.objectContaining({

170-

activeClientId: "conn-1",

171-

activeTurnId: "turn-1",

172-

}),

173-

},

174202

});

203+

expectEventFields(requireEvents(start, "turn start"), 0, {

204+

type: "turn.started",

205+

turnId: "turn-1",

206+

});

207+

expectFields(

208+

requireRoom(requireRecord(start, "turn start").record, "turn start record"),

209+

"turn room",

210+

{

211+

activeClientId: "conn-1",

212+

activeTurnId: "turn-1",

213+

},

214+

);

175215176-

expect(endTalkHandoffTurn(handoff.id, handoff.token)).toMatchObject({

216+

const ended = endTalkHandoffTurn(handoff.id, handoff.token);

217+

expectFields(ended, "turn end", {

177218

ok: true,

178219

turnId: "turn-1",

179-

events: [

180-

expect.objectContaining({

181-

type: "turn.ended",

182-

turnId: "turn-1",

183-

final: true,

184-

}),

185-

],

186-

record: {

187-

room: expect.not.objectContaining({

188-

activeTurnId: expect.any(String),

189-

}),

190-

},

191220

});

221+

expectEventFields(requireEvents(ended, "turn end"), 0, {

222+

type: "turn.ended",

223+

turnId: "turn-1",

224+

final: true,

225+

});

226+

expect(

227+

requireRoom(requireRecord(ended, "turn end").record, "turn end record").activeTurnId,

228+

).toBeUndefined();

192229193230

expect(cancelTalkHandoffTurn(handoff.id, handoff.token)).toEqual({

194231

ok: false,

195232

reason: "no_active_turn",

196233

});

197234198235

startTalkHandoffTurn(handoff.id, handoff.token, { turnId: "turn-2" });

199-

expect(cancelTalkHandoffTurn(handoff.id, handoff.token, { reason: "barge-in" })).toMatchObject({

236+

const cancelled = cancelTalkHandoffTurn(handoff.id, handoff.token, { reason: "barge-in" });

237+

expectFields(cancelled, "turn cancellation", {

200238

ok: true,

201239

turnId: "turn-2",

202-

events: [

203-

expect.objectContaining({

204-

type: "turn.cancelled",

205-

turnId: "turn-2",

206-

final: true,

207-

payload: expect.objectContaining({ reason: "barge-in" }),

208-

}),

209-

],

210240

});

241+

const cancelledEvent = expectEventFields(requireEvents(cancelled, "turn cancellation"), 0, {

242+

type: "turn.cancelled",

243+

turnId: "turn-2",

244+

final: true,

245+

});

246+

expect(requireRecord(cancelledEvent.payload, "cancelled payload").reason).toBe("barge-in");

211247

});

212248213249

it("rejects stale managed-room turn completion without clearing the active turn", () => {

@@ -229,7 +265,9 @@ describe("talk handoff store", () => {

229265

});

230266

expect(getTalkHandoff(handoff.id)?.room.talk.activeTurnId).toBe("turn-current");

231267232-

expect(endTalkHandoffTurn(handoff.id, handoff.token, { turnId: "turn-current" })).toMatchObject(

268+

expectFields(

269+

endTalkHandoffTurn(handoff.id, handoff.token, { turnId: "turn-current" }),

270+

"current turn end",

233271

{

234272

ok: true,

235273

turnId: "turn-current",

@@ -263,26 +301,28 @@ describe("talk handoff store", () => {

263301

ok: false,

264302

reason: "invalid_token",

265303

});

266-

expect(joinTalkHandoff(first.id, first.token)).toMatchObject({

304+

const firstJoin = joinTalkHandoff(first.id, first.token);

305+

const firstJoinRecord = expectFields(firstJoin, "first join", {

267306

ok: true,

268-

events: [expect.objectContaining({ type: "session.ready" })],

269-

record: expect.objectContaining({

270-

roomId: first.roomId,

271-

sessionKey: "agent:main:first",

272-

channel: "browser",

273-

target: "host:local",

274-

provider: "openai",

275-

}),

276-

});

277-

expect(joinTalkHandoff(second.id, second.token)).toMatchObject({

307+

});

308+

expectEventFields(requireEvents(firstJoin), 0, { type: "session.ready" });

309+

expectFields(firstJoinRecord.record, "first joined record", {

310+

roomId: first.roomId,

311+

sessionKey: "agent:main:first",

312+

channel: "browser",

313+

target: "host:local",

314+

provider: "openai",

315+

});

316+

const secondJoin = joinTalkHandoff(second.id, second.token);

317+

const secondJoinRecord = expectFields(secondJoin, "second join", {

278318

ok: true,

279-

events: [expect.objectContaining({ type: "session.ready" })],

280-

record: expect.objectContaining({

281-

roomId: second.roomId,

282-

sessionKey: "agent:main:second",

283-

channel: "browser",

284-

target: "host:local",

285-

}),

319+

});

320+

expectEventFields(requireEvents(secondJoin), 0, { type: "session.ready" });

321+

expectFields(secondJoinRecord.record, "second joined record", {

322+

roomId: second.roomId,

323+

sessionKey: "agent:main:second",

324+

channel: "browser",

325+

target: "host:local",

286326

});

287327

});

288328

});