惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 司徒正美
大猫的无限游戏
大猫的无限游戏
腾讯CDC
J
Java Code Geeks
博客园 - 【当耐特】
Microsoft Azure Blog
Microsoft Azure Blog
V
Visual Studio Blog
人人都是产品经理
人人都是产品经理
博客园 - Franky
博客园 - 聂微东
阮一峰的网络日志
阮一峰的网络日志
美团技术团队
云风的 BLOG
云风的 BLOG
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
U
Unit 42
雷峰网
雷峰网
B
Blog RSS Feed
博客园_首页
量子位
F
Fortinet All Blogs
罗磊的独立博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More
酷 壳 – CoolShell
酷 壳 – CoolShell
C
Check Point Blog

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
test: remove duplicate telegram retry tests · openclaw/op...
steipete · 2026-04-24 · via Recent Commits to openclaw:main

@@ -1347,136 +1347,6 @@ describe("createTelegramBot", () => {

13471347

expect(replySpy).toHaveBeenCalledTimes(2);

13481348

});

134913491350-

it("retries native command updates after a bubbled handler failure", async () => {

1351-

loadConfig.mockReturnValue({

1352-

commands: { native: true },

1353-

channels: {

1354-

telegram: {

1355-

dmPolicy: "open",

1356-

allowFrom: ["*"],

1357-

},

1358-

},

1359-

});

1360-1361-

createTelegramBot({ token: "tok" });

1362-

const verboseHandler = commandSpy.mock.calls.find((call) => call[0] === "verbose")?.[1] as

1363-

| ((ctx: Record<string, unknown>) => Promise<void>)

1364-

| undefined;

1365-

if (!verboseHandler) {

1366-

throw new Error("verbose command handler missing");

1367-

}

1368-1369-

const middlewares = middlewareUseSpy.mock.calls

1370-

.map((call) => call[0])

1371-

.filter(

1372-

(fn): fn is (ctx: Record<string, unknown>, next: () => Promise<void>) => Promise<void> =>

1373-

typeof fn === "function",

1374-

);

1375-

const runMiddlewareChain = async (ctx: Record<string, unknown>) => {

1376-

let idx = -1;

1377-

const dispatch = async (i: number): Promise<void> => {

1378-

if (i <= idx) {

1379-

throw new Error("middleware dispatch called multiple times");

1380-

}

1381-

idx = i;

1382-

const fn = middlewares[i];

1383-

if (!fn) {

1384-

await verboseHandler(ctx);

1385-

return;

1386-

}

1387-

await fn(ctx, async () => dispatch(i + 1));

1388-

};

1389-

await dispatch(0);

1390-

};

1391-1392-

const ctx = {

1393-

update: { update_id: 333 },

1394-

message: {

1395-

chat: { id: 12345, type: "private" },

1396-

from: { id: 12345, username: "testuser" },

1397-

text: "/verbose on",

1398-

date: 1736380800,

1399-

message_id: 42,

1400-

},

1401-

match: "on",

1402-

};

1403-1404-

const loadConfigCallsBeforeRetry = loadConfig.mock.calls.length;

1405-

loadConfig.mockImplementationOnce(() => {

1406-

throw new Error("cfg boom");

1407-

});

1408-

await expect(runMiddlewareChain(ctx)).rejects.toThrow("cfg boom");

1409-

const loadConfigCallsAfterFailure = loadConfig.mock.calls.length;

1410-

await runMiddlewareChain(ctx);

1411-1412-

expect(loadConfigCallsAfterFailure).toBe(loadConfigCallsBeforeRetry + 1);

1413-

expect(loadConfig.mock.calls.length).toBeGreaterThan(loadConfigCallsAfterFailure);

1414-

});

1415-1416-

it("retries group migration updates after a bubbled handler failure", async () => {

1417-

const writeConfigFileSpy = mockTelegramConfigWrites();

1418-

loadConfig.mockReturnValue({

1419-

channels: {

1420-

telegram: {

1421-

groups: {

1422-

"-1001": {

1423-

enabled: true,

1424-

},

1425-

},

1426-

},

1427-

},

1428-

});

1429-1430-

createTelegramBot({ token: "tok" });

1431-

const migrationHandler = getOnHandler("message:migrate_to_chat_id");

1432-

const middlewares = middlewareUseSpy.mock.calls

1433-

.map((call) => call[0])

1434-

.filter(

1435-

(fn): fn is (ctx: Record<string, unknown>, next: () => Promise<void>) => Promise<void> =>

1436-

typeof fn === "function",

1437-

);

1438-

const runMiddlewareChain = async (ctx: Record<string, unknown>) => {

1439-

let idx = -1;

1440-

const dispatch = async (i: number): Promise<void> => {

1441-

if (i <= idx) {

1442-

throw new Error("middleware dispatch called multiple times");

1443-

}

1444-

idx = i;

1445-

const fn = middlewares[i];

1446-

if (!fn) {

1447-

await migrationHandler(ctx);

1448-

return;

1449-

}

1450-

await fn(ctx, async () => dispatch(i + 1));

1451-

};

1452-

await dispatch(0);

1453-

};

1454-1455-

const ctx = {

1456-

update: { update_id: 444 },

1457-

message: {

1458-

chat: { id: -1001, type: "supergroup", title: "Old Group" },

1459-

migrate_to_chat_id: -1002,

1460-

},

1461-

};

1462-1463-

const loadConfigCallsBeforeRetry = loadConfig.mock.calls.length;

1464-

loadConfig.mockImplementationOnce(() => {

1465-

throw new Error("cfg boom");

1466-

});

1467-

try {

1468-

await expect(runMiddlewareChain(ctx)).rejects.toThrow("cfg boom");

1469-

const loadConfigCallsAfterFailure = loadConfig.mock.calls.length;

1470-

await runMiddlewareChain(ctx);

1471-1472-

expect(loadConfigCallsAfterFailure).toBe(loadConfigCallsBeforeRetry + 1);

1473-

expect(loadConfig.mock.calls.length).toBeGreaterThan(loadConfigCallsAfterFailure);

1474-

expect(writeConfigFileSpy).toHaveBeenCalledTimes(1);

1475-

} finally {

1476-

writeConfigFileSpy.mockRestore();

1477-

}

1478-

});

1479-14801350

const groupPolicyCases: Array<{

14811351

name: string;

14821352

config: Record<string, unknown>;