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

推荐订阅源

H
Help Net Security
T
ThreatConnect
SecWiki News
SecWiki News
F
Future of Privacy Forum
AWS News Blog
AWS News Blog
C
Cisco Blogs
A
Arctic Wolf
Vercel News
Vercel News
The GitHub Blog
The GitHub Blog
Scott Helme
Scott Helme
V
V2EX
博客园 - 叶小钗
阮一峰的网络日志
阮一峰的网络日志
K
Kaspersky official blog
G
Google Developers Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
P
Privacy International News Feed
C
Cyber Attacks, Cyber Crime and Cyber Security
N
News | PayPal Newsroom
Schneier on Security
Schneier on Security
NISL@THU
NISL@THU
Microsoft Azure Blog
Microsoft Azure Blog
量子位
The Hacker News
The Hacker News
Stack Overflow Blog
Stack Overflow Blog
Security Latest
Security Latest
M
Microsoft Research Blog - Microsoft Research
Google Online Security Blog
Google Online Security Blog
博客园_首页
C
CXSECURITY Database RSS Feed - CXSecurity.com
I
InfoQ
Google DeepMind News
Google DeepMind News
Y
Y Combinator Blog
The Cloudflare Blog
Microsoft Security Blog
Microsoft Security Blog
Martin Fowler
Martin Fowler
Cisco Talos Blog
Cisco Talos Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Troy Hunt's Blog
F
Fox-IT International blog
S
Security @ Cisco Blogs
博客园 - 司徒正美
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
C
Comments on: Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
L
LINUX DO - 最新话题
GbyAI
GbyAI
Project Zero
Project Zero
腾讯CDC
T
Tailwind CSS Blog

Recent Commits to openclaw:main

Preserve runtime external auth snapshots (#85558) · openclaw/openclaw@711e963 fix(test): prepare macos runner tmpdir · openclaw/openclaw@7db4b3d test(agents): stabilize yielded exec timeout test · openclaw/openclaw@c14c043 test: stabilize media fallback and background timeout tests · openclaw/openclaw@3bb4be2 fix(whatsapp): warn once when group inbound dropped for missing chann… chore(release): refresh plugin sdk api baseline · openclaw/openclaw@e752f9b test(whatsapp): stabilize media format expectations · openclaw/openclaw@c43ed9e test(qqbot): make OPENCLAW_HOME media test Windows-safe · openclaw/openclaw@1e9b6b7 fix(test): forward installer smoke controls test: align image fast path expectations · openclaw/openclaw@21aefb8 test: align pnpm cache workflow assertion · openclaw/openclaw@c4f0682 test: enforce per-test ci threshold · openclaw/openclaw@4118a32 ci(mantis): pass crabbox capacity regions · openclaw/openclaw@4fdf617 ci: disable pnpm action cache on Windows · openclaw/openclaw@bc3d6ba fix(agents): skip wildcard catalog metadata refs (#86524) fix(test): bootstrap macos script stdin test(codex): avoid app-server diagnostic notification race fix(embedded-runner): preserve provider errors on cleanup takeover (#… · openclaw/openclaw@7fbca96 fix(agents): handle preflight compaction no-op budgets (#86709) · openclaw/openclaw@bcde7b1 fix: make QQ Bot media paths respect `OPENCLAW_HOME` configuration (#… · openclaw/openclaw@0d23c3b fix(tooling): skip gauntlet declaration prebuild fix(control-ui): support raw edits from editable config (#86726) · openclaw/openclaw@c9d0464 revert: iMessage group media attachment command (#86734) · openclaw/openclaw@5a33378 fix(release): stabilize beta validation after rebase · openclaw/openclaw@609d70d fix(test): measure kitchen sink gateway children · openclaw/openclaw@4738d0a fix(whatsapp): restore ack emoji identity fallback (#86697) · openclaw/openclaw@34d862d fix(imessage): send group media via attachment command · openclaw/openclaw@f322732 fix(test): harden plugin gauntlet proof · openclaw/openclaw@eab8d29 fix(release): stabilize beta validation after main rebase · openclaw/openclaw@9301598 refactor: use Rastermill for image processing (#86621) perf(discord): use libopus-wasm for voice opus fix(build): pin synthetic auth runtime dist entry (#86714) · openclaw/openclaw@3d06594 fix(plugin-sdk): preserve string-const unions as flat enum for deepse… · openclaw/openclaw@fddca99 fix(perf): bound session transcript stat fanout · openclaw/openclaw@2e6ba44 fix(test): bound plugin gauntlet prebuilds · openclaw/openclaw@6984a82 perf: speed up usage cost lookups · openclaw/openclaw@743bce2 Add OpenTelemetry LLM content spans (#86191) · openclaw/openclaw@f824e15 chore: remove unused tracked assets · openclaw/openclaw@592f192 fix(release): accept optional Discord voice decoder · openclaw/openclaw@8f1f790 fix(perf): tolerate passing filtered release gates · openclaw/openclaw@c410658 fix(release): stabilize beta validation tests · openclaw/openclaw@e049105 fix(ui): refresh raw copy i18n baseline · openclaw/openclaw@010a79b fix(packaging): bound dist inventory filesystem scans fix(test): remove image tool timeout slack · openclaw/openclaw@669df88 fix(cron): accept opaque session target keys · openclaw/openclaw@c9364f0 fix: honor skill source install aliases (#84842) · openclaw/openclaw@24d58af fix(test): avoid message tool bundled channel loads · openclaw/openclaw@6421808 test(onboard): guard docker e2e resources · openclaw/openclaw@80aa6d7 chore: bump OpenClaw to 2026.5.26 · openclaw/openclaw@d00d0a2 fix: stabilize discord voice receive recovery · openclaw/openclaw@321f06a perf: reduce session and auth cache hotpath work (#86678) · openclaw/openclaw@ee51169 fix(qa): stream gateway gauntlet prebuild output fix(cli): route plugin packaging recovery hints · openclaw/openclaw@56633e4 perf(agents): reuse model manifest context · openclaw/openclaw@ea2496b fix(diagnostics): expose missing telemetry signals (#86682) · openclaw/openclaw@ef8619d perf: avoid extra session snapshot cloning · openclaw/openclaw@71e9eaa fix: avoid compaction checkpoint transcript copies (#86666) · openclaw/openclaw@c59635a fix: preserve code mode failure output test: avoid message tool discovery in send helper · openclaw/openclaw@1514cc8 fix(scripts): bound guard inventory file reads · openclaw/openclaw@6defcb0 fix(test): isolate kitchen sink rpc home env feat(signal): support reaction approvals (#85894) fix(scripts): bound source scan file reads · openclaw/openclaw@57748a6 test(ollama): support cloud api live smoke · openclaw/openclaw@2a6b4ed test: serialize agents tools vitest files · openclaw/openclaw@978a2d0 fix(auto-reply): use context-aware overflow reserve hints (#84399) · openclaw/openclaw@3a4f2b1 feat(gateway): forward OpenAI sampling params (#84094) · openclaw/openclaw@6c7b3f3 perf: cache model cost indexes · openclaw/openclaw@068924e fix: hide unsupported best effort message option · openclaw/openclaw@5dc7043 refactor: reuse realtime output activity in google meet (#86665) fix(test): harden bundled plugin install sweep · openclaw/openclaw@84929e4 fix: prefer source public artifacts in source checkouts · openclaw/openclaw@c87957d test: type child process spawn mock · openclaw/openclaw@65a2105 test(installer): cover rocky cli installs · openclaw/openclaw@fe33747 docs: update changelog for landed fixes · openclaw/openclaw@da831e2 fix: dampen repeated device-required probes · openclaw/openclaw@399c692 fix(ui): keep local file markdown links inert · openclaw/openclaw@fc2d2d5 fix(update): avoid duplicate plugin smoke failures · openclaw/openclaw@342bde2 fix(gateway): cap retained compaction checkpoint bytes · openclaw/openclaw@d7361ef fix: stabilize tests and reduce plugin memory churn · openclaw/openclaw@c1a026a perf: reduce runtime metadata hotpath churn · openclaw/openclaw@1d21224 refactor: share realtime output activity tracking (#86661) fix(memory-wiki): bound compile page reads (#86660) · openclaw/openclaw@acbdb8c test(qa-matrix): use larger media coverage jpeg fix(cli): reject unknown command help roots (#81083) (thanks @YB0y) · openclaw/openclaw@bec7d56 test: improve test profiling helpers · openclaw/openclaw@68ab48b perf: reduce fuzzy matching allocations · openclaw/openclaw@ec7ad3b perf: reduce runtime cache churn · openclaw/openclaw@1531fe2 refactor: reuse forced consult coordinator in discord voice (#86656) · openclaw/openclaw@0164fd5 fix(scripts): drain codex-cli metadata stdout (#84239) (thanks @Iftek… fix(test): avoid discord voice tts activation tax · openclaw/openclaw@75ac0b5 fix(codex): disable native thread personality (#85891) (thanks @lastg… · openclaw/openclaw@0f35ec2 Refactor realtime voice turn context tracking (#86650) fix(discord): surface silent reply-delivery skips and remove runtime.… · openclaw/openclaw@3a48366 test(discord): cover deliver-lambda abort-skip path via processDiscor… · openclaw/openclaw@48adcb1 docs: update changelog for landed bug fixes · openclaw/openclaw@75c6cf2 test(qa-matrix): use valid media coverage jpeg · openclaw/openclaw@0f54221 fix(gmail-watcher): strip listeners from old process after settleProc… · openclaw/openclaw@0a38932 fix(gmail-watcher): prevent TDZ in settleProcess and guard exit handl… · openclaw/openclaw@94968c8 fix(hooks): stop existing Gmail watcher before re-entry to prevent leaks
fix(diagnostics): track model stream progress (#86757) · openclaw/openclaw@23e9bc8
clawsweeper · 2026-05-26 · via Recent Commits to openclaw:main

@@ -4,10 +4,16 @@ import {

44

onInternalDiagnosticEvent,

55

onTrustedInternalDiagnosticEvent,

66

resetDiagnosticEventsForTest,

7+

setDiagnosticsEnabledForProcess,

78

type DiagnosticEventPrivateData,

89

type DiagnosticEventPayload,

10+

waitForDiagnosticEventsDrained,

911

} from "../../../infra/diagnostic-events.js";

1012

import { createDiagnosticTraceContext } from "../../../infra/diagnostic-trace-context.js";

13+

import {

14+

getDiagnosticSessionActivitySnapshot,

15+

resetDiagnosticRunActivityForTest,

16+

} from "../../../logging/diagnostic-run-activity.js";

1117

import {

1218

initializeGlobalHookRunner,

1319

resetGlobalHookRunner,

@@ -100,11 +106,16 @@ function requireMockRecordArg(

100106

describe("wrapStreamFnWithDiagnosticModelCallEvents", () => {

101107

beforeEach(() => {

102108

resetDiagnosticEventsForTest();

109+

resetDiagnosticRunActivityForTest();

103110

resetGlobalHookRunner();

104111

});

105112106113

afterEach(() => {

114+

resetDiagnosticEventsForTest();

107115

resetGlobalHookRunner();

116+

resetDiagnosticRunActivityForTest();

117+

vi.restoreAllMocks();

118+

vi.useRealTimers();

108119

});

109120110121

it("emits started and completed events for async streams", async () => {

@@ -182,6 +193,117 @@ describe("wrapStreamFnWithDiagnosticModelCallEvents", () => {

182193

expect(JSON.stringify(events)).not.toContain("sk-test-secret-value");

183194

});

184195196+

it("updates diagnostic run activity from throttled stream chunks", async () => {

197+

let now = 1_000_000;

198+

vi.spyOn(Date, "now").mockImplementation(() => now);

199+

async function* stream() {

200+

yield { type: "text_delta", delta: "first" };

201+

yield { type: "text_delta", delta: "second" };

202+

yield { type: "text_delta", delta: "third" };

203+

}

204+

const runProgressEvents: DiagnosticEventPayload[] = [];

205+

const stop = onInternalDiagnosticEvent((event) => {

206+

if (event.type === "run.progress") {

207+

runProgressEvents.push(event);

208+

}

209+

});

210+

const wrapped = wrapStreamFnWithDiagnosticModelCallEvents(

211+

(() => stream()) as unknown as StreamFn,

212+

{

213+

runId: "run-1",

214+

sessionKey: "session-key",

215+

sessionId: "session-id",

216+

provider: "vllm",

217+

model: "qwen/qwen3.5-9b",

218+

trace: createDiagnosticTraceContext(),

219+

nextCallId: () => "call-stream",

220+

},

221+

);

222+223+

const returned = wrapped({} as never, {} as never, {} as never) as AsyncIterable<unknown>;

224+

const iterator = returned[Symbol.asyncIterator]();

225+226+

try {

227+

await iterator.next();

228+

await waitForDiagnosticEventsDrained();

229+

let snapshot = getDiagnosticSessionActivitySnapshot({

230+

sessionKey: "session-key",

231+

sessionId: "session-id",

232+

});

233+

expect(snapshot.activeWorkKind).toBe("model_call");

234+

expect(snapshot.lastProgressReason).toBe("model_call:stream_progress");

235+

expect(snapshot.lastProgressAgeMs).toBe(0);

236+

expect(runProgressEvents).toHaveLength(1);

237+238+

now += 10_000;

239+

await iterator.next();

240+

await waitForDiagnosticEventsDrained();

241+

snapshot = getDiagnosticSessionActivitySnapshot({

242+

sessionKey: "session-key",

243+

sessionId: "session-id",

244+

});

245+

expect(snapshot.lastProgressReason).toBe("model_call:stream_progress");

246+

expect(snapshot.lastProgressAgeMs).toBe(0);

247+

expect(runProgressEvents).toHaveLength(1);

248+249+

now += 30_000;

250+

await iterator.next();

251+

await waitForDiagnosticEventsDrained();

252+

snapshot = getDiagnosticSessionActivitySnapshot({

253+

sessionKey: "session-key",

254+

sessionId: "session-id",

255+

});

256+

expect(snapshot.lastProgressReason).toBe("model_call:stream_progress");

257+

expect(snapshot.lastProgressAgeMs).toBe(0);

258+

expect(runProgressEvents).toHaveLength(2);

259+

} finally {

260+

await iterator.return?.();

261+

await waitForDiagnosticEventsDrained();

262+

stop();

263+

}

264+

});

265+266+

it("does not retain stream progress activity when diagnostics are disabled", async () => {

267+

setDiagnosticsEnabledForProcess(false);

268+

const runProgressEvents: DiagnosticEventPayload[] = [];

269+

const stop = onInternalDiagnosticEvent((event) => {

270+

if (event.type === "run.progress") {

271+

runProgressEvents.push(event);

272+

}

273+

});

274+

async function* stream() {

275+

yield { type: "text_delta", delta: "first" };

276+

yield { type: "text_delta", delta: "second" };

277+

}

278+

const wrapped = wrapStreamFnWithDiagnosticModelCallEvents(

279+

(() => stream()) as unknown as StreamFn,

280+

{

281+

runId: "run-1",

282+

sessionKey: "session-key",

283+

sessionId: "session-id",

284+

provider: "vllm",

285+

model: "qwen/qwen3.5-9b",

286+

trace: createDiagnosticTraceContext(),

287+

nextCallId: () => "call-disabled-diagnostics",

288+

},

289+

);

290+291+

try {

292+

await drain(wrapped({} as never, {} as never, {} as never) as AsyncIterable<unknown>);

293+

await waitForDiagnosticEventsDrained();

294+

} finally {

295+

stop();

296+

}

297+298+

expect(

299+

getDiagnosticSessionActivitySnapshot({

300+

sessionKey: "session-key",

301+

sessionId: "session-id",

302+

}),

303+

).toEqual({});

304+

expect(runProgressEvents).toEqual([]);

305+

});

306+185307

it("counts async onPayload replacements instead of raw payload content", async () => {

186308

async function* stream() {

187309

yield { type: "text_delta", delta: "safe" };