Skip to content

v0.8.4

Choose a tag to compare

@hxx0611 hxx0611 released this 19 Aug 10:45
· 20 commits to main since this release

v0.8.4 — Phase 11G-A: Controlled Test Notification

Added

  • Admin-triggered test notifications: sendTestNotificationAction(channelId) + "Send Test Notification" button on the Notifications channel UI (EN/ZH)
    • requireAdmin() guard; validates channel exists → enabled → type === "telegram" → encrypted token configured (hasChannelSecret, never reads the value)
    • Exactly 1 event (source="test", event_type="test_notification", dedupKey = test-notification:<channelId>:<nonce>) + exactly 1 delivery directly for the target channel — rule engine not involved, same-nonce replay absorbed by UNIQUE dedupKey
    • Reuses the existing chain: createSender("telegram") → TelegramSender → getChannelSecret (AES-256-GCM) → Telegram API → deliverDelivery state machine
    • Message explicitly labelled Test Notification; never contains tokens, ciphertext, secretRefs, DB paths or other sensitive values

Security

  • Action never returns tokens/ciphertext/secretRefs/ENCRYPTION_KEY; machine-readable error codes (unauthorized, channel_not_found, channel_disabled, unsupported_channel, secret_not_configured, no_domain, duplicate_request, send_failed)
  • Tests prove: unauthenticated → unauthorized (no channel/event access), non-Telegram → unsupported_channel, no duplicate event/delivery on replay, attempts=1, error=null on success, zero real Telegram API calls during tests (stubbed fetch + fake AAH_* fixtures)

Quality

  • 780 tests (53 files) — 17 new (unit + real-DB integration); tsc 0, next lint 0, prettier PASS, build PASS (BUILD_ID hguDKK6wigYItW0QTJQx5)

Notes

  • Deployment to production follows immediately for the Phase 11G-REAL gate (exactly one real Telegram test message through the production UI); real notification delivery remains an explicitly approved safety-gate exercise