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

推荐订阅源

腾讯CDC
Microsoft Azure Blog
Microsoft Azure Blog
L
LangChain Blog
Y
Y Combinator Blog
Microsoft Security Blog
Microsoft Security Blog
宝玉的分享
宝玉的分享
B
Blog RSS Feed
MongoDB | Blog
MongoDB | Blog
Jina AI
Jina AI
D
Docker
B
Blog
Engineering at Meta
Engineering at Meta
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
I
InfoQ
G
Google Developers Blog
博客园 - Franky
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The GitHub Blog
The GitHub Blog
T
The Blog of Author Tim Ferriss
大猫的无限游戏
大猫的无限游戏
阮一峰的网络日志
阮一峰的网络日志
U
Unit 42

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: keep telegram room events fully quiet · openclaw/ope...
steipete · 2026-05-16 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -46,6 +46,42 @@ describe("telegram inbound turn delivery", () => {

4646

end();

4747

});

4848
49+

it("matches provider-prefixed Telegram targets for delivery correlation", () => {

50+

let count = 0;

51+

const end = beginTelegramInboundTurnDeliveryCorrelation("sess:prefixed", {

52+

outboundTo: "-100123",

53+

markInboundTurnDelivered: () => {

54+

count += 1;

55+

},

56+

});

57+
58+

notifyTelegramInboundTurnOutboundSuccess({

59+

sessionKey: "sess:prefixed",

60+

to: "telegram:-100123",

61+

});

62+
63+

expect(count).toBe(1);

64+

end();

65+

});

66+
67+

it("matches Telegram topic targets by conversation for delivery correlation", () => {

68+

let count = 0;

69+

const end = beginTelegramInboundTurnDeliveryCorrelation("sess:topic", {

70+

outboundTo: "-100123",

71+

markInboundTurnDelivered: () => {

72+

count += 1;

73+

},

74+

});

75+
76+

notifyTelegramInboundTurnOutboundSuccess({

77+

sessionKey: "sess:topic",

78+

to: "telegram:-100123:topic:77",

79+

});

80+
81+

expect(count).toBe(1);

82+

end();

83+

});

84+
4985

it("keeps user-request and room-event delivery correlations separate", () => {

5086

let userRequestCount = 0;

5187

let roomEventCount = 0;

Original file line numberDiff line numberDiff line change

@@ -9,6 +9,30 @@ type ActiveTurn = {

99
1010

const registry = new Map<string, ActiveTurn>();

1111
12+

function normalizeTelegramDeliveryTarget(value: string): string {

13+

return value

14+

.trim()

15+

.toLowerCase()

16+

.replace(/^(telegram|tg):/u, "");

17+

}

18+
19+

function stripTelegramTopicTarget(value: string): string {

20+

return value.replace(/:topic:\d+$/u, "");

21+

}

22+
23+

function telegramDeliveryTargetsMatch(expected: string, actual: string): boolean {

24+

const expectedTarget = normalizeTelegramDeliveryTarget(expected);

25+

const actualTarget = normalizeTelegramDeliveryTarget(actual);

26+

if (expectedTarget === actualTarget) {

27+

return true;

28+

}

29+

const expectedBase = stripTelegramTopicTarget(expectedTarget);

30+

const actualBase = stripTelegramTopicTarget(actualTarget);

31+

return (

32+

expectedBase === actualBase && (expectedTarget === expectedBase || actualTarget === actualBase)

33+

);

34+

}

35+
1236

export function resolveTelegramInboundTurnDeliveryCorrelationKey(

1337

sessionKey: string | undefined,

1438

inboundTurnKind?: TelegramInboundTurnDeliveryKind | string,

@@ -52,7 +76,7 @@ export function notifyTelegramInboundTurnOutboundSuccess(params: {

5276

return;

5377

}

5478

const turn = registry.get(key);

55-

if (!turn || turn.outboundTo !== params.to) {

79+

if (!turn || !telegramDeliveryTargetsMatch(turn.outboundTo, params.to)) {

5680

return;

5781

}

5882

if (turn.outboundAccountId && params.accountId && params.accountId !== turn.outboundAccountId) {

Original file line numberDiff line numberDiff line change

@@ -4785,6 +4785,43 @@ describe("sendPolicy deny — suppress delivery, not processing (#53328)", () =>

47854785

expect(dispatcher.sendToolResult).not.toHaveBeenCalled();

47864786

});

47874787
4788+

it("suppresses marked runtime failure notices for room events", async () => {

4789+

setNoAbort();

4790+

sessionStoreMocks.currentEntry = {

4791+

sessionId: "s1",

4792+

updatedAt: 0,

4793+

sendPolicy: "allow",

4794+

};

4795+

const dispatcher = createDispatcher();

4796+

const failureNotice = setReplyPayloadMetadata(

4797+

{ text: "⚠️ You've reached your Codex subscription usage limit." },

4798+

{ deliverDespiteSourceReplySuppression: true },

4799+

);

4800+

const replyResolver = vi.fn(async () => failureNotice satisfies ReplyPayload);

4801+

const ctx = buildTestCtx({

4802+

ChatType: "group",

4803+

InboundTurnKind: "room_event",

4804+

SessionKey: "test:session",

4805+

});

4806+
4807+

const result = await dispatchReplyFromConfig({

4808+

ctx,

4809+

cfg: emptyConfig,

4810+

dispatcher,

4811+

replyResolver,

4812+

replyOptions: {

4813+

sourceReplyDeliveryMode: "message_tool_only",

4814+

},

4815+

});

4816+
4817+

expect(replyResolver).toHaveBeenCalledTimes(1);

4818+

expect(result.queuedFinal).toBe(false);

4819+

expect(result.sourceReplyDeliveryMode).toBe("message_tool_only");

4820+

expect(dispatcher.sendFinalReply).not.toHaveBeenCalled();

4821+

expect(dispatcher.sendBlockReply).not.toHaveBeenCalled();

4822+

expect(dispatcher.sendToolResult).not.toHaveBeenCalled();

4823+

});

4824+
47884825

it("mirrors internal source reply payloads into the active transcript", async () => {

47894826

setNoAbort();

47904827

sessionStoreMocks.currentEntry = {

Original file line numberDiff line numberDiff line change

@@ -1599,6 +1599,7 @@ export async function dispatchReplyFromConfig(

15991599

let finalDeliveryFailed = false;

16001600

const shouldDeliverDespiteSourceReplySuppression = (reply: ReplyPayload) =>

16011601

suppressAutomaticSourceDelivery &&

1602+

ctx.InboundTurnKind !== "room_event" &&

16021603

!sendPolicyDenied &&

16031604

getReplyPayloadMetadata(reply)?.deliverDespiteSourceReplySuppression === true;

16041605

for (const reply of replies) {