Repository navigation
fix(heartbeat): recognize HEARTBEAT_OK through reasoning blocks (fixes #95796) - #95965
ztexydt-cqh wants to merge 1 commit into
Conversation
8a72730 to
468bfc2
Compare
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: the bug is real, but this branch is a narrower duplicate of #95798, which is open, mergeable, proof-positive, and covers the same heartbeat ACK path plus the Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Close this duplicate and land one canonical heartbeat-filter fix via #95798, then close the linked bug report and remaining duplicate candidates after the fix lands. So I’m closing this here and keeping the remaining discussion on #95798. Review detailsBest possible solution: Close this duplicate and land one canonical heartbeat-filter fix via #95798, then close the linked bug report and remaining duplicate candidates after the fix lands. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows a reasoning/thinking block makes current-main Is this the best way to solve the issue? No. This PR touches the right classifier layer, but the better solution is the canonical open PR that also covers Security review: Security review cleared: The diff only changes deterministic heartbeat message classification and colocated tests, with no dependency, workflow, secret, permission, or code-execution surface changes. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against d1b917120a47. |
What Problem This Solves
isHeartbeatOkResponserejected heartbeat acknowledgements whenever the assistant message contained a non-text block such asreasoningorthinking, even when the visible text was justHEARTBEAT_OK. This causedfilterHeartbeatTranscriptArtifactsto leave heartbeat prompt/ack pairs in the transcript, inflating context and confusing the model.Why This Change Was Made
resolveMessageTexttreated every block other thantext/input_text/output_textas non-text content and madeisHeartbeatOkResponsebail out. Reasoning/thinking blocks are internal model artifacts, not user-visible content, so they should not prevent pruning a shortHEARTBEAT_OKack.User Impact
Users with models that emit reasoning/thinking blocks during heartbeat responses will no longer see those transient turns accumulate in the conversation context.
Evidence
src/auto-reply/heartbeat-filter.test.tscoveringreasoningandthinkingblocks paired withHEARTBEAT_OK.pnpm test src/auto-reply/heartbeat-filter.test.ts --runpasses locally.