Skip to content

fix(events): PersistStrategy.REDIS drops the event instead of writing to the Redis stream #14816

Closed

Description

@mrveiss

Part of #14815.

Problem

EventBus.publish does not implement its own PersistStrategy.REDIS arm. It logs a critical and
drops the event (autobot-backend/events/bus.py:76-84):

if persist is PersistStrategy.REDIS:
    logger.critical("PersistStrategy.REDIS is not implemented in EventBus — event dropped ...")
    return

Meanwhile RedisEventStreamManager (autobot-backend/events/stream_manager.py:125) is a fully
built durable event store on Redis Streams — xadd(..., maxlen=config.max_stream_length) (:167),
xrange (:322), get_latest (:262), get_event (:337), get_task_events (:304).

So the durable replay substrate exists and is unreachable through the unified bus. This is the
prerequisite for reconnect-with-replay (#14818).

Scope

  • Implement the PersistStrategy.REDIS branch in EventBus.publish against
    RedisEventStreamManager, replacing the drop.
  • Decide and document whether REDIS implies MEMORY fan-out as well (it should — a durable event
    that no connected client sees is a regression on today's behaviour).
  • Update the module docstring's migration plan (events/bus.py:19-22), which still lists Phase 2
    and Phase 3 as outstanding.

Acceptance criteria

  • publish(..., persist=PersistStrategy.REDIS) writes to the Redis stream and reaches
    connected subscribers.
  • No code path in EventBus.publish drops an event while logging critical.
  • Test drives EventBus.publish (the production entry point) and asserts the event is
    readable back via RedisEventStreamManager, not that a mock was called.

Sources

Parent: #14815 · Full analysis: docs/research/agent-host-and-agent-client-protocols.md

Activity

  1. mrveiss commented on Aug 22, 2026

    @mrveiss
    OwnerAuthor

    Audit trail and full analysis: #14826 — docs/research/agent-host-and-agent-client-protocols.md.

    Sources for this finding:

  2. mrveiss commented on Aug 23, 2026

    @mrveiss
    OwnerAuthor

    Delivered and merged.

    events/bus.py: the PersistStrategy.REDIS arm publishes durably instead of logging critical and returning. It fans out to the channel as well — a persisted event no client sees would have regressed prior behaviour.
    Tests: events/bus_channel_fanout_14822_test.py (4).

    Evidence

    • PR feat(events): multi-client session synchronization, replay, and an ACP agent surface #14826, squash-merged as ded8d07e7 into Dev_new_gui
    • CI on the merged head 889e3ac4a: 57 passed / 0 failed / 0 cancelled / 0 pending
    • Codecov: "All modified and coverable lines are covered by tests" — 100% patch coverage
    • Independent code-reviewer pass run before merge; all 3 findings fixed in-PR with regression tests
    • Content verified present in origin/Dev_new_gui after merge

    Not verified on a host. The tests above exercise the seams, but no running instance has confirmed the end-to-end behaviour (a second tab receiving events, a reconnect replaying the gap). If that matters for this issue, reopen against a deployed check.

    Closing by hand: Closes #N does not fire here, since the PR targeted Dev_new_gui rather than the default branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions