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

推荐订阅源

L
LangChain Blog
N
Netflix TechBlog - Medium
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
V
V2EX
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Blog — PlanetScale
Blog — PlanetScale
Microsoft Security Blog
Microsoft Security Blog
D
Docker
WordPress大学
WordPress大学
罗磊的独立博客
J
Java Code Geeks
博客园 - 【当耐特】
博客园 - 司徒正美
雷峰网
雷峰网
H
Help Net Security
酷 壳 – CoolShell
酷 壳 – CoolShell
Last Week in AI
Last Week in AI
宝玉的分享
宝玉的分享
Martin Fowler
Martin Fowler
T
Tailwind CSS Blog
Google DeepMind News
Google DeepMind News
M
MIT News - Artificial intelligence
Recent Announcements
Recent Announcements
B
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(heartbeat): suppress metadata-only exec completion no...
steipete · 2026-04-30 · via Recent Commits to openclaw:main

@@ -4,6 +4,7 @@ import {

44

buildExecEventPrompt,

55

isCronSystemEvent,

66

isExecCompletionEvent,

7+

isRelayableExecCompletionEvent,

78

} from "./heartbeat-events-filter.js";

89910

describe("heartbeat event prompts", () => {

@@ -75,6 +76,24 @@ describe("heartbeat event prompts", () => {

7576

expected: ["no command output was found", "Reply HEARTBEAT_OK only"],

7677

unexpected: ["Please relay the command output to the user", "system messages above"],

7778

},

79+

{

80+

name: "suppresses metadata-only successful exec completions",

81+

events: ["Exec completed (abc12345, code 0)"],

82+

opts: undefined,

83+

expected: ["no command output was found", "Reply HEARTBEAT_OK only"],

84+

unexpected: ["Please relay the command output to the user", "abc12345"],

85+

},

86+

{

87+

name: "reports metadata-only failed exec completions without asking for logs",

88+

events: ["Exec failed (abc12345, code 1)"],

89+

opts: undefined,

90+

expected: [

91+

"without captured stdout/stderr",

92+

"include the exit status or signal",

93+

"Do not ask the user to provide missing logs",

94+

],

95+

unexpected: ["Please relay the command output to the user"],

96+

},

7897

])("$name", ({ events, opts, expected, unexpected }) => {

7998

const prompt = buildExecEventPrompt(events, opts);

8099

for (const part of expected) {

@@ -98,7 +117,9 @@ describe("heartbeat event classification", () => {

98117

{ value: "exec finished: ok", expected: true },

99118

{ value: "Exec finished (node=abc, code 0)", expected: true },

100119

{ value: "Exec Finished (node=abc, code 1)", expected: true },

120+

{ value: "Exec completed (abc12345, code 0)", expected: true },

101121

{ value: "Exec completed (abc12345, code 0) :: some output", expected: true },

122+

{ value: "Exec failed (abc12345, code 1)", expected: true },

102123

{ value: "Exec failed (abc12345, signal SIGTERM) :: error output", expected: true },

103124

{ value: "Exec completed (rotate api keys)", expected: false },

104125

{ value: "Exec failed: notify me if this happens", expected: false },

@@ -119,11 +140,23 @@ describe("heartbeat event classification", () => {

119140

{ value: "heartbeat wake: noop", expected: false },

120141

{ value: "exec finished: ok", expected: false },

121142

{ value: "Exec finished (node=abc, code 0)", expected: false },

143+

{ value: "Exec completed (abc12345, code 0)", expected: false },

122144

{ value: "Exec completed (abc12345, code 0) :: some output", expected: false },

145+

{ value: "Exec failed (abc12345, code 1)", expected: false },

123146

{ value: "Exec failed (abc12345, signal SIGTERM) :: error output", expected: false },

124147

{ value: "Exec completed (rotate api keys)", expected: true },

125148

{ value: "Reminder: if exec failed, notify me", expected: true },

126149

])("classifies cron system events for %j", ({ value, expected }) => {

127150

expect(isCronSystemEvent(value)).toBe(expected);

128151

});

152+153+

it.each([

154+

{ value: "Exec completed (abc12345, code 0)", expected: false },

155+

{ value: "Exec completed (abc12345, code 0) :: some output", expected: true },

156+

{ value: "Exec failed (abc12345, code 1)", expected: true },

157+

{ value: "Exec failed (abc12345, signal SIGTERM)", expected: true },

158+

{ value: "exec finished: ok", expected: true },

159+

])("classifies relayable exec completion events for %j", ({ value, expected }) => {

160+

expect(isRelayableExecCompletionEvent(value)).toBe(expected);

161+

});

129162

});