From 26cc2bd384edca43ed24ed4a719196f1d29f8484 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 11 Jan 2026 23:37:44 +0000 Subject: [PATCH] fix: land PR #733 (thanks @AbhisekBasu1) --- CHANGELOG.md | 1 + src/auto-reply/heartbeat.ts | 2 +- src/infra/heartbeat-runner.test.ts | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cdcc1eda9..a38ef217a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - Cron/CLI: trim model overrides on cron edits and document main-session guidance. (#711) — thanks @mjrussell. - Skills: bundle `skill-creator` to guide creating and packaging skills. - Discord: expose channel/category management actions in the message tool. (#730) — thanks @NicholasSpisak +- Docs: rename README “macOS app” section to “Apps”. (#733) — thanks @AbhisekBasu1. ### Fixes - Doctor: surface plugin diagnostics in the report. diff --git a/src/auto-reply/heartbeat.ts b/src/auto-reply/heartbeat.ts index c5d02576d..b9d0ff13b 100644 --- a/src/auto-reply/heartbeat.ts +++ b/src/auto-reply/heartbeat.ts @@ -59,7 +59,7 @@ export function stripHeartbeatToken( : maxAckCharsRaw; const maxAckChars = Math.max( 0, - Number.isFinite(parsedAckChars) + typeof parsedAckChars === "number" && Number.isFinite(parsedAckChars) ? parsedAckChars : DEFAULT_HEARTBEAT_ACK_MAX_CHARS, ); diff --git a/src/infra/heartbeat-runner.test.ts b/src/infra/heartbeat-runner.test.ts index 33bd24159..49b975a49 100644 --- a/src/infra/heartbeat-runner.test.ts +++ b/src/infra/heartbeat-runner.test.ts @@ -2,9 +2,6 @@ import fs from "node:fs/promises"; import os from "node:os"; import path from "node:path"; import { describe, expect, it, vi } from "vitest"; - -// Avoid pulling optional runtime deps during isolated runs. -vi.mock("jiti", () => ({ createJiti: () => () => ({}) })); import { HEARTBEAT_PROMPT } from "../auto-reply/heartbeat.js"; import * as replyModule from "../auto-reply/reply.js"; import type { ClawdbotConfig } from "../config/config.js"; @@ -20,6 +17,9 @@ import { } from "./heartbeat-runner.js"; import { resolveHeartbeatDeliveryTarget } from "./outbound/targets.js"; +// Avoid pulling optional runtime deps during isolated runs. +vi.mock("jiti", () => ({ createJiti: () => () => ({}) })); + describe("resolveHeartbeatIntervalMs", () => { it("returns default when unset", () => { expect(resolveHeartbeatIntervalMs({})).toBe(30 * 60_000);