feat(telegram): split connector into home validator + remote bot (mTLS bot-link) #96
Reference in New Issue
Block a user
Delete Branch "feature/telegram-egress-botlink"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Moves all Telegram egress off the main host. Splits the single connector into two binaries that share the bot token:
pkg/proto/botlink/v1) and executes the send commands the gateway pushes.Gateway funnels sends: out-of-app push is fire-and-forget (at-most-once); backend admin broadcasts go through a gateway relay that awaits the bot's ack (
SendToUser/SendToGameChannelcontract preserved). mTLS (pkg/mtls) is the one inter-service link leaving the trusted segment; validator↔gateway + relay stay plaintext internal. Bot is Telegram-rate-limited. One bot now; gateway bot registry +owns_updates+ command ids leave seams for N later. Webhook rejected.Test contour (this PR)
Unified topology: the bot keeps its VPN sidecar and dials the gateway by its internal name; bot-link mTLS certs generated by
deploy/gen-certs.shin CI. No new secrets/variables needed — runs on the existingTEST_secrets.Review focus (on the contour)
/startreplies with the launch button.scrabble-telegram-botcontainer → login still works, pushes pause; restart → bot-link reconnects.Deferred to Stage 18 (prod)
Bot on a separate host (no VPN), gateway bot-link port published,
PROD_certs + scheduled rotation, SSH deploy of both hosts together. SeePRERELEASE.md(phase TX).Verification
gofmt / vet / build / unit (+
-raceon the bot-link) green; backend integration suite green; UI check / unit / build / bundle green.