fix: hide heartbeat tool prompts from chat history#76896
fix: hide heartbeat tool prompts from chat history#76896karbzclaw-web wants to merge 1 commit intoopenclaw:mainfrom
Conversation
|
Codex review: needs changes before merge. Summary Reproducibility: yes. Source inspection gives a high-confidence path: current main defines HEARTBEAT_RESPONSE_TOOL_PROMPT separately, while chat.history projection only passes HEARTBEAT_PROMPT into isHeartbeatUserMessage. Next step before merge Security Review findings
Review detailsBest possible solution: Land the shared Gateway filter and Control UI defense after adding one concise Unreleased Fixes changelog entry and letting exact-head CI finish cleanly. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection gives a high-confidence path: current main defines HEARTBEAT_RESPONSE_TOOL_PROMPT separately, while chat.history projection only passes HEARTBEAT_PROMPT into isHeartbeatUserMessage. Is this the best way to solve the issue? Yes. Updating the shared projection filter is the narrow maintainable fix for history, and the UI-side suppression is reasonable defense-in-depth; the remaining gap is release-note hygiene. Full review comments:
Overall correctness: patch is correct Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against a0e0bf58486d. |
e571a43 to
1d252f8
Compare
1d252f8 to
7a72bdf
Compare
byungskers
left a comment
There was a problem hiding this comment.
Nice cleanup of heartbeat noise in the chat history. The deduplication logic in "projectedHistoryDedupeKey" is a good addition. One minor note: the hardcoded "HEARTBEAT_USER_PROMPT_PREFIXES" array in the UI controller duplicates prefixes from heartbeat.ts — consider importing them from a shared source to avoid drift if heartbeat prompts evolve.
Fixes #58287.
Summary
openclaw-control-uisender label out of user-message display so local Control UI messages render asYou.Tests
corepack pnpm exec vitest run ui/src/ui/controllers/chat.test.ts ui/src/ui/chat/message-normalizer.test.ts src/auto-reply/heartbeat-filter.test.ts src/gateway/server-methods/server-methods.test.ts