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

推荐订阅源

V
Visual Studio Blog
Y
Y Combinator Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Hugging Face - Blog
Hugging Face - Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Cloudflare Blog
L
LangChain Blog
美团技术团队
N
Netflix TechBlog - Medium
量子位
酷 壳 – CoolShell
酷 壳 – CoolShell
B
Blog
博客园 - 司徒正美
爱范儿
爱范儿
D
DataBreaches.Net
月光博客
月光博客
U
Unit 42
B
Blog RSS Feed
Engineering at Meta
Engineering at Meta
Apple Machine Learning Research
Apple Machine Learning Research
Jina AI
Jina AI
MongoDB | Blog
MongoDB | Blog
腾讯CDC

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: tighten diagnostic logger assertions · openclaw/ope...
steipete · 2026-05-11 · via Recent Commits to openclaw:main

@@ -111,6 +111,21 @@ function requireFirstMockCallArg(mock: unknown, label: string) {

111111

return requireRecord(call[0], `${label} argument`);

112112

}

113113114+

function loggerMessages(spy: unknown): string[] {

115+

const calls = (spy as { mock?: { calls?: unknown[][] } }).mock?.calls ?? [];

116+

return calls

117+

.map((call) => call[0])

118+

.filter((message): message is string => typeof message === "string");

119+

}

120+121+

function expectLoggerMessageContaining(spy: unknown, text: string): void {

122+

expect(loggerMessages(spy).some((message) => message.includes(text))).toBe(true);

123+

}

124+125+

function expectNoLoggerMessageContaining(spy: unknown, text: string): void {

126+

expect(loggerMessages(spy).some((message) => message.includes(text))).toBe(false);

127+

}

128+114129

function expectRecoveryCall(

115130

recoverStuckSession: unknown,

116131

fields: Record<string, unknown>,

@@ -434,10 +449,8 @@ describe("stuck session diagnostics threshold", () => {

434449

reason: "active_work_without_progress",

435450

activeWorkKind: "embedded_run",

436451

});

437-

expect(warnSpy).toHaveBeenCalledWith(

438-

expect.stringContaining("lastProgress=embedded_run:started"),

439-

);

440-

expect(warnSpy).toHaveBeenCalledWith(expect.stringContaining("lastProgressAge=60s"));

452+

expectLoggerMessageContaining(warnSpy, "lastProgress=embedded_run:started");

453+

expectLoggerMessageContaining(warnSpy, "lastProgressAge=60s");

441454

expect(recoverStuckSession).not.toHaveBeenCalled();

442455

});

443456

@@ -467,7 +480,7 @@ describe("stuck session diagnostics threshold", () => {

467480

unsubscribe();

468481

}

469482470-

expect(warnSpy).toHaveBeenCalledWith(expect.stringContaining("terminalProgressStale=true"));

483+

expectLoggerMessageContaining(warnSpy, "terminalProgressStale=true");

471484

expectRecordFields(

472485

requireRecord(

473486

events.findLast((event) => event.type === "session.stalled"),

@@ -554,13 +567,19 @@ describe("stuck session diagnostics threshold", () => {

554567

}

555568556569

expect(recoverStuckSession).not.toHaveBeenCalled();

557-

expect(events.findLast((event) => event.type === "session.stalled")).toMatchObject({

558-

classification: "blocked_tool_call",

559-

reason: "blocked_tool_call",

560-

activeWorkKind: "tool_call",

561-

activeToolName: "bash",

562-

activeToolCallId: "cmd-1",

563-

});

570+

expectRecordFields(

571+

requireRecord(

572+

events.findLast((event) => event.type === "session.stalled"),

573+

"stalled event",

574+

),

575+

{

576+

classification: "blocked_tool_call",

577+

reason: "blocked_tool_call",

578+

activeWorkKind: "tool_call",

579+

activeToolName: "bash",

580+

activeToolCallId: "cmd-1",

581+

},

582+

);

564583

});

565584566585

it("uses diagnostics.stuckSessionAbortMs for stalled active-work recovery", () => {

@@ -773,7 +792,7 @@ describe("stuck session diagnostics threshold", () => {

773792

reason: "active_work",

774793

activeWorkKind: "embedded_run",

775794

});

776-

expect(warnSpy).not.toHaveBeenCalledWith(expect.stringContaining("long-running session:"));

795+

expectNoLoggerMessageContaining(warnSpy, "long-running session:");

777796

expect(recoverStuckSession).not.toHaveBeenCalled();

778797

});

779798

@@ -950,7 +969,7 @@ describe("stuck session diagnostics threshold", () => {

950969

}

951970952971

expect(events).toContain("diagnostic.liveness.warning");

953-

expect(warnSpy).not.toHaveBeenCalledWith(expect.stringContaining("liveness warning:"));

972+

expectNoLoggerMessageContaining(warnSpy, "liveness warning:");

954973

expect(emitMemorySample).toHaveBeenLastCalledWith({ emitSample: true });

955974

requireMatchingRecord(

956975

getDiagnosticStabilitySnapshot({ limit: 10 }).events,

@@ -995,7 +1014,7 @@ describe("stuck session diagnostics threshold", () => {

9951014

logMessageQueued({ sessionId: "s1", sessionKey: "main", source: "test" });

9961015

vi.advanceTimersByTime(30_000);

9971016998-

expect(warnSpy).toHaveBeenCalledWith(expect.stringContaining("liveness warning:"));

1017+

expectLoggerMessageContaining(warnSpy, "liveness warning:");

9991018

requireMatchingRecord(

10001019

getDiagnosticStabilitySnapshot({ limit: 10 }).events,

10011020

{

@@ -1052,8 +1071,8 @@ describe("stuck session diagnostics threshold", () => {

10521071

unsubscribe();

10531072

}

105410731055-

expect(warnSpy).toHaveBeenCalledWith(expect.stringContaining("phase=startup.plugins.load"));

1056-

expect(warnSpy).toHaveBeenCalledWith(expect.stringContaining("work=[queued=main("));

1074+

expectLoggerMessageContaining(warnSpy, "phase=startup.plugins.load");

1075+

expectLoggerMessageContaining(warnSpy, "work=[queued=main(");

10571076

const warning = requireRecord(

10581077

events.findLast((event) => event.type === "diagnostic.liveness.warning"),

10591078

"liveness warning event",

@@ -1092,7 +1111,7 @@ describe("stuck session diagnostics threshold", () => {

10921111

logSessionStateChange({ sessionId: "s1", sessionKey: "main", state: "processing" });

10931112

vi.advanceTimersByTime(30_000);

109411131095-

expect(warnSpy).not.toHaveBeenCalledWith(expect.stringContaining("liveness warning:"));

1114+

expectNoLoggerMessageContaining(warnSpy, "liveness warning:");

10961115

requireMatchingRecord(

10971116

getDiagnosticStabilitySnapshot({ limit: 10 }).events,

10981117

{

@@ -1132,7 +1151,7 @@ describe("stuck session diagnostics threshold", () => {

11321151

logMessageQueued({ sessionId: "s1", sessionKey: "main", source: "test" });

11331152

vi.advanceTimersByTime(30_000);

113411531135-

expect(warnSpy).toHaveBeenCalledWith(expect.stringContaining("liveness warning:"));

1154+

expectLoggerMessageContaining(warnSpy, "liveness warning:");

11361155

});

1137115611381157

it("throttles repeated liveness warnings", () => {