Track full dispatch completion separately for error handling and shutdown drain while allowing same-session follow-ups to steer active runs. Fixes#113180.
Co-authored-by: Taksh <takshkothari09@gmail.com>
* fix(signal): escape real newlines in inbound verbose-log preview
The inbound preview regex matched the literal two-character sequence
backslash-n instead of the actual LF control character, so multi-line
message bodies kept real newlines and split the single-line log record.
Align Signal with the six sibling channels that use replace(/\n/g, "\\n").
Adds a focused test that mocks shouldLogVerbose and asserts the logged
preview stays single-line for an LF-separated body.
* chore: retrigger CI to clear stale checks
* fix(signal): escape all inbound log line breaks
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Use the existing surrogate-safe helpers at the dreaming lead and heading boundaries. Preserve contributor investigations in #107882 and #107910.
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Publish the existing Slack route-based doctor capabilities in channel metadata so cold doctor scans no longer falsely report dropped messages or recommend schema-invalid sender allowlists. Add metadata-only discovery regression. Fixes#110489; thanks @ari-hjunk for the report.
* fix(slack): make MPIM app mentions type-safe
Resolve typeless app mentions through explicit metadata, the scoped event cache, then conversations.info so modern C-prefixed MPIMs cannot be misclassified by event ordering. Add a real Slack QA scenario that requires one reply and cleans up its temporary MPIM.
Co-authored-by: moeealii <75953662+moeealii@users.noreply.github.com>
* fix(slack): type unresolved mention metadata
* fix(slack): satisfy MPIM type contracts
---------
Co-authored-by: moeealii <75953662+moeealii@users.noreply.github.com>
* fix(telegram): surface draft stream delivery failures at warn level
createTelegramDraftController wired the draft stream's warn callback to
logVerbose, so preview send/edit/cleanup failures ("telegram stream
preview failed: ...", "telegram stream preview cleanup failed: ...")
were only emitted when verbose logging was enabled. In the default
configuration a dying preview/draft stream left no operator-visible
trace: the bot just went quiet, especially in progress stream mode
where the activity window is the only delivery surface.
Route the warn callback through the telegram subsystem logger
(telegram/draft-stream) at warn level with lane, chatId, and threadId
context so draft delivery failures show up in default logs. The
verbose log callback is unchanged.
Co-authored-by: Claude <noreply@anthropic.com>
* test(telegram): simplify draft warning logger proof
Co-authored-by: Arseniy Palagin <valeradzigurda3@gmail.com>
* fix(telegram): emit draft terminal delivery diagnostics
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d1bd0f71-7638-463a-958d-d5b3e2da1047
* fix(telegram): keep draft visibility change scoped
Remove the diagnostic expansion so this contributor PR remains focused on its original warn-level logging repair.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d1bd0f71-7638-463a-958d-d5b3e2da1047
---------
Co-authored-by: Arseniy Palagin <valeradzigurda3@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Gio Della-Libera <giodl73@gmail.com>
Copilot-Session: d1bd0f71-7638-463a-958d-d5b3e2da1047
app_mention events carry no channel_type, and modern Slack group DMs
(mpims) use C-prefixed channel ids, so prefix inference classifies them
as channels. Mentions in group DMs then bypass the handler's im/mpim
dedupe guard and are processed down the channel path — misrouting
replies, and double-handling alongside message.mpim when dm.groupEnabled
is on.
Confirm against the event-carried type cache and, on a miss, the cached
conversations.info lookup before treating a channel_type-less mention as
a channel mention. Only an authoritative "mpim" answer changes behavior;
a C-prefixed id can never be an im.
Fixes#115463
Co-authored-by: moeealii <>
The previous commit patched me.id into 13 contexts in one suite. That treated the
symptom: the harness itself never passes botInfo, so resolveBotUserId has no
fallback when a test ctx carries only a username.
Fix the harness instead. Production always builds the bot from getMe(), so
botInfo is present in every real path; supplying telegramBotInfoForTest matches
that and drops the per-context ids.
Also revives bot.media.stickers-and-fragments.e2e.test.ts, which shares the
harness and failed 3/6 for the same reason and was not covered before.
The other ~84 bare me literals across 8 Telegram suites are fine: those tests
supply botInfo through their own harnesses. Verified, 371 pass, so no sweep.
PR #115401 fixed the album split by separating durable claim lifetime from lane
occupancy (deferredLaneOccupancy="release"), and stated the same change repairs
the text/forwarded-message debounce, which defers its spooled participant the
same way. The album path got a durable-drain regression test; the debounce path
did not, because the suite that would cover it fails 10/10 on main.
Restore that suite: its harness supplies me.username without me.id, which
resolveBotUserId has required since #114532. Production grammY populates ctx.me
from getMe(), so this is harness drift, not a runtime gap.
Then extend the durable-ingress regression file to both buffers and rename it
off media-group. Two new tests admit a forwarded burst through the spool and
core drain, live and from a restart backlog, asserting one turn carrying both
notes plus independent tombstones.
Both fail with deferredLaneOccupancy reverted to "hold" (second note lands in a
separate turn), so they pin the lane contract rather than restate it.