Skip to content

sensor-monitor: use {{...}} reference syntax (avoid ${...} config-reader collision)#10

Merged
Daniel Botros (danielbotros) merged 2 commits into
mainfrom
mustache-reference-syntax
Jun 25, 2026
Merged

sensor-monitor: use {{...}} reference syntax (avoid ${...} config-reader collision)#10
Daniel Botros (danielbotros) merged 2 commits into
mainfrom
mustache-reference-syntax

Conversation

@danielbotros

@danielbotros Daniel Botros (danielbotros) commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

What

Switches the action-command reference delimiter from ${...} to {{...}} (mustache-style).

Why

The Viam config reader reserves ${...} for its own placeholder replacement and rejects unknown placeholders before the module ever sees the config. So a config like "ts": "${msg.ts}" fails at load with:

error during placeholder replacement   err invalid placeholder "${msg.ts}"; invalid placeholder "${value}"; ...

{{...}} doesn't collide with anything the config reader processes, so action references load and resolve cleanly.

Changes

  • refExact / refAny now match {{...}}; references are whitespace-trimmed.
  • Updated all doc comments, resolveValue error messages, tests, and the README (with a note explaining the delimiter choice).

Follow-up to #9 (the action model), which used ${...}.

🤖 Generated with Claude Code

The Viam config reader reserves ${...} for its own placeholder replacement and
rejects unknown placeholders before the module sees the config. Switch the
action command reference delimiter to {{...}} (mustache-style) to avoid the
collision; also trim whitespace inside references. Updates code, tests, and README.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@danielbotros Daniel Botros (danielbotros) merged commit 091dfa2 into main Jun 25, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants