Workflow template variables render literally in send_message despite inputs: declaration + --inputs JSON
- Dominant language
- Rust
- Stars
- 32.7k
- Forks
- 4.3k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 253
Description
## Describe the bug
Workflow template variables (`{{gate_name}}`, `{{gate_description}}`) render as **literal strings** in `send_message` step output. The workflow engine does not interpolate `{{variable}}` references, regardless of whether inputs are declared in the workflow YAML and/or passed via `buzz workflows trigger --inputs ''`.
## Steps to reproduce
### 1. Create a workflow with template variables
```yaml
name: trent-gate-approval
description: Replaces trent-gate-pusher 60s poller.
trigger:
on: webhook
inputs:
- key: gate_name
required: true
- key: gate_description
required: true
steps:
- id: gate_notification
action: send_message
text: "Gate approval required: {{gate_name}} - {{gate_description}}"
- id: trent_approval
action: request_approval
from:
message: "Approve gate: {{gate_name}}"
- id: result
action: send_message
text: "Gate {{gate_name}} resolved by Trent."
```
Workflow ID: `2524dcb8-b67d-4146-9514-0d0303a75503`
Channel: `#command-center` (`fd688946-bf0e-4a70-bc9d-f51bd19736aa`)
Relay: `wss://suppvault.communities.buzz.xyz`
### 2. Trigger it with inputs
```bash
buzz workflows trigger \
--workflow 2524dcb8-b67d-4146-9514-0d0303a75503 \
--inputs '{"gate_name":"INTERPOLATION-TEST","gate_description":"Testing if explicit inputs declaration fixes template interpolation"}'
```
### 3. Observe the message that lands in-channel
The `send_message` step posts: `Gate approval required: {{gate_name}} - {{gate_description}}`
The template variables are **not** replaced with the input values.
## Expected behavior
`send_message` should post: `Gate approval required: INTERPOLATION-TEST - Testing if explicit inputs declaration fixes template interpolation`
At minimum, simple `{{key}}` substitution from `--inputs` JSON should work. Full mustache conditionals (`{{#key}}...{{/key}}`) are nice-to-have, not blocking.
## Version and platform
- Buzz version: Desktop 0.5.5
- Relay: `wss://suppvault.communities.buzz.xyz`
- OS: macOS 26.5.2
## Logs / additional context
### 4 trigger attempts — all show literal template vars
| Run | Event ID | Content (verbatim) |
|-----|----------|---------------------|
| 1 | `3bb2dd19...` | `Gate approval required: {{gate_name}} - {{gate_description}}` |
| 2 | `d667d286...` | `Gate approval required: {{gate_name}} - {{gate_description}}` |
| 3 | `dcc841ba...` | `Gate approval required: {{gate_name}} - {{gate_description}}` |
| 4 (post-update) | `a5ea5fec...` | `Gate approval required: {{gate_name}} - {{gate_description}}` |
All confirmed via `buzz messages get --channel --limit N`.
### What was tested to rule out user error
1. **Without explicit `inputs:` declaration** — same result (literal template vars)
2. **With explicit `inputs:` declaration** in workflow YAML (added `inputs:` block with `key`/`required` fields) — same result after workflow update
3. **JSON input format** — `--inputs` receives valid JSON with keys matching template var names
4. **Direct `buzz messages send`** — works correctly (pre-formatted message arrives as written), confirming the issue is specific to the workflow `send_message` step, not the message pipeline
### Separate from request_approval defect
This is independent of the `request_approval` silent-no-op bug (filed separately). Template interpolation affects `send_message` text even in workflows that don't use `request_approval`.
Contributor guide
Research direction
Start at the workflow engine's send_message step and the buzz workflows trigger --inputs entry point; reproduce the issue with the YAML workflow and JSON inputs shown. Trace how gate_name and gate_description reach message text rendering. Done means simple {{key}} references are replaced with the supplied values in send_message output, with regression coverage for the reported case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100