Skip to content

envsbot v2.5.0

Choose a tag to compare

@cremesk cremesk released this 01 Oct 18:04
· 5 commits to main since this release
v2.5.0
be5a9f2

envsbot 2.5.0 continues the shared-core consolidation and now targets envs-xmpp 1.7.2 across command, messaging, task, room, configuration, backup, constraint, and deployment infrastructure.

The release also closes important reliability gaps around proactive OMEMO delivery, partial RSS delivery, supervised background workers, and startup-time external-service failures.

Highlights

  • Updated the shared-core dependency to envs-xmpp >= 1.7.2, < 2.0.
  • Adopted shared command metadata, lookup, nested subcommand resolution, and help primitives.
  • Adopted the shared task scope model and operator-facing task presentation.
  • Unified incoming message context handling for direct messages, MUC private messages, and groupchat traffic.
  • Adopted shared outbound reply and delivery policy helpers.
  • Integrated shared room lifecycle tracking into room state, status, and doctor diagnostics.
  • Unified configuration reload reports and restore/recovery diagnostics.
  • Strengthened OMEMO backup and restore pairing.
  • Centralized dependency-constraint and deployment policy in envs-xmpp.
  • Adopted the shared DeploymentFrontend for common process, Git, systemd, virtualenv, confirmation, service-account, and dependency-drift operations.
  • Added cross-project contract tests protecting the shared adapter boundaries.

Proactive OMEMO direct messages

With OMEMO enabled, proactive 1:1 messages now follow the same encryption policy as interactive encrypted conversations.

This includes background or scheduled messages such as:

  • RSS direct-message delivery;
  • upgrade notifications;
  • daily health reports;
  • other proactive direct notifications.

When encryption is required and cannot be completed, envsbot keeps the fail-closed policy instead of silently downgrading the message to plaintext.

Outbox retries also re-evaluate the active OMEMO policy instead of accidentally turning a previously protected message into plaintext.

Reliable RSS delivery

RSS delivery now tracks delivery progress per feed entry and recipient.

Previously, when delivery succeeded for only some rooms or direct-message subscribers, the feed cursor could remain unchanged and already successful recipients could receive the same entry again during the next poll.

envsbot now:

  • records pending feed entries before delivery begins;
  • checkpoints each successful recipient independently;
  • retries only recipients that are still pending;
  • preserves pending delivery state across bot restarts;
  • handles subscriptions that change while an entry is pending;
  • completes pending delivery even if the entry is no longer present in the provider's current fetch window;
  • advances the feed cursor only after the required delivery work has completed.

As with any external message transport, an application crash in the small interval between successful network delivery and persistence of the acknowledgement cannot provide an absolute exactly-once guarantee.

Supervised worker reliability

Several long-running service tasks were hardened for the shared supervisor model.

  • XKCD startup no longer terminates the service task when the first external fetch fails. It remains supervised and retries instead of opening the task circuit during temporary DNS/network outages.
  • Birthday notification failures preserve the original unexpected exception for the supervisor instead of turning it into a misleading normal service exit.
  • Periodic backup shutdown now uses the expected service-exit path when the worker is intentionally disabled.
  • Cancellation-timeout tests were made robust across Python 3.14 asyncio task naming while guaranteeing cleanup of deliberately stubborn test tasks.

Status and room diagnostics

The operator status view has been aligned with the shared presentation used by the moderation bot while retaining envsbot-specific information.

  • Added a concise healthy/attention/problem banner below the status title.
  • Added pending room-invite counts to the XMPP section.
  • Moved room lifecycle state directly below the room summary.
  • Existing envsbot-specific occupant, avatar, vCard, plugin, contact, and message-cache information remains available.

Commands and help

Command metadata and lookup now use the shared envs-xmpp command model, including aliases, nested subcommands, structured help metadata, shared lookup, and consistent subcommand resolution.

envsbot-specific commands and policy remain inside envsbot.

Tasks and operator presentation

Task metadata now uses the shared envs-xmpp task scope model. Operator-facing presentation for tasks, rooms, and runtime information has also been aligned with the shared infrastructure while preserving envsbot-specific status information.

Existing compatibility exports remain available where required by current integrations.

Room lifecycle diagnostics

Room state now tracks verified lifecycle transitions through the shared room lifecycle model. The resulting state is exposed through existing administration and doctor output, providing more consistent information about joined, joining, failed, and recovered room sessions.

Backup and configuration safety

Managed backups now enforce the OMEMO state and identity metadata as a companion pair. Partial OMEMO state is not treated as a complete restorable cryptographic identity.

Configuration reload reporting and restore recovery diagnostics also use the shared structured reporting primitives from envs-xmpp.

Deployment and packaging cleanup

  • Common deployment glue now uses envs_xmpp_ops.DeploymentFrontend instead of local process/Git/systemd/virtualenv adapter functions.
  • Dependency drift enforcement and service-account validation use the shared envs-xmpp deployment policy.
  • The local constraints frontends remain small stable operator/CI entry points while their implementation lives in envs-xmpp.
  • OMEMO transport dependencies remain part of the default runtime through envs-xmpp[omemo].
  • Redundant private OMEMO passthroughs were removed in favor of the shared core mechanisms.
  • The historical envsbot[omemo] package extra and requirements-omemo.txt compatibility installer have been removed.
  • Final dead deployment adapters and test-only production helpers were removed.

Compatibility

  • Python 3.12, 3.13, and 3.14 are supported.
  • Requires envs-xmpp >= 1.7.2, < 2.0.
  • No mandatory configuration migration is required.
  • Existing plaintext installations remain plaintext unless OMEMO is explicitly enabled.
  • Existing command names and normal deployment workflows remain supported.

Validation

The release passed the complete project quality and mutation regression gates, including:

  • pytest and coverage regression checks;
  • Ruff;
  • mypy;
  • dependency and packaging validation;
  • shared-core release alignment;
  • mutation regression testing.

Upgrade

For PyPI installations:

python -m pip install --upgrade envsbot==2.5.0

For tagged deployments:

sudo ./scripts/deploy.sh update --to v2.5.0

After upgrading, verify normal XMPP connectivity, room joins, status/doctor output, RSS delivery, and one encrypted direct-message workflow if OMEMO is enabled.

Summary

envsbot 2.5.0 substantially reduces duplicated infrastructure by adopting envs-xmpp 1.7.2 across commands, messaging, tasks, rooms, backups, configuration, constraints, and deployment policy.

It also closes the proactive-OMEMO gap, makes RSS delivery resilient to partial failures, improves supervised worker behavior during startup/runtime failures, and gives operators a more consistent health and room-lifecycle view.

Full Changelog: v2.4.1...v2.5.0