Skip to content

fix(mctl-agent): correct TELEGRAM_CHAT_ID to operator user id 210408407 - #112

Merged
mashkovd merged 1 commit into
mainfrom
fix/mctl-agent-telegram-chat-id-210408407
May 4, 2026
Merged

mashkovd merged 1 commit into
mainfrom
fix/mctl-agent-telegram-chat-id-210408407

Conversation

@mashkovd

@mashkovd mashkovd commented May 4, 2026

Copy link
Copy Markdown
Member

Summary

  • Replace TELEGRAM_CHAT_ID: 8568443430 with 210408407 (operator's Telegram user id).

Why

PR #99 set the chat id to 8568443430 as the admins-openclaw target, but that value turns out to be a bot account, not a human chat. After migrating the bot identity to @MCTL_AI_bot in PR #111, Telegram returned 403 Forbidden: bots can't send messages to bots on every send.

Operator verified via getUpdates that the correct chat id for the 1:1 chat with @MCTL_AI_bot is 210408407 — the same id used previously for the @mctl_me_bot chat, because in 1:1 bot conversations Telegram identifies the chat by the human participant's user id (constant across bots).

Test plan

  • ArgoCD sync admins-mctl-agent
  • Delete + recreate mctl-agent-secrets so ESO repopulates the template (TELEGRAM_CHAT_ID lives in targetTemplateData)
  • kubectl -n admins rollout restart deploy/admins-mctl-agent-base-service
  • Synthetic alert via POST https://agent.mctl.ai/api/v1/alerts (namespace=ovk) → message arrives in mctl_admins chat with @MCTL_AI_bot

PR #99 used 8568443430 thinking it was the admins-openclaw chat ID,
but in 1:1 bot chats Telegram uses the human participant's user id —
8568443430 turned out to be a bot account, surfacing as
'403 Forbidden: bots can't send messages to bots' once we migrated to
@MCTL_AI_bot in PR #111. Operator confirmed via getUpdates that the
correct chat_id for the mctl_admins chat is 210408407 (their own
Telegram user id, identical to the previous mctl_labs chat — same
user, different bot).
@mashkovd

mashkovd commented May 4, 2026

Copy link
Copy Markdown
Member Author

@codex review

@mashkovd

mashkovd commented May 4, 2026

Copy link
Copy Markdown
Member Author

@copilot review

Copilot AI commented May 4, 2026

Copy link
Copy Markdown

@copilot review

The change is correct and minimal. Here's my review:

What changed (commit b41dbb1)

  • TELEGRAM_CHAT_ID in platform-gitops/bootstrap/templates/mctl-platform/mctl-agent.yaml updated from "8568443430" (the former bot-to-bot chat id that was causing 403 Forbidden: bots can't send messages to bots) to "210408407" (the operator's Telegram user id).
  • Inline comment expanded to explain why the chat id is the human participant's user id in 1:1 bot conversations.

No concerns:

  • The new value matches what getUpdates returned for the 1:1 chat with @MCTL_AI_bot and is consistent with the previous @mctl_me_bot usage.
  • TELEGRAM_BOT_TOKEN continues to be pulled from Vault (lines 95–97) — no credentials hardcoded.
  • OPENCLAW_BOT_USERNAME: "@MCTL_AI_bot" (line 66) is already in place, so the deeplink generation will reference the correct bot.
  • The only remaining step is the operational test plan in the PR description (ArgoCD sync → ESO secret recreate → rollout restart → synthetic alert).

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@mashkovd
mashkovd merged commit e888694 into main May 4, 2026
@mashkovd
mashkovd deleted the fix/mctl-agent-telegram-chat-id-210408407 branch May 4, 2026 22:02
mashkovd pushed a commit that referenced this pull request May 21, 2026
Accept #88 (Beta SLOs + burn-rate alerts) for implementer trigger. #86 has
merged (PR #112) and shipped placeholder runbook_url -> docs/hpa.md#alerts, so
#92 task 2 now says repoint (not just confirm) to docs/runbook.md anchors.
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.

2 participants