Files
openclaw/qa/scenarios/channels/telegram-tools-compact-command.yaml
Dallin Romney e3671e0980 refactor(qa): canonicalize channel command scenarios (#101080)
* test(qa): migrate channel command scenarios

* test(qa): distinguish portable command headings

* test(qa): preserve canonical scenario ownership
2026-07-06 12:18:06 -07:00

52 lines
2.0 KiB
YAML

title: Telegram compact tools command reply
scenario:
id: telegram-tools-compact-command
surface: channel-framework
category: channel-framework.channel-actions-commands-and-approvals
coverage:
primary: [channels.native-commands]
objective: Verify Telegram renders the compact model-tool inventory.
successCriteria:
- The compact tools command reaches native command dispatch.
- The joined reply includes exec and the verbose-mode hint.
codeRefs:
- src/auto-reply/reply/commands-tools.ts
- extensions/qa-lab/src/live-transports/telegram/adapter.runtime.ts
execution:
kind: flow
channel: telegram
summary: Request compact tools through Telegram and verify inventory text.
config:
expectedAny: [exec, Use /tools verbose for descriptions.]
flow:
steps:
- name: compact tools renders inventory
actions:
- resetTransport: true
- set: startIndex
value:
expr: "state.getSnapshot().messages.filter((message) => message.direction === 'outbound').length"
- sendInbound:
conversation: { id: telegram-command-room, kind: channel }
senderId: qa-command-operator
senderName: QA Command Operator
text:
expr: "transport.id === 'telegram' ? '/tools@openclaw compact' : '/tools compact'"
- waitForOutbound:
conversation: { id: telegram-command-room, kind: channel }
sinceIndex: { ref: startIndex }
textIncludes: exec
timeoutMs: 60000
- call: sleep
args: [1000]
- set: joinedReply
value:
expr: "state.getSnapshot().messages.filter((message) => message.direction === 'outbound').slice(startIndex).map((message) => message.text).join('\\n')"
- assert:
expr: "config.expectedAny.every((needle) => joinedReply.includes(needle))"
message:
expr: "`tools reply missing expected text: ${joinedReply}`"
detailsExpr: joinedReply