Skip to content

FeedCourier v0.2.0

Choose a tag to compare

@github-actions github-actions released this 22 Nov 14:42
c8cd677

Breaking Changes

  • Two-Layer Delivery Channel Model (Channel Account + Multiple Destinations):
    • Split delivery channels into a Channel Account (channels — storing encrypted account credentials, outbound proxy toggle, shared pacing/jitter, rolling hourly/daily quotas, and shared cooldowns) and one or more child Destinations (channel_destinations — storing independently encrypted Telegram chat_id/message_thread_id, SMTP to_addresses/reply_to, or Notion data_source_id/column_mapping, each with its own enable toggle and connectivity test).
    • Automatic Atomic SQLite Migration & Pure Pre-DDL Backup: On first startup against an existing v0.1.x database, Database::connect creates a consistent online VACUUM INTO snapshot at <DATA_DIR>/pre-v0.2.0-backup.db before migrations/0002_channel_destinations.sql runs—producing a pure v0.1.x SQLite snapshot compatible with rolling back directly to v0.1.6 (if a backup already exists, a UTC-timestamped pre-v0.2.0-backup-<timestamp>.db file is written without overwriting it). Database::migrate_channels_to_v2 then splits all pre-v0.2.0 channels inside a single SQLite transaction: legacy SMTP rows merge only when host, port, username, password, security, and from_address all match, SMTP credential_group_key includes the password SHA-256 digest (keeping distinct API keys under a shared username such as SendGrid's apikey isolated), merged quotas/pacing/cooldown/proxy are aggregated from enabled legacy channels (falling back to all rows only when every merged channel is disabled), trailing 24-hour deliveries are backfilled into delivery_quota_ledger, all routes and delivery_tasks (including delivered and dead_letter history) are repointed with a post-migration destination_id IS NOT NULL integrity check, and system_settings.channel_model_version = 2 is recorded for idempotency.
    • Telegram Bot API SSRF Enforcement (Upgrade Note for Local Bot API Servers): All Telegram Bot API requests—including official https://api.telegram.org and custom api_base_url / self-hosted Local Bot API servers—now enforce connect-time SsrfPolicy DNS validation (sharing the hot-reloadable SSRF_ALLOWLIST) with automatic redirects disabled, and api_base_url only allows http/https URLs without userinfo, query, or fragment (SSRF denials return 403 ssrf_blocked). Existing internal Local Bot API endpoints are not auto-allowlisted: operators running a Local Bot API server on a private/loopback/Docker address must explicitly add its hostname or IP/CIDR to SSRF_ALLOWLIST.
    • Shared Account-Level Rate Limiting & Persistent Quota Ledger (delivery_quota_ledger): Minimum interval, random jitter, rolling hourly/daily quotas, and upstream 429 cooldowns are enforced across all destinations belonging to the same Channel Account and any sibling accounts sharing credential_group_key (applying the strictest effective quota across the group). Rolling 1h/24h quota counts and last_completed_at pacing timestamps are stored in the new delivery_quota_ledger table (without business foreign keys, pruned after 24 hours), so deleting feeds, routes, or destinations—or clearing feed cache—never resets quota usage or pacing timestamps.
    • REST API & MCP Destination Targeting: Route creation/updates (POST/PATCH /api/v1/routes, MCP configure_route) and debug pushes (POST /api/v1/feeds/preview/push, MCP test_push_feed_entry) now take destination_id as the primary target. Legacy channel_id payloads remain accepted when the account owns exactly one destination and return a validation error when multiple destinations exist. Added /api/v1/channels/{id}/destinations, /api/v1/destinations/{id}, and /api/v1/destinations/{id}/test; POST /api/v1/channels/{id}/test now verifies account credentials when destination_id is omitted.

Added

  • Auto-Fetched Account & Destination Default Names: Leaving the display name blank when creating a Channel Account or Destination automatically derives it from Telegram getMe (@username) / getChat (group or channel title), SMTP from_address / first recipient address, or Notion /v1/users/me integration name / database title.
  • Per-Route Timezone Override (RouteOptions.timezone): Routes now accept an optional IANA timezone (e.g., Asia/Shanghai, America/New_York) that overrides the system timezone for that route's delivery time windows/weekdays, SMTP email article timestamps, and Telegram rich-message <footer> timestamps—formatted with explicit UTC offsets such as 2026-11-08 11:00 (UTC+08:00). Configurable in the WebUI route editor, REST API, debug push, and MCP (configure_route, test_push_feed_entry).
  • Feeds List Tag Filter, Persistent Sort & Pagination: Narrowed the Feeds search box to feed title and URL; added a single-select Tag filter dropdown (with per-tag counts and an Untagged option), a persistent Sort control (added time or Intl.Collator CJK/Latin-aware title, ascending/descending), and 15 / 30 / 50 per-page pagination persisted in localStorage.
  • Channels & Routes Page Filters: Added a Channel Kind filter (All / Telegram / SMTP / Notion) to the Channels view and cascading Channel Kind → Account filters to the Routes view.
  • Semantic Outbox Queue Status Colors: Standardized Outbox badges, HTTP/SMTP status codes, attempt-count escalation (1 neutral, ≥ 2 amber, maxed red), and status-matched diagnostic log text so successful delivery logs no longer render in red.

Changed

  • Telegram Rich Message Typography (telegram-rich 0.0.2): Upgraded to telegram-rich 0.0.2 and refined rich_message layout—demoting article titles from <h1> to <h2>, moving Source · Author · Localized Publish Time into a native Telegram <footer> below the title, inserting an <hr> divider before the body, enabling heading_offset = 2 (h1→h3, h2→h4, …, up to h6), and enabling group_consecutive_media = true to merge 2+ consecutive images into <tg-collage> (or <tg-slideshow> when exceeding collage limits).
  • Redacted MCP Destinations Discovery (list_feeds_status): Exposed secret-free destinations summaries (id, channel_id, name, kind, enabled) both nested under each channel and as a top-level list without ever leaking credentials, email addresses, chat_id, or data_source_id; inspect_failed_deliveries now includes destination_id and destination_name.
  • Pacing & Jitter Documentation: Clarified that random jitter (0..=jitter_max_secs) is sampled independently after every delivered task (never shared across a batch) and held in memory only (after a restart, the first delivery enforces min_interval_secs from SQLite delivery_quota_ledger last_completed_at).
  • In-Flight Task Synchronization on Route Updates (PATCH /api/v1/routes/{id}, MCP configure_route): Changing a route's target destination atomically repoints pending queued, deferred, and retrying tasks to the new destination_id (clearing checkpoint_json and resetting attempt_count = 0, while leaving active delivering tasks untouched). Changing active_windows, active_weekdays, or timezone immediately resets next_attempt_at = now on queued and deferred tasks and wakes the outbox dispatcher.
  • Explicit SMTP Password Clearing (PATCH /api/v1/channels/{id}): Omitting password continues to preserve the existing encrypted SMTP password, while explicitly passing "password": null clears an optional SMTP password.

Fixed

  • DST-Safe Delivery Windows & Strict Equal-Boundary Validation (src/schedule.rs): Handled Daylight Saving Time transitions cleanly—spring-forward gaps clamp window boundaries forward to the first valid local instant, and fall-back ambiguous intervals use the earliest occurrence for window starts and the latest occurrence for window ends. Restricted all-day equal-boundary windows strictly to 00:00–00:00 (or an empty active_windows list), rejecting any other start == end window with 400 Bad Request.
  • SMTP Responsive Images, Figures, Tables & Code Blocks (src/channels/smtp.rs): Rewrote <img> tags in email bodies with Outlook-compatible width="592" (preserving explicitly narrower widths and relative percentage widths), stripped fixed height attributes, and added responsive inline CSS (max-width:100%;height:auto) alongside <figure>/<figcaption>, <table>, and <pre> width/overflow rules and <head> CSS fallbacks so wide feed images and tables no longer overflow the 640px email card.

What's Changed

Maintenance & Dependencies

  • feat(release): v0.2.0 - two-layer channels, rich typography, WebUI upgrades, and security hardening by @ElleryHe in #23

Full Changelog: v0.1.6...v0.2.0