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

推荐订阅源

D
DataBreaches.Net
N
Netflix TechBlog - Medium
F
Fortinet All Blogs
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
宝玉的分享
宝玉的分享
Y
Y Combinator Blog
博客园 - 聂微东
WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
B
Blog RSS Feed
小众软件
小众软件
The GitHub Blog
The GitHub Blog
S
SegmentFault 最新的问题
Hugging Face - Blog
Hugging Face - Blog
Jina AI
Jina AI
Microsoft Azure Blog
Microsoft Azure Blog
V
V2EX
B
Blog
H
Help Net Security
D
Docker
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
罗磊的独立博客
月光博客
月光博客
博客园 - 司徒正美

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(heartbeat): skip reasoning payloads when selecting he...
tangtaizong6 · 2026-06-23 · via Recent Commits to openclaw:main

@@ -1286,6 +1286,15 @@ describe("runHeartbeatOnce", () => {

12861286

replies: [{ text: "Because it helps", isReasoning: true }, { text: "HEARTBEAT_OK" }],

12871287

expectedTexts: ["Thinking\n\n_Because it helps_"],

12881288

},

1289+

{

1290+

// Reasoning-only result: the selector returns no main reply, but the

1291+

// documented includeReasoning opt-in must still deliver the Thinking

1292+

// message instead of going silent (#92242 follow-up / review finding).

1293+

name: "raw flagged reasoning only (no main reply)",

1294+

caseDir: "hb-reasoning-only",

1295+

replies: [{ text: "Because it helps", isReasoning: true }],

1296+

expectedTexts: ["Thinking\n\n_Because it helps_"],

1297+

},

12891298

{

12901299

name: "visible final that starts with thinking prose",

12911300

caseDir: "hb-thinking-visible-final",

@@ -1371,6 +1380,67 @@ describe("runHeartbeatOnce", () => {

13711380

},

13721381

);

137313821383+

it("does not surface a trailing legacy reasoning payload as the reply when includeReasoning is unset", async () => {

1384+

// With includeReasoning unset, a legacy "Reasoning:"-prefixed payload after

1385+

// the final answer must not become the visible heartbeat reply, and no

1386+

// separate Thinking message is sent. (#92242 review follow-up)

1387+

const replySpy = vi.fn();

1388+

try {

1389+

const tmpDir = await createCaseDir("hb-legacy-reasoning-unset");

1390+

const storePath = path.join(tmpDir, "sessions.json");

1391+

const cfg: OpenClawConfig = {

1392+

agents: {

1393+

defaults: {

1394+

workspace: tmpDir,

1395+

heartbeat: { every: "5m", target: "whatsapp" },

1396+

},

1397+

},

1398+

channels: { whatsapp: { allowFrom: ["*"] } },

1399+

session: { store: storePath },

1400+

};

1401+

const sessionKey = resolveMainSessionKey(cfg);

1402+

await fs.writeFile(

1403+

storePath,

1404+

JSON.stringify({

1405+

[sessionKey]: {

1406+

sessionId: "sid",

1407+

updatedAt: Date.now(),

1408+

lastChannel: "whatsapp",

1409+

lastProvider: "whatsapp",

1410+

lastTo: "120363401234567890@g.us",

1411+

},

1412+

}),

1413+

);

1414+1415+

replySpy.mockResolvedValue([

1416+

{ text: "All clear" },

1417+

{ text: "Reasoning: because nothing changed" },

1418+

]);

1419+

const sendWhatsApp = vi

1420+

.fn<

1421+

(

1422+

to: string,

1423+

text: string,

1424+

opts?: unknown,

1425+

) => Promise<{ messageId: string; toJid: string }>

1426+

>()

1427+

.mockResolvedValue({ messageId: "m1", toJid: "jid" });

1428+1429+

await runHeartbeatOnce({

1430+

cfg,

1431+

deps: createHeartbeatDeps(sendWhatsApp, { getReplyFromConfig: replySpy }),

1432+

});

1433+1434+

expect(sendWhatsApp).toHaveBeenCalledTimes(1);

1435+

expectWhatsAppSendCall(sendWhatsApp, 0, {

1436+

to: "120363401234567890@g.us",

1437+

text: "All clear",

1438+

});

1439+

} finally {

1440+

replySpy.mockReset();

1441+

}

1442+

});

1443+13741444

it("loads the default agent session from templated stores", async () => {

13751445

const tmpDir = await createCaseDir("openclaw-hb");

13761446

const storeTemplate = path.join(tmpDir, "agents", "{agentId}", "sessions.json");