Skip to content

workflow: add_reaction action calls a nonexistent relay endpoint — any workflow using it always fails #2395

Description

@leesalminen

Summary

The workflow engine's add_reaction action can never succeed: it POSTs to {BUZZ_RELAY_BASE_URL:-http://localhost:3000}/api/messages/{message_id}/reactions (crates/buzz-workflow/src/executor.rs, add_reaction_impl), but the relay has no such route — router.rs defines no /api/messages/* paths. Every invocation gets the SPA/404 fallback:

webhook error: AddReaction: relay returned 404 Not Found for message <id>:

Because a failed step aborts the run, any workflow that uses add_reaction as an early step (e.g. an ack-reaction before a send_message) silently kills the whole workflow — from the user's perspective, "the workflow doesn't fire."

Repro

  1. Create a message_posted workflow whose first step is action: add_reaction.
  2. Post a matching message.
  3. workflow_runs shows status=failed, error_message as above; subsequent steps never run.
  4. curl -X POST http://127.0.0.1:3000/api/messages/deadbeef/reactions → 404 (route absent).

Also note the manual-trigger path (kind:46020) fails differently — "AddReaction: no trigger.message_id available" — which is arguably correct, but combined with the missing route the action is unusable everywhere.

Suggested fix

Either implement the action through the relay's real reaction path (build a kind:7 event via the workflow sink, like send_message does — no HTTP round-trip needed since the engine runs in-process), or remove/feature-gate the action until it works. If kept HTTP-based, it also needs the host-scoped community binding (localhost:3000 vs the deployment host) taken into account.

Found while debugging with #2385 / #2390 — happy to PR the in-process kind:7 approach.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions