fix(heartbeat): suppress stream-error placeholders#97364
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 28, 2026, 1:25 AM ET / 05:25 UTC. Summary PR surface: Source +35, Tests +31. Total +66 across 2 files. Reproducibility: yes. at source level: current main treats repeated stream-error sentinel text as non-empty heartbeat reply text that can reach durable delivery. The linked issue supplies released-version field evidence, and the PR adds focused current-path regression coverage. Review metrics: none identified. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Next step before merge
Security Review detailsBest possible solution: Land the narrow heartbeat normalization fix after ordinary maintainer review, and leave broader provider fallback diagnostics and chat-history sentinel display work to their separate tracked items. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main treats repeated stream-error sentinel text as non-empty heartbeat reply text that can reach durable delivery. The linked issue supplies released-version field evidence, and the PR adds focused current-path regression coverage. Is this the best way to solve the issue? Yes: filtering the canonical sentinel in heartbeat normalization is the narrowest maintainable layer because channel delivery should not learn provider/session sentinel semantics and the persisted replay sentinel must remain intact. The PR also handles the important exec-completion fallback edge case so suppression is not undone later in the runner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 69af58ba2613. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +35, Tests +31. Total +66 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@openclaw-mantis telegram desktop proof: verify a heartbeat reply containing only repeated stream-error placeholder text is not delivered visibly, while normal heartbeat content still sends. |
Mantis Telegram Desktop ProofSummary: Mantis captured Telegram Desktop before/after GIFs showing the heartbeat placeholder message on Main and no new placeholder message on this PR.
Motion-trimmed clips: |
(cherry picked from commit b580258)




Closes #97357.
What Problem This Solves
Heartbeat fallback replies that echo only the internal stream-error sentinel are non-empty, so current main can normalize and deliver them as visible channel messages. This filters the placeholder-only heartbeat case before durable delivery while leaving the persisted replay sentinel untouched.
Summary
Evidence
src/infra/heartbeat-runner.tool-response.test.tscoverage showing a repeated sentinel heartbeat reply produces no Telegram send and records an ok-token heartbeat event.runHeartbeatOncepath and Telegram outbound adapter, with the network send hook recording attempts: