Skip to content

Improve EventBus reliability and error observability #17

Description

@longzhi

Problem

Two related reliability problems in the event bus system:

1. Silent message dropping

clawhive-bus/src/lib.rs:86 — try_send() with buffer size 8. When subscribers are slow, messages are silently dropped. Critical messages like NeedHumanApproval could be lost without any indication.

2. Ignored publish failures

clawhive-core/src/shell_tool.rs:81,133 — let _ = bus.publish(...) ignores publish failures with no logging. If a publish fails, there's no way to know.

Proposed Solution

  1. Increase channel buffer size or implement backpressure strategy for critical message types
  2. Add tracing::warn! on publish failures across the codebase
  3. Consider differentiating critical vs. best-effort messages

Impact

  • Reliability — prevents silent loss of critical messages (e.g., human approval requests)
  • Observability — publish failures become visible in logs for debugging

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2: mediumImportant but not urgent, schedule itenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions