Repository navigation
fix(labs/openclaw): correct env-substitution syntax (${VAR}, not __VAR__) - #150
Merged
Merged
Conversation
…R__) PR #148 used __TRADING_DATA_URL__ / __TRADING_DATA_TOKEN__ as env-var placeholders by analogy with the existing coinglass entry. Pod logs after deploy showed the bridge failing every ~30 s with: [bundle-mcp] failed to start server "trading-data" (node /scripts/...): McpError: MCP error -32603: Failed to parse URL from __TRADING_DATA_URL__ Reading mctl-openclaw src/config/env-substitution.test.ts confirms the real syntax is bash-style \${VAR}. The __NAME__ pattern in coinglass' own entry is just a literal string that the coinglass bridge hasn't been actually consuming as the API key — it only worked-by-accident either because the operator never relied on coinglass-MCP tools (skill snapshots use Binance + OKX inline REST, not coinglass MCP for CVD), or because of a separate fallback path. Switch trading-data to \${TRADING_DATA_URL} / \${TRADING_DATA_TOKEN}. The pod env block in this same chart already exposes TRADING_DATA_URL as a literal string, and TRADING_DATA_TOKEN comes from the labs-trading-data-client envFrom secret — both end up in pod env at boot, openclaw substitutes from pod env into mcp.servers.<x>.env at config load, and the bridge spawned process gets the resolved values. Pod will Recreate to reload openclaw.json. After recreate the bridge should handshake successfully and the next /eth ETH call will populate cvd_24h.per_exchange.{bybit, bitget}.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR #148 used
__TRADING_DATA_URL__placeholders by analogy with the existing coinglass entry. After deploy the bridge failed every ~30 s with:mctl-openclaw/src/config/env-substitution.test.tsconfirms the real syntax is bash-style${VAR}. The__NAME__pattern incoinglass' entry is a literal string that the coinglass bridge has presumably never actually been consuming as a working API key — it just doesn't surface in skill output today because the snapshot pipeline pulls CVD via inline Binance + OKX REST (Phase 1.6 + Hook A) and not via coinglass MCP.Switches
trading-dataenv to${TRADING_DATA_URL}and${TRADING_DATA_TOKEN}. The pod env block in this same chart exposesTRADING_DATA_URLliterally;TRADING_DATA_TOKENcomes from thelabs-trading-data-clientenvFrom secret. openclaw resolves both placeholders against pod env at config load → bridge spawned process receives the resolved values.Test plan
Failed to parse URL from __TRADING_DATA_URL__kubectl exec deploy/labs-openclaw-base-service -- bash -c 'echo {...} | node /scripts/trading-data-mcp-proxy.js'returns 200 SSE init result/eth ETHin Telegram populatescvd_24h.per_exchange.{bybit, bitget}(or<venue>_window_incompleteif the trading-data pod is fresh)