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

推荐订阅源

Last Week in AI
Last Week in AI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园_首页
雷峰网
雷峰网
IT之家
IT之家
I
InfoQ
酷 壳 – CoolShell
酷 壳 – CoolShell
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
B
Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 【当耐特】
大猫的无限游戏
大猫的无限游戏
博客园 - 聂微东
Hugging Face - Blog
Hugging Face - Blog
A
About on SuperTechFans
月光博客
月光博客
P
Proofpoint News Feed
博客园 - 三生石上(FineUI控件)
J
Java Code Geeks
G
Google Developers Blog
小众软件
小众软件
宝玉的分享
宝玉的分享
Jina AI
Jina AI
V
Visual Studio 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
fix: isolate telegram room event dispatch fence · opencla...
steipete · 2026-05-16 · via Recent Commits to openclaw:main

@@ -1641,6 +1641,89 @@ describe("dispatchTelegramMessage draft streaming", () => {

16411641

expect(groupHistories.get(historyKey)).toHaveLength(1);

16421642

});

164316431644+

it("does not let room events supersede active user-request dispatch", async () => {

1645+

const historyKey = "telegram:group:-100123";

1646+

const groupHistories = new Map([[historyKey, []]]);

1647+

let firstStarted: (() => void) | undefined;

1648+

const firstStartGate = new Promise<void>((resolve) => {

1649+

firstStarted = resolve;

1650+

});

1651+

let releaseFirst: (() => void) | undefined;

1652+

const firstGate = new Promise<void>((resolve) => {

1653+

releaseFirst = resolve;

1654+

});

1655+

let roomEventStarted: (() => void) | undefined;

1656+

const roomEventStartGate = new Promise<void>((resolve) => {

1657+

roomEventStarted = resolve;

1658+

});

1659+

dispatchReplyWithBufferedBlockDispatcher

1660+

.mockImplementationOnce(async ({ dispatcherOptions }) => {

1661+

firstStarted?.();

1662+

await firstGate;

1663+

await dispatcherOptions.deliver({ text: "visible request answer" }, { kind: "final" });

1664+

return {

1665+

queuedFinal: true,

1666+

counts: { block: 0, final: 1, tool: 0 },

1667+

};

1668+

})

1669+

.mockImplementationOnce(async () => {

1670+

roomEventStarted?.();

1671+

return {

1672+

queuedFinal: false,

1673+

counts: { block: 0, final: 0, tool: 0 },

1674+

sourceReplyDeliveryMode: "message_tool_only",

1675+

};

1676+

});

1677+1678+

const createGroupContext = (

1679+

kind: "user_request" | "room_event",

1680+

messageId: number,

1681+

body: string,

1682+

) =>

1683+

createContext({

1684+

ctxPayload: {

1685+

InboundTurnKind: kind,

1686+

SessionKey: "agent:main:telegram:group:-100123",

1687+

ChatType: "group",

1688+

MessageSid: String(messageId),

1689+

RawBody: body,

1690+

BodyForAgent: body,

1691+

CommandBody: body,

1692+

CommandAuthorized: true,

1693+

} as unknown as TelegramMessageContext["ctxPayload"],

1694+

msg: {

1695+

chat: { id: -100123, type: "supergroup" },

1696+

message_id: messageId,

1697+

} as unknown as TelegramMessageContext["msg"],

1698+

chatId: -100123,

1699+

isGroup: true,

1700+

historyKey,

1701+

historyLimit: 10,

1702+

groupHistories,

1703+

threadSpec: { id: undefined, scope: "none" },

1704+

});

1705+1706+

const userRequestPromise = dispatchWithContext({

1707+

context: createGroupContext("user_request", 99, "@bot answer this"),

1708+

streamMode: "off",

1709+

});

1710+

await firstStartGate;

1711+

const roomEventPromise = dispatchWithContext({

1712+

context: createGroupContext("room_event", 100, "ambient chatter"),

1713+

streamMode: "off",

1714+

});

1715+

await roomEventStartGate;

1716+

releaseFirst?.();

1717+

await Promise.all([userRequestPromise, roomEventPromise]);

1718+1719+

const deliveredTexts = deliverReplies.mock.calls.flatMap((call) =>

1720+

((call[0] as { replies?: Array<{ text?: string }> }).replies ?? []).map(

1721+

(reply) => reply.text,

1722+

),

1723+

);

1724+

expect(deliveredTexts).toContain("visible request answer");

1725+

});

1726+16441727

it("does not send visible error fallbacks for room events", async () => {

16451728

const historyKey = "telegram:group:-100123";

16461729

const groupHistories = new Map([