Skip to content

Telegram bot

After this page your team’s Telegram chat receives deploy-regression and CU-headroom pushes, and anyone in it can ask /why <sig> and get a decoded answer.

The quickstart path: npx @wiretap-labs/cli init prints a https://t.me/<bot>?start=<token> deep link that binds the chat to your project. To connect a group chat instead, add the bot to the group and paste the same start token with /connect <token>.

Command Answer
/why <sig> Decoded failure story for a signature: IDL error name, instruction, CU, payer bot score, issue history
/status Program health right now: landing rate vs baseline, open regressions, provider split
/top [7d] Top issues, bot traffic segmented out
/mute <issue> Stop pushes for one issue fingerprint
/help The list above, in chat

Example /why reply:

✗ swap failed — SlippageExceeded (6001)
program DemoAMM… · slot 312 441 907 (devnet)
ix swap (top level)
cu 48 211 / 200 000 requested
payer 9xQe…3fKm (bot score 0.02 — real user)
Seen 14× this week · issue v1:9c41ae…

Two alert classes are pushed without being asked (both deduplicated and rate-limited):

  • Deploy regression — after a detected deploy, error rates are diffed pre/post deploy slot; a significant post-deploy degradation pushes within minutes:

    ⚠ regression after deploy @ slot 312 440 001
    InsufficientLiquidity (6004) on swap:
    0.4% → 7.9% of real-user tx (last 30 min vs 24h pre-deploy)
  • CU headroom — when an instruction’s p95 compute usage trends toward its requested budget:

    ⚠ cu headroom: open_position p95 at 187 300 / 200 000 (6% headroom, shrinking)

The mock transport upgrades to real Telegram in ~5 minutes:

  1. Message @BotFather/newbot, pick a name and a username ending in bot.
  2. Put the token in .env: TELEGRAM_BOT_TOKEN=123456:ABC…
  3. Restart the bot app. wiretap doctor should report telegram: real transport.