feat(ops): notify-telegram.sh helper for autonomous loop user pings #19

Merged
navigator merged 1 commit from feature/telegram-notify into main 2026-05-24 12:48:47 -03:00
Owner

Adds the autonomous loop's user-notification channel.

What this PR adds:

  • infra/ops/notify-telegram.sh (AGPL v3): sends a message to navigator via Telegram bot t.me/fluid_pop_bot when the loop needs human input or flags a milestone. Reads TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID from ~/.config/settings.env (never committed). Priority levels (high/normal/low) prefix messages and toggle disable_notification.

Usage:

  • bash infra/ops/notify-telegram.sh "message text"
  • echo "piped" | bash infra/ops/notify-telegram.sh
  • bash infra/ops/notify-telegram.sh --priority high "alarm"

Future wire-ups (separate PRs):

  • runner-monitor.sh pipes ALARM through notify-telegram.sh on TW-3 fire
  • auto-merge.sh pings on CI fail/timeout with PR number
  • Weekly checkpoint digest cron

Tests: shell only. CI runs shell-lint on the new script. Auto-merge via infra/forgejo/auto-merge.sh once CI green. Bot already validated end-to-end (test message sent, message_id 5).

Adds the autonomous loop's user-notification channel. What this PR adds: - infra/ops/notify-telegram.sh (AGPL v3): sends a message to navigator via Telegram bot t.me/fluid_pop_bot when the loop needs human input or flags a milestone. Reads TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID from ~/.config/settings.env (never committed). Priority levels (high/normal/low) prefix messages and toggle disable_notification. Usage: - bash infra/ops/notify-telegram.sh "message text" - echo "piped" | bash infra/ops/notify-telegram.sh - bash infra/ops/notify-telegram.sh --priority high "alarm" Future wire-ups (separate PRs): - runner-monitor.sh pipes ALARM through notify-telegram.sh on TW-3 fire - auto-merge.sh pings on CI fail/timeout with PR number - Weekly checkpoint digest cron Tests: shell only. CI runs shell-lint on the new script. Auto-merge via infra/forgejo/auto-merge.sh once CI green. Bot already validated end-to-end (test message sent, message_id 5).
feat(ops): notify-telegram.sh helper for autonomous loop user pings
All checks were successful
build / scalafmt-check (push) Successful in 4s
build / sbt-compile (push) Successful in 4s
build / shell-lint (push) Successful in 17s
build / scalafmt-check (pull_request) Successful in 4s
build / sbt-compile (pull_request) Successful in 5s
build / shell-lint (pull_request) Successful in 9s
cad7848d47
Sends a message to navigator via Telegram bot (t.me/fluid_pop_bot,
chat 188125038) when the autonomous loop needs human input or wants
to flag a milestone:

- Bot token + chat ID in ~/.config/settings.env (TELEGRAM_BOT_TOKEN,
  TELEGRAM_CHAT_ID). Never committed.
- Usage:
    bash infra/ops/notify-telegram.sh "message text"
    echo "piped" | bash infra/ops/notify-telegram.sh
    bash infra/ops/notify-telegram.sh --priority high "alarm"
- Priority levels prefix the message ([ALARM] high, [INFO] low,
  [FluidPop] normal) and toggle disable_notification.
- Exit 0 on HTTP 200 (prints message_id); 3 on Telegram API failure
  with full body on stderr; 1/2 on missing config or empty input.

Future wire-ups (separate PRs):
- infra/ops/runner-monitor.sh: pipe ALARM through notify-telegram.sh
  when status flips offline >1h (TW-3 tripwire from PLAN.md S0.5).
- infra/forgejo/auto-merge.sh: on CI failure (exit 2) or timeout
  (exit 3), notify navigator with PR number and last failing job.
- Weekly checkpoint cron: digest of merged PRs + open issues.
fluidpop-bot left a comment
Collaborator

CI green (head cad7848d47), auto-approving

CI green (head cad7848d47176b2a8be3d6a6ef6dafe68284d107), auto-approving
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Fluid/fluidpop-v1!19
No description provided.