Skip to content

message_posted workflow triggers never execute on hosted relay (webhook/schedule/manual triggers work) #4288

Open

Description

@ysef-pm

Summary

On a hosted Buzz relay (*.communities.buzz.xyz, checked 2026-08-02), workflows with trigger: on: message_posted never execute, while webhook-triggered, scheduled, and manually-triggered workflows on the same relay/channel run fine. Because run history is also invisible to clients (see below), a dead trigger is indistinguishable from a working one, which makes this very hard for users to self-diagnose.

Environment

  • Hosted relay on communities.buzz.xyz (deployed version unknown to me — NIP-11 doc carries no version field)
  • Buzz Desktop 0.5.3 (macOS) and buzz CLI from the same bundle
  • Could not verify against OSS HEAD locally (no Docker on this machine), so this may be deployment drift rather than a bug at main — flagging either way since hosted users can't tell the difference.

Repro (CLI, ~2 min)

  1. As a channel member, create a minimal message-triggered workflow with an observable in-channel action:
name: engine_probe
enabled: true
trigger:
  "on": message_posted
  filter: 'str_contains(trigger_text, "probe-phrase-7793")'
steps:
  - id: react
    action: add_reaction
    emoji: eyes

buzz workflows create --channel <uuid> --yaml "$(cat probe.yaml)" → accepted, workflow id returned.

  1. Post a kind:9 channel message containing probe-phrase-7793.
  2. Wait. Expected: 👀 reaction on the message (via the relay workflow sink). Actual: nothing (checked with buzz reactions get --event <id> over ~10 minutes).

What DOES work on the same relay

  • Manual trigger: buzz workflows trigger --workflow <id> on the same probe workflow → accepted, run_id returned.
  • Webhook-triggered workflows: a trigger: on: webhook workflow with a send_message step has fired repeatedly on this relay (relay-signed kind:9 messages with the buzz:workflow tag are present in channel history).
  • Workflow saves, updates, deletes, and list queries all behave normally.
  • The SEC-006 gates behave as documented (e.g. forbidden: workflows with call_webhook actions require the owner or admin role for non-admin authors) — the probe above deliberately avoids call_webhook and is owned by a member whose role passes owner_authority_allows(role, false).

Where I looked in the source

dispatch_persistent_event (crates/buzz-relay/src/handlers/event.rs:533) spawns workflow_engine.on_event(...) for stored kind:9 events, and WorkflowEngine::on_event reads enabled workflows from the DB (10s cache) before evaluating trigger_matches_event / should_fire_workflow. I couldn't find a path where the probe above should be skipped, which is why I suspect the hosted deployment predates or diverges from this wiring — but I can't confirm the deployed version.

Related papercut that made this much worse

buzz workflows runs always returns [] by design (crates/buzz-cli/src/commands/workflows.rs:63 — runs live in the workflow_runs table and kinds 46001–46003 are never emitted), and the Desktop equivalent returns a hard-coded empty list (desktop/src-tauri/src/commands/workflows.rs, get_workflow_runs TODO). So users have zero signal on whether any workflow ever fired. Even just emitting run-started/run-failed events (or a REST read) would have made this a 5-minute diagnosis instead of an afternoon.

Happy to provide more detail or run further probes on the hosted relay if useful.

Activity

  1. juddkussrow commented on Aug 3, 2026

    @juddkussrow

    I may have a counter-example, plus a possible explanation for the negative result
    here.

    message_posted does fire on a hosted relay

    Tested today on autom8.communities.buzz.xyz.

    Workflow (ed7014d2-212c-4eb2-919b-d1d2bb001497), created via CLI:

    name: PROBE 1 — message fields
    enabled: true
    trigger:
      on: message_posted
      filter: 'str_starts_with(trigger_text, "PROBE:")'
    steps:
      - id: echo_fields
        action: send_message
        timeout_secs: 20
        text: |-
          PROBE-RESULT: message_posted
          text        = {{trigger.text}}
          author      = {{trigger.author}}
          message_id  = {{trigger.message_id}}

    Posted PROBE: hello to the channel. The workflow fired and posted its result
    in the same second — no manual trigger involved:

    22:37:04  me        PROBE: hello
    22:37:04  workflow  PROBE-RESULT: message_posted
                        text        = PROBE: hello
                        author      = 3cd8a94f6fad3ad1…
                        message_id  = 2e2b8ec027607f91…
    

    All template fields resolved. So on this hosted community, at least, the
    message_posted trigger path works end to end.

    Why the original test may not have fired

    The report describes a test workflow that adds an emoji reaction when it sees
    matching text. That step is affected by a separate bug:

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

    If that's accurate, the trigger may well have fired correctly and the action
    failed, which from the outside is indistinguishable from "the trigger never
    executed" — especially with run history unavailable.

    Worth re-testing with a send_message step instead of add_reaction. If it
    posts, the trigger was never the problem.

    On the diagnosis gap

    Strong agreement with the secondary point in the original report. In our case,
    workflows runs returned [] throughout (#2980), and the Desktop workflows
    list showed nothing at all for unrelated reasons (#2385 — multi-value #h
    filters collapsing). With triggers, actions, run history, and the list view each
    failing differently and silently, there was no way to tell which layer was
    broken.

    We only got clarity by making the workflow post a message containing its own
    trigger context
    — that turned the channel itself into the diagnostic surface,
    which is the one thing that still worked. Might be a useful debugging suggestion
    for others landing on this issue.

    Happy to run further tests against this hosted community if it would help.

  2. luthen-seas commented on Aug 10, 2026

    @luthen-seas
    Contributor

    Second data point, and it extends the scope: reaction_added is affected too, so this is the whole channel-event trigger class rather than message_posted specifically.

    Environment

    • Hosted relay on *.communities.buzz.xyz, checked 2026-08-09
    • Workflow created via the relay's POST /events (kind:30620 directly), not Desktop
    • Trigger reaction_added, no emoji filter; single call_webhook step
    • Signed by a channel owner, so SEC-006 passes at save (the same definition signed by a non-admin agent is correctly refused with forbidden: workflows with call_webhook actions require the owner or admin role)

    What happened

    The definition saves and reads back cleanly — a #h-scoped kind:30620 query returns it. Reactions were then added to messages in that channel over several hours. The webhook target is an endpoint we operate, so we have full request logs rather than an inference: zero requests arrived, across two separate deployments, with the endpoint verified live and answering on other paths throughout.

    Same relay, same channel, same period: our own scheduled poller reading reactions over POST /query works continuously, so relay ingest of the kind:7 events themselves is fine. It is specifically the workflow dispatch that never happens.

    On the "hard to self-diagnose" point

    Strongly seconding it. Between run history returning [] (#2980) and the Desktop workflows list showing empty on hosted (#4696), there is no signal available to a user distinguishing never fired from fired and did nothing. We only established it because the webhook target was ours to instrument. Without that we would have concluded our own endpoint was at fault.

    One suggestion, if it's cheap: even a relay-side log line at dispatch — workflow <id> matched/skipped for event <kind> — would collapse this from a day to a minute, independent of whether #2980 gets fixed.

    Happy to run any probe against the hosted relay that would help narrow it.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions