From 9bbce39df2d2aaf562f30e0f9f00255f968bcf54 Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Thu, 17 Sep 2026 11:31:05 +0000 Subject: [PATCH] chore(telegram): resolve the state-store test conflict and drop dead clamp helper Rebased onto main, which now carries an equivalent STATE_STORE_TOKEN isolation guard in state_store_client_test.go from an independent baseline repair. The two changes were the same fix expressed twice, so main's wording is kept and this branch's duplicate is dropped -- the file is now identical to main and no longer appears in the diff. That leaves one commit, touching only internal/channels/telegram/live.go. Removing clampToOneMessage, which this change orphaned: all three of its call sites were replaced with clampToRunes directly, and `unused` flagged it. Dead code left behind by a rewrite does not ship. --- internal/channels/telegram/live.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/internal/channels/telegram/live.go b/internal/channels/telegram/live.go index c1a34ba94..62ad78c45 100644 --- a/internal/channels/telegram/live.go +++ b/internal/channels/telegram/live.go @@ -725,14 +725,6 @@ func (l *liveReply) toolBlock() string { return clampToRunes(l.toolLines[len(l.toolLines)-1], liveToolMaxRunes) } -// clampToOneMessage cuts s to the tail that fits in a single Telegram -// message, marking the cut with a leading ellipsis. Counting runes rather -// than bytes matches how Telegram measures the limit and keeps the cut off a -// character boundary. -func clampToOneMessage(s string) string { - return clampToRunes(s, liveBodyMaxRunes) -} - // clampToRunes cuts s to its last maxRunes runes, marking the cut with a // leading ellipsis. func clampToRunes(s string, maxRunes int) string {