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

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
G
Google Developers Blog
博客园 - 司徒正美
J
Java Code Geeks
aimingoo的专栏
aimingoo的专栏
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
T
The Blog of Author Tim Ferriss
D
Docker
大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
腾讯CDC
V
Visual Studio Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
C
Check Point Blog
M
MIT News - Artificial intelligence
Jina AI
Jina AI
I
InfoQ
雷峰网
雷峰网
The Cloudflare Blog
美团技术团队
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 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(ollama): preserve length-limited responses (#89160) ·...
joelnishanth · 2026-06-15 · via Recent Commits to openclaw:main

@@ -1400,6 +1400,26 @@ describe("runEmbeddedAgent incomplete-turn safety", () => {

14001400

lastAssistant: { stopReason: "end_turn" },

14011401

}),

14021402

).toBe(false);

1403+

expect(

1404+

isIncompleteTerminalAssistantTurn({

1405+

hasAssistantVisibleText: true,

1406+

lastAssistant: { stopReason: "length" },

1407+

}),

1408+

).toBe(true);

1409+

expect(

1410+

isIncompleteTerminalAssistantTurn({

1411+

hasAssistantVisibleText: true,

1412+

hasTerminalOutput: true,

1413+

lastAssistant: { stopReason: "length" },

1414+

}),

1415+

).toBe(false);

1416+

expect(

1417+

isIncompleteTerminalAssistantTurn({

1418+

hasAssistantVisibleText: true,

1419+

hasTerminalOutput: true,

1420+

lastAssistant: { stopReason: "toolUse" },

1421+

}),

1422+

).toBe(true);

14031423

});

1404142414051425

it("surfaces no-visible-answer recovery for app-server interrupted tool-only output", () => {

@@ -2567,6 +2587,109 @@ describe("runEmbeddedAgent incomplete-turn safety", () => {

25672587

expect(incompleteTurnText).toContain("couldn't generate a response");

25682588

});

256925892590+

it("surfaces incomplete-turn text for token-limited partial answers", () => {

2591+

const incompleteTurnText = resolveIncompleteTurnPayloadText({

2592+

payloadCount: 1,

2593+

aborted: false,

2594+

timedOut: false,

2595+

attempt: makeAttemptResult({

2596+

assistantTexts: ["Partial answer"],

2597+

lastAssistant: {

2598+

role: "assistant",

2599+

stopReason: "length",

2600+

provider: "ollama",

2601+

model: "qwen3.5",

2602+

content: [{ type: "text", text: "Partial answer" }],

2603+

} as unknown as EmbeddedRunAttemptResult["lastAssistant"],

2604+

}),

2605+

});

2606+2607+

expect(incompleteTurnText).toContain("couldn't generate a response");

2608+

});

2609+2610+

it("keeps complete visible stop turns successful", () => {

2611+

const incompleteTurnText = resolveIncompleteTurnPayloadText({

2612+

payloadCount: 1,

2613+

aborted: false,

2614+

timedOut: false,

2615+

attempt: makeAttemptResult({

2616+

assistantTexts: ["Complete answer"],

2617+

lastAssistant: {

2618+

role: "assistant",

2619+

stopReason: "stop",

2620+

provider: "ollama",

2621+

model: "qwen3.5",

2622+

content: [{ type: "text", text: "Complete answer" }],

2623+

} as unknown as EmbeddedRunAttemptResult["lastAssistant"],

2624+

}),

2625+

});

2626+2627+

expect(incompleteTurnText).toBeNull();

2628+

});

2629+2630+

it("preserves terminal tool media on token-limited turns", () => {

2631+

const incompleteTurnText = resolveIncompleteTurnPayloadText({

2632+

payloadCount: 1,

2633+

aborted: false,

2634+

timedOut: false,

2635+

attempt: makeAttemptResult({

2636+

assistantTexts: ["Partial answer"],

2637+

toolMediaUrls: ["file:///tmp/render.png"],

2638+

lastAssistant: {

2639+

role: "assistant",

2640+

stopReason: "length",

2641+

provider: "ollama",

2642+

model: "qwen3.5",

2643+

content: [{ type: "text", text: "Partial answer" }],

2644+

} as unknown as EmbeddedRunAttemptResult["lastAssistant"],

2645+

}),

2646+

});

2647+2648+

expect(incompleteTurnText).toBeNull();

2649+

});

2650+2651+

it("preserves tool media already delivered through block replies", () => {

2652+

const incompleteTurnText = resolveIncompleteTurnPayloadText({

2653+

payloadCount: 1,

2654+

aborted: false,

2655+

timedOut: false,

2656+

attempt: makeAttemptResult({

2657+

assistantTexts: ["Partial answer"],

2658+

hasToolMediaBlockReply: true,

2659+

lastAssistant: {

2660+

role: "assistant",

2661+

stopReason: "length",

2662+

provider: "ollama",

2663+

model: "qwen3.5",

2664+

content: [{ type: "text", text: "Partial answer" }],

2665+

} as unknown as EmbeddedRunAttemptResult["lastAssistant"],

2666+

}),

2667+

});

2668+2669+

expect(incompleteTurnText).toBeNull();

2670+

});

2671+2672+

it("preserves successful cron progress on token-limited turns", () => {

2673+

const incompleteTurnText = resolveIncompleteTurnPayloadText({

2674+

payloadCount: 1,

2675+

aborted: false,

2676+

timedOut: false,

2677+

attempt: makeAttemptResult({

2678+

assistantTexts: ["Partial answer"],

2679+

successfulCronAdds: 1,

2680+

lastAssistant: {

2681+

role: "assistant",

2682+

stopReason: "length",

2683+

provider: "ollama",

2684+

model: "qwen3.5",

2685+

content: [{ type: "text", text: "Partial answer" }],

2686+

} as unknown as EmbeddedRunAttemptResult["lastAssistant"],

2687+

}),

2688+

});

2689+2690+

expect(incompleteTurnText).toBeNull();

2691+

});

2692+25702693

it.each([

25712694

[

25722695

"heartbeat responses",