Commit Graph

1622 Commits

Author SHA1 Message Date
Marvinthebored
b3b51b0c91 fix(anthropic): surface Discord pre-tool commentary
Route Anthropic pre-tool narration through the commentary progress lane, preserve shared channel progress defaults, and keep Discord/Telegram reasoning gates explicit.

Thanks @Marvinthebored!
2026-06-30 18:12:07 -07:00
Peter Lee
e1724474d6 test(telegram): add regression test for forum topic message_thread_id with streamed reasoning (#94526)
* test(telegram): add regression test for forum topic message_thread_id with streamed reasoning

After thorough code tracing of all delivery paths (draft stream, durable,
non-durable, preview hooks), the current main branch already correctly
passes message_thread_id through all paths for the streaming reasoning +
final answer scenario in forum topics. The bug reported in #89352 may have
been resolved by earlier merged changes (media-path preservation,
draft/progress streaming, etc.).

This commit adds a focused regression test covering the combined
scenario to prevent future regressions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(telegram): assert forum thread at draft-stream boundary for both lanes

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-30 17:58:00 -07:00
Vincent Koc
6528912e90 fix(telegram): recover stalled ingress spool claims
Backport of #97118 to release/2026.6.11.

(cherry picked from commit 8346e87808)
2026-06-30 15:54:11 -07:00
Ayaan Zaidi
86bdfec6b7 refactor(telegram): simplify album prompt selection 2026-06-30 10:45:44 -07:00
NianJiuZst
44f3c3e43a test(telegram): satisfy album context lint 2026-06-30 10:45:44 -07:00
NianJiuZst
bba63d3fe0 fix(telegram): omit skipped album context 2026-06-30 10:45:44 -07:00
NianJiuZst
9aec0f089b fix(telegram): hydrate album sibling media context 2026-06-30 10:45:44 -07:00
Jason (Json)
455f813d6e fix(telegram): deliver durable reasoning when enabled
Preserve shared reasoning suppression by default while letting Telegram opt into durable reasoning payloads only when it has a deliverable reasoning lane. Covers persistent /reasoning on, separate reasoning stream lanes, and progress-stream suppression.\n\nVerification:\n- node scripts/run-vitest.mjs src/auto-reply/reply/dispatch-from-config.test.ts extensions/telegram/src/bot-message-dispatch.test.ts\n- git diff --check upstream/main...HEAD\n- .agents/skills/autoreview/scripts/autoreview --mode branch --base upstream/main --stream-engine-output\n- CI run 28411526182 green, including QA Smoke CI and check-test-types\n- Real behavior proof run 28411676681 passed\n\nPR: #97875
2026-06-29 17:31:06 -07:00
moguangyu5-design
b28fcfe843 fix(telegram): fall back to plain text when rich message entity validation fails (#96642)
When Telegram rejects a rich message with RICH_MESSAGE_*_INVALID
(e.g., RICH_MESSAGE_EMAIL_INVALID on /status replies), the delivery
path now falls back to a plain text sendMessage instead of dropping
the reply.

Fixes #96363
2026-06-28 19:00:07 -07:00
llagy009
46434f0c71 fix(telegram): reject surrogate/out-of-range numeric HTML entities 2026-06-28 18:54:24 -07:00
linhongkuan
69b0604f31 fix(telegram): expose sender bot status in context (#96810)
* fix(telegram): expose sender bot status in context

* chore: retrigger PR checks

---------

Co-authored-by: lin-hongkuan <lin-hongkuan@users.noreply.github.com>
2026-06-28 18:40:06 -07:00
Shakker
1d4e7899a4 fix: preserve status model alias display 2026-06-29 00:37:49 +01:00
Ayaan Zaidi
52eb5946c7 fix(telegram): preserve literal reasoning tags 2026-06-28 15:49:03 -07:00
Ayaan Zaidi
bc2728c6b1 fix(telegram): track chunked outbound sends 2026-06-28 15:48:24 -07:00
Ayaan Zaidi
b5854c6f77 fix(telegram): preserve chunked bot replies 2026-06-28 15:48:24 -07:00
NIO
b948c86b2a fix(telegram): bound getChat Bot API response reads (#97274)
* fix(telegram): bound getChat Bot API response reads

* fix(telegram): repair getChat bound-read type and proof script lint

---------

Co-authored-by: NIO <nocodet@mail.com>
2026-06-28 12:29:14 -07:00
NIO
a07d59e014 fix(telegram): bound Bot API response reads to prevent OOM (#97271)
* fix(telegram): bound Bot API response reads to prevent OOM

* fix(scripts): make proof-telegram-bound.mjs lint-clean

---------

Co-authored-by: NIO <nocodet@mail.com>
2026-06-28 12:28:51 -07:00
Ayaan Zaidi
c52adf7505 test(telegram): cover retained preview chunk gaps 2026-06-27 12:30:57 -07:00
Ayaan Zaidi
199700de26 fix(telegram): replay retained preview gaps 2026-06-27 12:30:57 -07:00
miorbnli
ce15f348bb fix(telegram): use idempotent retry context for delete/reaction (#96612)
reactMessageTelegram and deleteMessageTelegram passed context: "send" to
isRecoverableTelegramNetworkError, which disables message-snippet matching
(allowMessageMatch defaults to false only for "send"). Both operations are
idempotent (setMessageReaction / deleteMessage are safe to repeat), yet a
transient snippet-only network error (e.g. "socket hang up", "undici network
error" with no error code) was not retried — stricter than polling/webhook/
unknown, which all default allowMessageMatch to true. Users saw spurious
reaction/delete failures on transient network errors.

Add delete | react to TelegramNetworkErrorContext (additive) and use them at
the two callers. The helper default (context !== "send") is unchanged, so
delete/react now match polling/webhook/unknown. sendMessage keeps "send".

Co-authored-by: Claude <noreply@anthropic.com>
2026-06-27 09:31:52 -07:00
Vincent Koc
b8e3de1160 fix(telegram): recover stalled ingress spool claims (#97118)
* fix(telegram): drain ingress with native queue claims

* fix(telegram): bound native claim drain snapshots

* fix(telegram): recover pid-reused ingress claims

* fix(channels): block claimed candidate lanes

* fix(telegram): recover stalled ingress spool claims

* test(telegram): cover native claimNext drain stalls

---------

Co-authored-by: Dallin Romney <dallinromney@gmail.com>
2026-06-27 09:14:14 -07:00
cornna
2100ee7cc8 fix(telegram): avoid duplicate dm chat window context (#89855)
Co-authored-by: Cornna <96944678+ymylive@users.noreply.github.com>
2026-06-27 07:29:57 -07:00
Peter Steinberger
072d3ed7b5 fix(telegram): retain socket failure context (#97130)
Co-authored-by: zhang-guiping <zhang.guiping@xydigit.com>
2026-06-27 02:11:36 +01:00
Josh Avant
db255b1154 Fix Telegram spooled claim refresh (#96962) 2026-06-26 01:30:57 -05:00
VACInc
13ecca5408 fix(telegram): back off session init spool retries 2026-06-25 13:41:57 -07:00
Ayaan Zaidi
a3b4e8102f test(telegram): fold draft preview surrogate clamp coverage 2026-06-25 09:10:07 -07:00
杨浩宇0668001029
4bd68aef65 fix(telegram): keep draft preview chunks surrogate-safe 2026-06-25 09:10:07 -07:00
张贵萍
56baf9d079 fix(outbound): reject reserved Telegram targets 2026-06-25 08:37:00 -07:00
Josh Lehman
7e2b2d2987 refactor: migrate bundled session metadata reads (#96527) 2026-06-24 12:19:53 -07:00
Josh Lehman
4c841ac575 refactor: remove Telegram session deps adapter (#96524)
* refactor: remove telegram session deps adapter

* test: update telegram session ratchet expectation
2026-06-24 11:37:19 -07:00
xingzhou
3217165be7 fix(telegram): preserve inline buttons for empty capabilities (#96468)
Merged via squash.

Prepared head SHA: 5e55b5dd30
Co-authored-by: zhangguiping-xydt <275915537+zhangguiping-xydt@users.noreply.github.com>
Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com>
Reviewed-by: @vincentkoc
2026-06-25 00:09:45 +08:00
Yufeng He
fa2379dbc8 fix(telegram): clip progress text on code-point boundaries to avoid lone surrogates (#96456)
Merged via squash.

Prepared head SHA: 765d6c08ac
Co-authored-by: he-yufeng <40085740+he-yufeng@users.noreply.github.com>
Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com>
Reviewed-by: @vincentkoc
2026-06-24 23:27:59 +08:00
杨浩宇0668001029
242fbf1a67 test(telegram): pass outbound sanitizer payload 2026-06-24 07:13:32 -07:00
杨浩宇0668001029
434d752dd6 fix(telegram): sanitize outbound tool traces 2026-06-24 07:13:32 -07:00
Ayaan Zaidi
f1e38f2ed6 fix(telegram): narrow rich table alignment surface 2026-06-24 06:41:38 -07:00
张贵萍0668001030
8150b76b6f fix(telegram): preserve rich table styling 2026-06-24 06:41:38 -07:00
张贵萍0668001030
77eb0fdbaa fix(telegram): preserve rich table styling 2026-06-24 06:41:38 -07:00
Ayaan Zaidi
2aa9d67635 refactor(telegram): simplify rich email entity detection 2026-06-24 06:23:08 -07:00
Kelaw - Keshav's Agent
51eec3a757 fix(telegram): skip rich entity detection for oauth emails 2026-06-24 06:23:08 -07:00
Josh Lehman
132d70bfb3 refactor: migrate bundled transcript target lookups (#89911) 2026-06-23 14:32:21 -07:00
Vincent Koc
aad78d399c test(extensions): use real response mocks 2026-06-23 22:00:32 +08:00
Josh Lehman
475252453b refactor: add transcript update identity contract (#89912) 2026-06-23 05:52:08 -07:00
Vincent Koc
013e33c6d3 fix(telegram): avoid duplicate progress headings 2026-06-22 21:43:47 +02:00
Moeed Ahmed
5cafe4b0cf fix(telegram): keep bot reply answers anchored to current message (#90475)
Co-authored-by: Moeed Ahmed <moeedahmed@Moeed-Mac-mini.local>
2026-06-22 19:17:07 +00:00
YEEE
e3a496a29a [agent] fix: repair telegram cache message types (#82909) 2026-06-22 18:04:28 +00:00
Ayaan Zaidi
dc09324ec2 fix(telegram): narrow live claim recovery 2026-06-22 11:25:58 +05:30
mikasa0818
3be0fe722a fix(telegram): recover stuck live-owned spool claims
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-22 11:25:58 +05:30
Ayaan Zaidi
a9a75b2b77 test(telegram): tighten spooled drain race proof 2026-06-22 11:08:03 +05:30
weiqinl
e29381a172 fix #86957: drain worker-spooled Telegram updates immediately
Wake the isolated polling drain immediately after a worker-spooled
update is written to channel_ingress_events, instead of waiting for
the next drain interval.

- Add requestImmediateDrain() calls after worker write and spooled message
- Track pending drain requests while drain is active (fix race condition)
- Add regression test for updates arriving during active drain

Fixes #86957.
2026-06-22 11:08:03 +05:30
Ayaan Zaidi
b3b8b289dd test(telegram): keep live polling leases protected (#93378) (thanks @mmyzwl) 2026-06-22 11:05:06 +05:30