|
| 1 | +title: Telegram native queue command rejects ordinary prompt text |
| 2 | + |
| 3 | +scenario: |
| 4 | + id: telegram-queue-invalid-mode |
| 5 | + surface: channels |
| 6 | + category: channels.channel-actions-commands-and-approvals |
| 7 | + coverage: |
| 8 | + primary: |
| 9 | + - telegram.built-in-commands |
| 10 | + regressionRefs: |
| 11 | + - openclaw/openclaw#116688 |
| 12 | + objective: Verify a native Telegram queue command with ordinary trailing text returns its queue-mode validation error without invoking the model or synthesizing a model-failure fallback. |
| 13 | + successCriteria: |
| 14 | + - Telegram accepts the native queue command with its complete trailing argument text. |
| 15 | + - The reply identifies the invalid queue mode and lists supported queue modes. |
| 16 | + - The reply never blames the model, and a mock provider receives no request for the command. |
| 17 | + codeRefs: |
| 18 | + - extensions/telegram/src/bot-native-commands.ts |
| 19 | + - src/auto-reply/reply/get-reply-directives.ts |
| 20 | + - src/auto-reply/reply/directive-handling.queue-validation.ts |
| 21 | + execution: |
| 22 | + kind: flow |
| 23 | + channel: telegram |
| 24 | + summary: Send the reported native queue command and verify its explicit validation reply. |
| 25 | + config: |
| 26 | + commandText: /queue Can you diagnose this? |
| 27 | + invalidModeNeedle: Unrecognized queue mode "Can" |
| 28 | + validModesNeedle: "Valid modes: steer, followup, collect, interrupt." |
| 29 | + falseFallbackNeedle: temporary model failure |
| 30 | + |
| 31 | +flow: |
| 32 | + steps: |
| 33 | + - name: invalid native queue arguments produce a visible command error |
| 34 | + actions: |
| 35 | + - resetTransport: true |
| 36 | + - set: requestCursorBefore |
| 37 | + value: |
| 38 | + expr: "env.mock ? (await fetchJson(`${env.mock.baseUrl}/debug/request-cursor`)).cursor : 0" |
| 39 | + - set: startIndex |
| 40 | + value: |
| 41 | + expr: "state.getSnapshot().messages.filter((message) => message.direction === 'outbound').length" |
| 42 | + - sendInbound: |
| 43 | + conversation: { id: telegram-command-room, kind: channel } |
| 44 | + senderId: qa-command-operator |
| 45 | + senderName: QA Command Operator |
| 46 | + text: { ref: config.commandText } |
| 47 | + nativeCommand: { name: queue } |
| 48 | + - waitForOutbound: |
| 49 | + conversation: { id: telegram-command-room, kind: channel } |
| 50 | + sinceIndex: { ref: startIndex } |
| 51 | + textIncludes: { ref: config.invalidModeNeedle } |
| 52 | + timeoutMs: 60000 |
| 53 | + saveAs: reply |
| 54 | + - assert: |
| 55 | + expr: "reply.text.includes(config.validModesNeedle)" |
| 56 | + message: |
| 57 | + expr: "`queue validation reply omitted the valid modes: ${reply.text}`" |
| 58 | + - assert: |
| 59 | + expr: "!reply.text.includes(config.falseFallbackNeedle)" |
| 60 | + message: |
| 61 | + expr: "`queue validation emitted the false model fallback: ${reply.text}`" |
| 62 | + - set: scenarioRequests |
| 63 | + value: |
| 64 | + expr: "env.mock ? await fetchJson(`${env.mock.baseUrl}/debug/requests?after=${requestCursorBefore}`) : []" |
| 65 | + - assert: |
| 66 | + expr: "!env.mock || scenarioRequests.length === 0" |
| 67 | + message: |
| 68 | + expr: "`native queue validation unexpectedly invoked the model ${String(scenarioRequests.length)} time(s)`" |
| 69 | + detailsExpr: reply.text |
0 commit comments