Skip to content

fix(telegram): avoid resolving secrets for status accessors#74833

Open
coolmanns wants to merge 1 commit intoopenclaw:mainfrom
coolmanns:fix/telegram-status-secretref-accessors
Open

fix(telegram): avoid resolving secrets for status accessors#74833
coolmanns wants to merge 1 commit intoopenclaw:mainfrom
coolmanns:fix/telegram-status-secretref-accessors

Conversation

@coolmanns
Copy link
Copy Markdown

Summary

Fix Telegram config/status accessors so read-only metadata paths (allowFrom, defaultTo) do not strict-resolve botToken SecretRefs.

openclaw status can currently fail when Telegram uses a valid file-backed SecretRef:

channels.telegram.botToken: unresolved SecretRef "file:filemain:/telegram/botToken". Resolve this command against an active gateway runtime snapshot before reading it.

The runtime account resolver should still resolve tokens strictly. This PR only adds a config-only accessor account for status/allowlist/default-target metadata, using mergeTelegramAccountConfig instead of resolveTelegramAccount.

Fixes #74832.

Testing

pnpm exec vitest run extensions/telegram/src/shared.test.ts extensions/telegram/src/account-inspect.test.ts --config test/vitest/vitest.extension-telegram.config.ts
# 2 files, 15 tests passed

NODE_OPTIONS=--max-old-space-size=8192 pnpm exec tsc -p tsconfig.extensions.test.json --noEmit --pretty false
# 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.

openclaw status fails on Telegram file SecretRef while resolving allowlist metadata

1 participant