fix(heartbeat): keep native chat compatibility fallback closed

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-11-04 09:27:51 -06:00
1 parent f14e6a2a62
commit 3a6ced46b0
2 files changed
+7

No files matched your search

@@ -408,6 +408,9 @@ describe("resolveHeartbeatRunResponse", () => {
expect(resolveHeartbeatRunResponse({ resultJson, nativeConversationFinalResponse: true,
existingComment: { id: "explicit", body: "The release is ready at /releases/latest." },
})).toMatchObject({ text: "The release is ready at /releases/latest.", decision: { commentAction: "reuse" } });
expect(resolveHeartbeatRunResponse({ resultJson, nativeConversationFinalResponse: true,
finalAgentMessage: { text: "Unknown narration", sourceEventId: "unknown", channel: "unknown" },
})).toMatchObject({ text: null, decision: { commentAction: "none" } });
}
});
@@ -585,6 +585,10 @@ export function resolveHeartbeatRunResponse(input: {
reasonCodes: [...final.decision.reasonCodes, "native_conversation_final_precedence"],
} };
}
if (!existingText) return {
text: null,
decision: decision("none", { commentAction: "none", reasonCodes: ["native_conversation_final_response_unavailable"] }),
};
}
if (input.existingComment && existingText) {
return {