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

推荐订阅源

MyScale Blog
MyScale Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
人人都是产品经理
人人都是产品经理
V
Visual Studio Blog
博客园 - 叶小钗
A
About on SuperTechFans
Last Week in AI
Last Week in AI
量子位
博客园 - 三生石上(FineUI控件)
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
MongoDB | Blog
MongoDB | Blog
T
The Blog of Author Tim Ferriss
Vercel News
Vercel News
博客园 - 司徒正美
博客园 - Franky
博客园 - 【当耐特】
月光博客
月光博客
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Apple Machine Learning Research
Apple Machine Learning Research
Hugging Face - Blog
Hugging Face - Blog
S
SegmentFault 最新的问题
大猫的无限游戏
大猫的无限游戏
博客园 - 聂微东
J
Java Code Geeks

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(telegram): validate dispatch thread ids · openclaw/op...
steipete · 2026-05-29 · via Recent Commits to openclaw:main

@@ -683,6 +683,72 @@ describe("dispatchTelegramMessage draft streaming", () => {

683683

expect(deliverReplies).not.toHaveBeenCalled();

684684

});

685685686+

it("does not recover forum thread context from malformed payload thread ids", async () => {

687+

const generalHistoryKey = "-1003774691294:topic:1";

688+

const spoofedHistoryKey = "-1003774691294:topic:3731";

689+

const groupHistories = new Map([

690+

[generalHistoryKey, [{ sender: "Alice", body: "general topic context", timestamp: 1 }]],

691+

[spoofedHistoryKey, [{ sender: "Bob", body: "spoofed topic context", timestamp: 2 }]],

692+

]);

693+

deliverInboundReplyWithMessageSendContext.mockResolvedValue({

694+

status: "handled_visible",

695+

delivery: {

696+

messageIds: ["1"],

697+

visibleReplySent: true,

698+

},

699+

});

700+

dispatchReplyWithBufferedBlockDispatcher.mockImplementation(async ({ dispatcherOptions }) => {

701+

await dispatcherOptions.deliver({ text: "general final" }, { kind: "final" });

702+

return { queuedFinal: true };

703+

});

704+705+

await dispatchWithContext({

706+

context: createContext({

707+

ctxPayload: {

708+

Body:

709+

"[Chat messages since your last reply - for context]\n" +

710+

"general topic context\n" +

711+

"[Current message - respond to this]\n" +

712+

"current general question",

713+

BodyForAgent: "current general question",

714+

ChatType: "group",

715+

From: "telegram:group:-1003774691294:topic:1",

716+

MessageThreadId: "0xE93",

717+

OriginatingTo: "telegram:-1003774691294",

718+

SessionKey: "agent:main:telegram:group:-1003774691294:topic:1",

719+

To: "telegram:-1003774691294",

720+

TransportThreadId: "0xE93",

721+

} as unknown as TelegramMessageContext["ctxPayload"],

722+

msg: {

723+

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

724+

message_id: 27788,

725+

message_thread_id: undefined,

726+

} as unknown as TelegramMessageContext["msg"],

727+

primaryCtx: {

728+

message: { chat: { id: -1003774691294, type: "supergroup" } },

729+

} as unknown as TelegramMessageContext["primaryCtx"],

730+

chatId: -1003774691294,

731+

isGroup: true,

732+

replyThreadId: undefined,

733+

resolvedThreadId: undefined,

734+

threadSpec: { id: 1, scope: "forum" },

735+

historyKey: generalHistoryKey,

736+

historyLimit: 10,

737+

groupHistories,

738+

}),

739+

replyToMode: "off",

740+

streamMode: "off",

741+

});

742+743+

const outbound = expectRecordFields(mockCallArg(deliverInboundReplyWithMessageSendContext), {

744+

threadId: 1,

745+

});

746+

expectRecordFields(outbound.ctxPayload, {

747+

MessageThreadId: 1,

748+

TransportThreadId: 1,

749+

});

750+

});

751+686752

it("does not recover forum thread context from a different group session key", async () => {

687753

const currentHistoryKey = "-100555:topic:1";

688754

const otherGroupHistoryKey = "-1003774691294:topic:3731";