fix(release): stabilize full validation gates · openclaw/openclaw@5aa9377
steipete
·
2026-05-10
·
via Recent Commits to openclaw:main
File tree
extensions/qa-lab/src/live-transports/telegram
| Original file line number | Diff line number | Diff line change |
|---|
@@ -740,7 +740,7 @@ describe("telegram live qa runtime", () => {
|
740 | 740 | sutBotId: 88, |
741 | 741 | message: { |
742 | 742 | updateId: 3, |
743 | | -messageId: 12, |
| 743 | +messageId: 56, |
744 | 744 | chatId: -100123, |
745 | 745 | senderId: 88, |
746 | 746 | senderIsBot: true, |
@@ -753,6 +753,27 @@ describe("telegram live qa runtime", () => {
|
753 | 753 | }, |
754 | 754 | }), |
755 | 755 | ).toBe(true); |
| 756 | +expect( |
| 757 | +__testing.matchesTelegramScenarioReply({ |
| 758 | +allowAnySutReply: true, |
| 759 | +groupId: "-100123", |
| 760 | +sentMessageId: 55, |
| 761 | +sutBotId: 88, |
| 762 | +message: { |
| 763 | +updateId: 4, |
| 764 | +messageId: 54, |
| 765 | +chatId: -100123, |
| 766 | +senderId: 88, |
| 767 | +senderIsBot: true, |
| 768 | +senderUsername: "sut_bot", |
| 769 | +text: "stale reply from a previous scenario", |
| 770 | +replyToMessageId: undefined, |
| 771 | +timestamp: 1_700_000_004_000, |
| 772 | +inlineButtons: [], |
| 773 | +mediaKinds: [], |
| 774 | +}, |
| 775 | +}), |
| 776 | +).toBe(false); |
756 | 777 | }); |
757 | 778 | |
758 | 779 | it("validates expected Telegram reply markers", () => { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1246,7 +1246,7 @@ function matchesTelegramScenarioReply(params: {
|
1246 | 1246 | return true; |
1247 | 1247 | } |
1248 | 1248 | if (params.allowAnySutReply === true) { |
1249 | | -return true; |
| 1249 | +return params.message.messageId > params.sentMessageId; |
1250 | 1250 | } |
1251 | 1251 | return Boolean(params.matchText && params.message.text.includes(params.matchText)); |
1252 | 1252 | } |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -8,7 +8,7 @@ const {
|
8 | 8 | listReadOnlyChannelPluginsForConfigMock, |
9 | 9 | hasConfiguredChannelsForReadOnlyScopeMock, |
10 | 10 | } = vi.hoisted(() => ({ |
11 | | -collectChannelSecurityFindingsMock: vi.fn(async () => [ |
| 11 | +collectChannelSecurityFindingsMock: vi.fn(async (..._args: unknown[]) => [ |
12 | 12 | { |
13 | 13 | checkId: "channels.telegram.setup_fallback_audited", |
14 | 14 | severity: "warn", |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。