Repository navigation
fix(heartbeat): harden commitment check-in delivery - #79504
Countermarch wants to merge 1 commit into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 7, 2026, 7:22 PM ET / 23:22 UTC. Summary PR surface: Source +15, Tests +12, Docs +1. Total +28 across 5 files. Reproducibility: yes. Current source shows the prompt lacks the proposed guard and replay filters delivery-mirror rows; the Mantis Telegram Desktop artifact for this head also reports the candidate still misses proactive check-in context. Review metrics: none identified. Stored data model 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:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review findings
Review detailsBest possible solution: Close this stale PR as superseded: Pause or close this branch. Close this stale conflicting branch and keep the remaining context work on the canonical tracker instead of merging a failed proof path. Do we have a high-confidence way to reproduce the issue? Yes. Current source shows the prompt lacks the proposed guard and replay filters delivery-mirror rows; the Mantis Telegram Desktop artifact for this head also reports the candidate still misses proactive check-in context. Is this the best way to solve the issue? No. The prompt hardening is a good narrow fix, but transcript-only mirroring is the wrong context layer because those rows are filtered before provider replay. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3dbe98a1f737. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +15, Tests +12, Docs +1. Total +28 across 5 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
|
2f7f5b8 to
4cf7f38
Compare
4cf7f38 to
e9d2c77
Compare
|
@clawsweeper re-review Added an Unreleased changelog entry and updated the PR body with redacted real behavior proof from a disposable local inferred-commitment heartbeat run. The proof shows the Telegram-equivalent send, sent commitment status, no visible think leak, and a delivery-mirror assistant entry appended to the source session transcript. |
|
Additional live behavior evidence from our production OpenClaw install, collected after the hot-patched runtime had been running most of a day. This is intentionally scoped: it supports the visible-output hardening portion of this PR, but it does not prove the transcript-mirroring portion yet. Live Setup
Observed RunA real heartbeat ran at Evidence from the heartbeat transcript
That final visible text did not include Telegram delivery evidence:
What This ProvesThis is real runtime evidence that a heartbeat alert can contain internal model reasoning in the transcript while the Telegram-visible delivery remains clean and alert-only. It supports the no-visible-reasoning/no-preamble hardening in this PR. What This Does Not Prove YetThis run does not prove the transcript-mirroring portion of the PR. The user reply came in as Telegram message So this live evidence should be treated as partial proof for the visible-output fix, and as confirmation that the mirror gap remains important. A separate controlled real-path run is still needed to prove the delivery-mirror behavior end to end. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Mantis Telegram Desktop ProofSummary: Mantis captured Telegram Desktop GIFs for a proactive check-in follow-up; this PR still replied without the check-in context.
Motion-trimmed clips: |




Summary
Commitment-only heartbeat runs use OpenClaw's built-in inferred-commitment prompt, which can bypass
HEARTBEAT.md. This hardens that path so inferred-commitment check-ins stay usable and conversation-aware.Problem
We observed Telegram receiving an inferred-commitment heartbeat message that began with visible reasoning:
The existing commitment prompt already tells the model not to mention commitment machinery, but it does not tell the model to suppress visible analysis/reasoning preambles. Deployments that add that guard in
HEARTBEAT.mdare still exposed because commitment-only runs can usebuildCommitmentHeartbeatPromptdirectly.There is also a follow-on usability gap: a visible heartbeat check-in can be delivered to Telegram without being mirrored into the source session transcript. When the user replies to that check-in in Telegram, the agent may not see the proactive message it is replying to.
Fix
buildCommitmentHeartbeatPrompt.HEARTBEAT_OK.Real Behavior Proof
Ran a disposable local heartbeat with a fake Telegram transport and redacted identifiers. The run used the real
runHeartbeatOncedelivery path, a pending inferred commitment scoped toagent:main:telegram:user-redacted, and a mocked model reply that verified the prompt contained the no-reasoning/no-thinkguard before returning a visible check-in.{ "result": { "status": "ran", "durationMs": 5198 }, "telegramSends": [ { "to": "redacted-chat-id", "text": "If the Travel Agent post is available, I can update the topic access.", "accountId": "primary" } ], "commitment": { "id": "cm_pr_proof", "status": "sent", "attempts": 1, "sentAtMs": 1778269543261 }, "transcript": { "fileBasename": "proof-session.jsonl", "hasDeliveryMirror": true, "hasVisibleCheckIn": true, "hasVisibleThinkLeak": false, "tail": [ { "type": "session" }, { "type": "message", "idempotencyKey": "heartbeat:commitments:agent:main:telegram:user-redacted:cm_pr_proof", "role": "assistant", "provider": "openclaw", "model": "delivery-mirror", "text": "If the Travel Agent post is available, I can update the topic access." } ] } }This demonstrates that the visible check-in is delivered to the Telegram-equivalent transport, does not include a visible
thinkleak, marks the commitment sent, and appends the same check-in as adelivery-mirrorassistant message to the source session transcript.Test Plan
pnpm test src/infra/heartbeat-runner.commitments.test.tspnpm check:changedNotes
I checked open PRs/issues first. There are several related thinking/reasoning leak fixes, and PR #75469 touches inferred-commitment heartbeat scheduling. PR #79502 mirrors Telegram outbound replies in another delivery path, but I did not find an open PR covering commitment heartbeat prompt leakage plus heartbeat delivery mirroring.