fix(heartbeat): suppress no-op system event replies#73785
Conversation
Greptile SummaryThis PR refactors heartbeat reply suppression by centralizing no-op token detection into Confidence Score: 5/5Safe to merge — logic is straightforward, well-tested, and the behavioral change is intentional and correctly implemented. No P0 or P1 issues found. The sentinel detection is correctly gated, the early-return path in normalizeHeartbeatReply is sound, the removal of the old execFallbackText workaround is clean, and three new test cases validate all key scenarios. No files require special attention. Reviews (1): Last reviewed commit: "fix(heartbeat): suppress no-op system ev..." | Re-trigger Greptile |
7d4d936 to
4483377
Compare
|
Codex review: needs maintainer review before merge. Reviewed July 3, 2026, 4:57 PM ET / 20:57 UTC. Summary PR surface: Source +48, Tests +133, Other +1. Total +182 across 5 files. Reproducibility: yes. from source inspection: current main can strip a pure heartbeat token and then restore it through relayable exec fallback. I did not run a live current-main repro in this read-only pass. Review metrics: 1 noteworthy metric.
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:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Refresh the branch onto current main while preserving both no-op sentinel suppression and current internal-placeholder-only suppression, then rerun focused heartbeat and exact merge-head validation. Do we have a high-confidence way to reproduce the issue? Yes from source inspection: current main can strip a pure heartbeat token and then restore it through relayable exec fallback. I did not run a live current-main repro in this read-only pass. Is this the best way to solve the issue? Yes after refresh: fixing the heartbeat normalization/fallback boundary is narrower and more durable than prompt-only or channel-specific suppression. The conflicted branch cannot be treated as final until it is resolved against current main. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 010b61746379. Label changesLabel justifications:
Evidence reviewedPR surface: Source +48, Tests +133, Other +1. Total +182 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
|
4483377 to
2116d31
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
2116d31 to
49a3a14
Compare
49a3a14 to
50ec204
Compare
|
Updated for ClawSweeper’s asks:
Validation run:
@clawsweeper re-review Re-review progress:
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Updated the PR body with the exact real-behavior proof fields required by the policy and verified it locally with |
50ec204 to
bc82710
Compare
|
This pull request has been automatically marked as stale due to inactivity. |
Mantis Telegram Desktop ProofSummary: Mantis captured native Telegram Desktop before/after GIFs showing the no-op heartbeat reply is suppressed in this PR.
Motion-trimmed clips: |




Summary
HEARTBEAT_OK,NO_REPLY,NO_NEW_AUDIO, andSESSION_WATCHDOG_OKoutputs before deliveryorigin/mainFixes #73149.
Real behavior proof
Behavior or issue addressed: Heartbeat/system-event handoffs could visibly deliver no-op sentinel replies such as exact
HEARTBEAT_OK, while still needing to deliver meaningful exec/system-event summaries.Real environment tested: Local OpenClaw checkout for PR fix(heartbeat): suppress no-op system event replies #73785 on Linux/Node 22 after rebasing onto current
origin/mainat3de97057d0.Exact steps or command run after this patch: Ran
node --import tsx tmp/pr73785-runtime-proof.mjsfrom the patched checkout. The script imported the patchedrunHeartbeatOnce, used the real in-process system-event queue, registered the channel plugin send path with outbound capture, seeded a real file-backed session store, and exercised both cron-event and exec-event paths.Evidence after fix: Terminal output copied from the after-fix proof command:
{ "cron": { "name": "cron", "result": { "status": "ran", "durationMs": 27 }, "provider": "cron-event", "sent": [] }, "exec": { "name": "exec", "result": { "status": "ran", "durationMs": 1257 }, "provider": "exec-event", "sent": [ { "to": "[email protected]", "text": "Command completed: uploaded report.txt" } ] } }Observed result after fix: A cron-event reply of
HEARTBEAT_OK Watchdog cleanstayed in heartbeat-mode short-ack suppression and produced no outbound send. A meaningful exec-event reply still crossed the send boundary asCommand completed: uploaded report.txt.What was not tested: No real WhatsApp or Telegram message was sent; the proof used a dummy WhatsApp group id and captured the outbound send locally to avoid test noise in real channels.
Validation
CI=true pnpm exec oxfmt --check src/agents/model-runtime-policy.test.ts extensions/telegram/src/polling-session.ts src/auto-reply/tokens.ts src/infra/heartbeat-runner.ts src/infra/heartbeat-runner.respects-ackmaxchars-heartbeat-acks.test.tsCI=true pnpm exec oxlint src/agents/model-runtime-policy.test.ts extensions/telegram/src/polling-session.ts src/auto-reply/tokens.ts src/infra/heartbeat-runner.ts src/infra/heartbeat-runner.respects-ackmaxchars-heartbeat-acks.test.tsCI=true pnpm exec vitest run --config test/vitest/vitest.infra.config.ts src/infra/heartbeat-runner.respects-ackmaxchars-heartbeat-acks.test.ts— 16/16 passedCI=true pnpm check:test-typesgit diff --check