Workflow actions send_dm and set_channel_topic unimplemented; add_reaction fails at runtime (relay cannot auth to its own API)
- Dominant language
- Rust
- Stars
- 32.7k
- Forks
- 4.3k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 253
Description
**Describe the bug**
Several documented workflow actions do not work on the relay and fail silently (no user-visible error):
1. **`send_dm`** — the relay's action sink never implements it. The executor returns `Err(NotImplemented("SendDm"))` after logging `SendDm not yet implemented`, so any run hitting this step fails with no user-visible error. Reproduced: a webhook-triggered workflow with `send_dm` to a hex npub, npub, and display-name `to` produced no DM and no error.
2. **`set_channel_topic`** — same: `SetChannelTopic not yet implemented`, `Err(NotImplemented)`.
3. **`add_reaction`** — the executor posts to the relay's own REST API (`POST {BUZZ_RELAY_BASE_URL}/api/messages/{id}/reactions`, default `http://localhost:3000` inside the container) without any NIP-98 auth (the `BUZZ_API_TOKEN`/`BUZZ_RELAY_PUBKEY` env vars are not set in the relay deployment), so the relay returns 401 and the run fails with a `WebhookError` that is never surfaced. Reproduced on a `message_posted`-triggered workflow (so `trigger.message_id` was populated): no reaction appeared, no error surfaced.
**Steps to reproduce**
- send_dm: create workflow `trigger: {on: webhook}`, step `action: send_dm, to: , text: hi`; `buzz workflows trigger --workflow --inputs '{}'` → no DM anywhere; relay logs `SendDm not yet implemented (to=…)`.
- add_reaction: create workflow `trigger: {on: message_posted, channel: }`, step `action: add_reaction, emoji: "👍"`; post a message in the channel → no reaction on the message; relay logs `AddReaction → :👍:` and the HTTP call fails against the unauthenticated endpoint.
**Expected behavior**
Either implement these actions in the relay (emit real events), or reject them at definition time with a clear error. A run that fails mid-way currently leaves no trace for the user (`workflows runs` also returns `[]` because the relay never emits run events, and step errors are only visible in relay logs).
**Root-cause pointers (from source)**
- Relay action sink implements only `send_message`: `crates/buzz-relay/src/workflow_sink.rs` (`impl ActionSink for RelayActionSink`)
- Executor stubs: `crates/buzz-workflow/src/executor.rs` — `SendDm`/`SetChannelTopic` → `WorkflowError::NotImplemented`; `AddReaction` → `add_reaction_impl` POSTs to `/api/messages/{id}/reactions` with optional `BUZZ_API_TOKEN`/`BUZZ_RELAY_PUBKEY` env auth (unset in the container deployment) → 401
- CLI comment confirms run events are never emitted: `crates/buzz-cli/src/commands/workflows.rs` (`cmd_get_workflow_runs` NOTE)
**Version and platform**
- Buzz version: v0.2.0 (relay image ghcr.io/block/buzz:main, built 2026-08-01)
- OS: macOS host, relay in Docker (docker-compose buzz-prod)
**Logs / additional context**
Relay log for add_reaction run: `{"level":"INFO","message":"AddReaction → :👍:","run_id":…}` followed by a failed HTTP call to the local API (401). No error event is emitted to the channel; the failure is only observable in relay logs.
Contributor guide
Assessment
This issue has not been assessed yet.