Repository navigation
Releases
Releases · rezhajulio/telegateway
v0.1.5
Changed
- Breaking:
AppState(andAppState::bot) moved fromappinto a new
statemodule, soappandroutesno longer import each other. Library
callers must replacetelegateway::app::AppStatewith
telegateway::state::AppState. There is no re-export at the old path.
v0.1.4
Fixed
- Enforce
outbox.max_pendingin a single statement (Store::insert_with_cap),
closing the check-then-insert window a concurrent burst could overshoot. - Spend rate-limit quota only after the dedupe lookup and the queue-cap check,
so duplicate redeliveries, shed updates, and insert errors no longer burn
tokens against a governor bucket that cannot refund them. - Requeue stale in-flight rows at runtime via a new periodic sweeper task
(outbox.in_flight_sweep_secs,outbox.in_flight_max_age_secs), so a row
left in flight by a failedmark_deliveredno longer head-of-line blocks
its chat's queue until the next restart. - Treat a 4xx answer to a half-open breaker probe as reachability: the breaker
closes and the probed row returns to the queue instead of being dead-lettered. - Wake the oldest pending row when a half-open probe finds no row due, so
recovery is tested at cooldown cadence instead of waiting out a row backoff. - Accept HTTP-date
Retry-Aftervalues (IMF-fixdate, RFC 850, asctime) in
addition to delta-seconds, clamped to the store's one-hour ceiling. - Log a startup warning when the
[admin]token is set withoutadmin.listen,
since/outboxand/outbox/replaythen mount on the public listener.
Changed
- Document that the dedupe window matches delivered-row retention, and that
outbox.max_attemptscounts total attempts including the initial delivery. - Document the outbox in-flight sweeper settings in
config.example.toml,
README.md, andARCHITECTURE.md.
v0.1.3
Changed
- Upgrade
sqlxandsqlx-sqlitedependencies from 0.8 to 0.9.0. - Bump MSRV (
rust-version) to 1.94. - Adapt
Store::listdynamic SQL query construction tosqlx::QueryBuilderforSqlSafeStrcompatibility. - Remove obsolete
RUSTSEC-2023-0071ignore from.cargo/audit.tomlasrsadependency was dropped.
Fixed
- Collapse nested
ifstatements in outbox dispatcher requeue logic.
v0.1.2
Added
bots[].allowed_updatesconfig: the list of update types passed to
TelegramsetWebhookduring auto-registration. When unset, Telegram
keeps its previous setting; pass[]for Telegram defaults. Invalid
update types are rejected at config validation.
Fixed
- Ignore
RUSTSEC-2026-0459(libsqlite3-sys SQLite WAL page size
mismatch) in.cargo/audit.toml; the database files live on a trusted
host volume and the fix requires the sqlx 0.9 upgrade.
v0.1.1
Fixed
- Dependency updates resolving 7 of 8 flagged CVEs: rustls 0.23.45 ->
0.23.46 (4 GHSAs), rustls-webpki 0.103.15 -> 0.103.16, webpki-roots
1.0.9 -> 1.0.11 (CVE-2026-111943), OpenTelemetry family 0.28 -> 0.32
(sdk 0.32.1 fixes CVE-2026-48504; tracing-opentelemetry 0.29 -> 0.33).
Same rustls updates inexample/echo-rust. The remaining advisory,
RUSTSEC-2023-0071 (rsa), has no fixed release, is not compiled into
any telegateway target, and is ignored in.cargo/audit.toml.
v0.1.0
First release.
Added
- Bounded per-chat concurrent delivery:
outbox.delivery_concurrency
(default 1, 1..=64). Different chats are delivered in parallel; one chat
is always delivered in order, and a failed row blocks that chat's later
rows until it is retried. Rows carry achat_keycolumn. - Webhook ingress per bot (
POST /webhooks/{bot_id}) with constant-time
webhook-secret validation. - Per-chat token-bucket rate limiting; rejections answer
200so abusive
traffic is not amplified by Telegram retries. - Forwarding to private downstream bots with gateway headers
(x-telegateway-bot,x-telegateway-update-id) and W3Ctraceparent
propagation. - Optional TLS termination via
[tls](Rustls); plain HTTP otherwise. - Telegram webhook auto-registration (
auto_register+public_url+
per-botbot_token); failures are logged, never fatal. - Durable outbox: accepted updates are persisted to SQLite (WAL) before
the gateway answers200, then delivered asynchronously with
exponential backoff, 25 max attempts, and dead-lettering.503on
persistence failure so Telegram retries. - Outbox listing (
GET /outbox) and replay API (POST /outbox/replay),
guarded by the[admin]bearer token. Seedocs/API.md. - Per-bot circuit breaker: fast-fail while open, half-open probe after
the cooldown, doubling cooldown capped atmax_cooldown_secs. - OpenTelemetry export via
[otel]: traces and per-bot metrics over
OTLP/HTTP. Absent[otel], every instrument is a no-op. example/with echo bots in Python, Go, and Rust behind one gateway
config.- JSON structured logs;
/healthzand/readyzprobes
(/readyzchecks the database). - Bounded queues:
outbox.max_pendingsheds with503per bot;
outbox.max_dead_letterscaps dead letters per bot (plus 30-day age limit). - Separate admin listener (
[admin] listen) to keep admin routes off the
public socket; admin token must be at least 32 characters. - Load shedding (
503) when the concurrency limit is saturated; request
timeouts answer504. - Webhook authentication happens before the body is parsed; the original
bytes Telegram sent are stored and forwarded unchanged. Rate limiting
keys on chat id, falling back to the sending user; duplicates do not
consume quota. - Downstream handling: 4xx (except 408/425/429) dead-letter immediately
without tripping the breaker;Retry-Afterhonored on 429/503;
redirects are not followed; 5s connect timeout. - Secrets (
bot_token,webhook_secret, admin token) are redacted in
Debug, and URLs are stripped from delivery and registration errors. - Strict config validation (id/secret charsets, http/https URLs, https
public_url, positive intervals, retention bounds). - Supervised workers and graceful shutdown: dispatchers finish the
in-flight delivery; a dead worker exits the process non-zero. - SIGHUP reloads the TLS certificate and key.
- Webhook auto-registration retries with backoff.
- Container image
HEALTHCHECKon/healthz. - Delivery is at-least-once, per-bot sequential, best-effort ordered;
downstream bots must dedupe onupdate_id. - Release automation:
cargo publishto crates.io and release binaries
(Linux x86_64 and aarch64, macOS x86_64 and ARM64) onv*tags. Seedocs/RELEASING.md.
Fixed
.gitignoreonly ignores the rootconfig.toml, so
example/config.tomlis committed.