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

推荐订阅源

小众软件
小众软件
WordPress大学
WordPress大学
IT之家
IT之家
G
Google Developers Blog
Vercel News
Vercel News
阮一峰的网络日志
阮一峰的网络日志
博客园 - 三生石上(FineUI控件)
Engineering at Meta
Engineering at Meta
Martin Fowler
Martin Fowler
V
V2EX
爱范儿
爱范儿
Hugging Face - Blog
Hugging Face - Blog
Apple Machine Learning Research
Apple Machine Learning Research
B
Blog
V
Visual Studio Blog
有赞技术团队
有赞技术团队
I
InfoQ
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
月光博客
月光博客
J
Java Code Geeks
Stack Overflow Blog
Stack Overflow Blog
P
Proofpoint News Feed
云风的 BLOG
云风的 BLOG
雷峰网
雷峰网

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(auto-reply): suppress repeated silent tokens (#86848)...
Alix-007 · 2026-05-27 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -136,6 +136,7 @@ describe("AgentRuntimePlan", () => {

136136

expect(plan.auth.authProfileProviderForAuth).toBe("openai-codex");

137137

expect(plan.auth.harnessAuthProvider).toBe("openai-codex");

138138

expect(plan.auth.forwardedAuthProfileId).toBe("openai-codex:work");

139+

expect(plan.delivery.isSilentPayload({ text: "NO_REPLY\n\nNO_REPLY" })).toBe(true);

139140

expect(plan.delivery.isSilentPayload({ text: '{"action":"NO_REPLY"}' })).toBe(true);

140141

expect(

141142

plan.delivery.isSilentPayload({

Original file line numberDiff line numberDiff line change

@@ -152,6 +152,11 @@ describe("normalizeReplyPayload", () => {

152152

it("records skip reasons for silent/empty payloads", () => {

153153

const cases = [

154154

{ name: "silent", payload: { text: SILENT_REPLY_TOKEN }, reason: "silent" },

155+

{

156+

name: "repeated silent",

157+

payload: { text: `${SILENT_REPLY_TOKEN}\n\n${SILENT_REPLY_TOKEN}` },

158+

reason: "silent",

159+

},

155160

{ name: "empty", payload: { text: " " }, reason: "empty" },

156161

] as const;

157162

for (const testCase of cases) {

Original file line numberDiff line numberDiff line change

@@ -22,6 +22,11 @@ describe("isSilentReplyText", () => {

2222

expect(isSilentReplyText(" No_RePlY ")).toBe(true);

2323

});

2424
25+

it("returns true for repeated token-only text separated by whitespace", () => {

26+

expect(isSilentReplyText("NO_REPLY\n\nNO_REPLY")).toBe(true);

27+

expect(isSilentReplyText(" no_reply \t No_RePlY ")).toBe(true);

28+

});

29+
2530

it("returns false for undefined/empty", () => {

2631

expect(isSilentReplyText(undefined)).toBe(false);

2732

expect(isSilentReplyText("")).toBe(false);

@@ -87,6 +92,11 @@ describe("custom silent tokens", () => {

8792

check: () => isSilentReplyText("Checked inbox. HEARTBEAT_OK", "HEARTBEAT_OK"),

8893

expected: false,

8994

},

95+

{

96+

name: "repeated-token detection",

97+

check: () => isSilentReplyText("HEARTBEAT_OK\nHEARTBEAT_OK", "HEARTBEAT_OK"),

98+

expected: true,

99+

},

90100

{

91101

name: "trailing token stripping",

92102

check: () => stripSilentToken("done HEARTBEAT_OK", "HEARTBEAT_OK"),

Original file line numberDiff line numberDiff line change

@@ -13,7 +13,7 @@ function getSilentExactRegex(token: string): RegExp {

1313

return cached;

1414

}

1515

const escaped = escapeRegExp(token);

16-

const regex = new RegExp(`^\\s*${escaped}\\s*$`, "i");

16+

const regex = new RegExp(`^\\s*${escaped}(?:\\s+${escaped})*\\s*$`, "i");

1717

silentExactRegexByToken.set(token, regex);

1818

return regex;

1919

}

@@ -36,7 +36,7 @@ export function isSilentReplyText(

3636

if (!text) {

3737

return false;

3838

}

39-

// Match only the exact silent token with optional surrounding whitespace.

39+

// Match only token-only replies, including repeated tokens separated by whitespace.

4040

// This prevents substantive replies ending with NO_REPLY from being suppressed (#19537).

4141

return getSilentExactRegex(token).test(text);

4242

}

Original file line numberDiff line numberDiff line change

@@ -77,6 +77,7 @@ describe("normalizeReplyPayloadsForDelivery", () => {

7777

expect(

7878

normalizeReplyPayloadsForDelivery([

7979

{ text: "NO_REPLY" },

80+

{ text: "NO_REPLY\n\nNO_REPLY" },

8081

{ text: "Reasoning:\n_step_", isReasoning: true },

8182

{ text: "final answer" },

8283

]),

@@ -157,6 +158,7 @@ describe("normalizeReplyPayloadsForDelivery", () => {

157158

normalizeReplyPayloadsForDelivery([

158159

{ text: "NO_REPLY thanks for the update" },

159160

{ text: "NO_REPLY" },

161+

{ text: "NO_REPLY\n\nNO_REPLY" },

160162

{ text: "thanks NO_REPLY" },

161163

]),

162164

).toEqual([

Original file line numberDiff line numberDiff line change

@@ -574,7 +574,12 @@ describe("plugin-sdk subpath exports", () => {

574574

"createResolvedApproverActionAuthAdapter",

575575

"resolveApprovalApprovers",

576576

]);

577-

expectSourceMentions("reply-chunking", ["chunkText", "chunkTextWithMode"]);

577+

expectSourceMentions("reply-chunking", [

578+

"chunkText",

579+

"chunkTextWithMode",

580+

"isSilentReplyPayloadText",

581+

"isSilentReplyText",

582+

]);

578583

expectSourceMentions("reply-history", [

579584

"buildInboundHistoryFromEntries",

580585

"buildInboundHistoryFromMap",

@@ -1421,6 +1426,19 @@ describe("plugin-sdk subpath exports", () => {

14211426

}

14221427

});

14231428
1429+

it("keeps repeated silent-token semantics visible through the reply-chunking subpath", async () => {

1430+

const replyChunkingSdk = await importResolvedPluginSdkSubpath(

1431+

"openclaw/plugin-sdk/reply-chunking",

1432+

);

1433+
1434+

expect(replyChunkingSdk.isSilentReplyText("NO_REPLY\n\nNO_REPLY")).toBe(true);

1435+

expect(replyChunkingSdk.isSilentReplyPayloadText("NO_REPLY\n\nNO_REPLY")).toBe(true);

1436+

expect(replyChunkingSdk.isSilentReplyText("HEARTBEAT_OK\nHEARTBEAT_OK", "HEARTBEAT_OK")).toBe(

1437+

true,

1438+

);

1439+

expect(replyChunkingSdk.isSilentReplyText("Visible update\n\nNO_REPLY")).toBe(false);

1440+

});

1441+
14241442

it("keeps the Zalouser command-auth compatibility facade importable", () => {

14251443

expect(zalouserSdk.resolveSenderCommandAuthorization).toBe(

14261444

commandAuthSdk.resolveSenderCommandAuthorization,