Skip to content

fix(overnight): say when the Telegram report could not be sent - #1174

Draft
sosidudku1 wants to merge 2 commits into
mainfrom
fix/ato-1358-overnight-telegram-lock
Draft

sosidudku1 wants to merge 2 commits into
mainfrom
fix/ato-1358-overnight-telegram-lock

Conversation

@sosidudku1

@sosidudku1 sosidudku1 commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

What

overnight --notify telegram queues its report in memory until its own Telegram channel is up. When the desktop app or the TUI holds telegram.lock, the channel never comes up in the overnight process, which then exits, and the report is gone without a word.

Before exiting, overnight now gives a channel that is still connecting up to 15 s. If the report is still waiting, or was dropped at once because no bot token is set up, or Telegram is turned off in this agent's settings, it prints why it was not sent (naming the other agent that holds Telegram) and where to read the result. TelegramChannel.hasPendingTaskReport(taskId) is the new read it uses.

Why

Linear: ATO-1358, option "say so at the end of the run". Delivering through the process that holds the lock is a larger change (the lock holder would have to poll for handed-off reports) and is left as a follow-up.

Touches the same lines in overnight-command.ts and overnight-progress.ts as the PR for ATO-1323; whichever merges second needs a small rebase.

How it was verified

  • New tests in overnight-progress.test.ts (the message) and telegram-channel.test.ts (hasPendingTaskReport before and after the flush).
  • Not checked live: the issue's scenario (desktop with Telegram plus a short overnight --notify telegram) still needs a run.
  • Not run yet: lint, tsc and vitest go in one combined pass on the second Mac.

Merge notes

Not yet checked on the second Mac.

overnight --notify telegram queues its report in memory until its own
Telegram channel is up. When the desktop app or the TUI holds
telegram.lock the channel never comes up in the overnight process, which
then exits and the report is gone without a word.

Before exiting, overnight now gives a still-connecting channel up to
15 s, and if the report is still waiting prints why it was not sent
(naming the other agent holding Telegram) and where to read the result.
Sending through the lock holder is left as a follow-up.

ATO-1358
…am is off

Review: without a bot token the channel drops the report at once
(nothing is queued), and with Telegram turned off the report waits in a
channel that never starts. Both now print the plain reason before exit.

ATO-1358

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant