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

推荐订阅源

有赞技术团队
有赞技术团队
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
IT之家
IT之家
博客园 - 【当耐特】
罗磊的独立博客
Stack Overflow Blog
Stack Overflow Blog
MyScale Blog
MyScale Blog
WordPress大学
WordPress大学
The GitHub Blog
The GitHub Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Hugging Face - Blog
Hugging Face - Blog
I
InfoQ
B
Blog RSS Feed
腾讯CDC
云风的 BLOG
云风的 BLOG
N
Netflix TechBlog - Medium
Apple Machine Learning Research
Apple Machine Learning Research
GbyAI
GbyAI
雷峰网
雷峰网
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
D
DataBreaches.Net
The Cloudflare Blog
V
V2EX
S
SegmentFault 最新的问题

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: dedupe incomplete turn attempt reads · openclaw/ope...
steipete · 2026-05-13 · via Recent Commits to openclaw:main

@@ -61,6 +61,14 @@ describe("runEmbeddedPiAgent incomplete-turn safety", () => {

6161

expect(warnMessages().join("\n")).not.toContain(text);

6262

}

636364+

function runAttemptCall(index: number): { prompt?: string } {

65+

const call = mockedRunEmbeddedAttempt.mock.calls[index];

66+

if (!call) {

67+

throw new Error(`Expected run embedded attempt call ${index}`);

68+

}

69+

return call[0] as { prompt?: string };

70+

}

71+6472

it("emits the before_agent_run hook block message as the agent payload", async () => {

6573

mockedRunEmbeddedAttempt.mockResolvedValueOnce(

6674

makeAttemptResult({

@@ -437,7 +445,7 @@ describe("runEmbeddedPiAgent incomplete-turn safety", () => {

437445

});

438446439447

expect(mockedRunEmbeddedAttempt).toHaveBeenCalledTimes(2);

440-

const secondCall = mockedRunEmbeddedAttempt.mock.calls.at(1)?.[0] as { prompt?: string };

448+

const secondCall = runAttemptCall(1);

441449

expect(secondCall.prompt).toContain(REASONING_ONLY_RETRY_INSTRUCTION);

442450

expectWarnMessageWith("reasoning-only assistant turn detected");

443451

});

@@ -472,7 +480,7 @@ describe("runEmbeddedPiAgent incomplete-turn safety", () => {

472480

});

473481474482

expect(mockedRunEmbeddedAttempt).toHaveBeenCalledTimes(1);

475-

const onlyCall = mockedRunEmbeddedAttempt.mock.calls.at(0)?.[0] as { prompt?: string };

483+

const onlyCall = runAttemptCall(0);

476484

expect(onlyCall.prompt).not.toContain(REASONING_ONLY_RETRY_INSTRUCTION);

477485

expect(onlyCall.prompt).not.toContain(EMPTY_RESPONSE_RETRY_INSTRUCTION);

478486

expectNoWarnMessageWith("reasoning-only assistant turn detected");

@@ -641,7 +649,7 @@ describe("runEmbeddedPiAgent incomplete-turn safety", () => {

641649

});

642650643651

expect(mockedRunEmbeddedAttempt).toHaveBeenCalledTimes(2);

644-

const secondCall = mockedRunEmbeddedAttempt.mock.calls.at(1)?.[0] as { prompt?: string };

652+

const secondCall = runAttemptCall(1);

645653

expect(secondCall.prompt).toContain(REASONING_ONLY_RETRY_INSTRUCTION);

646654

expectWarnMessageWith("reasoning-only assistant turn detected");

647655

});

@@ -681,7 +689,7 @@ describe("runEmbeddedPiAgent incomplete-turn safety", () => {

681689

});

682690683691

expect(mockedRunEmbeddedAttempt).toHaveBeenCalledTimes(2);

684-

const secondCall = mockedRunEmbeddedAttempt.mock.calls.at(1)?.[0] as { prompt?: string };

692+

const secondCall = runAttemptCall(1);

685693

expect(secondCall.prompt).toContain(EMPTY_RESPONSE_RETRY_INSTRUCTION);

686694

expectWarnMessageWith("empty response detected");

687695

});

@@ -735,7 +743,7 @@ describe("runEmbeddedPiAgent incomplete-turn safety", () => {

735743

});

736744737745

expect(mockedRunEmbeddedAttempt).toHaveBeenCalledTimes(2);

738-

const secondCall = mockedRunEmbeddedAttempt.mock.calls.at(1)?.[0] as { prompt?: string };

746+

const secondCall = runAttemptCall(1);

739747

expect(secondCall.prompt).toContain(EMPTY_RESPONSE_RETRY_INSTRUCTION);

740748

expectWarnMessageWith("empty response detected");

741749

});

@@ -804,7 +812,7 @@ describe("runEmbeddedPiAgent incomplete-turn safety", () => {

804812

});

805813806814

expect(mockedRunEmbeddedAttempt).toHaveBeenCalledTimes(2);

807-

const secondCall = mockedRunEmbeddedAttempt.mock.calls.at(1)?.[0] as { prompt?: string };

815+

const secondCall = runAttemptCall(1);

808816

expect(secondCall.prompt).toContain(EMPTY_RESPONSE_RETRY_INSTRUCTION);

809817

expectWarnMessageWith("empty response detected");

810818

});

@@ -1923,7 +1931,7 @@ describe("runEmbeddedPiAgent incomplete-turn safety", () => {

19231931

});

1924193219251933

expect(mockedRunEmbeddedAttempt).toHaveBeenCalledTimes(1);

1926-

const onlyCall = mockedRunEmbeddedAttempt.mock.calls.at(0)?.[0] as { prompt?: string };

1934+

const onlyCall = runAttemptCall(0);

19271935

expect(onlyCall.prompt).not.toContain(REASONING_ONLY_RETRY_INSTRUCTION);

19281936

expect(onlyCall.prompt).not.toContain(EMPTY_RESPONSE_RETRY_INSTRUCTION);

19291937

expect(result.payloads).toEqual([{ text: "NO_REPLY" }]);