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

推荐订阅源

GbyAI
GbyAI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
大猫的无限游戏
大猫的无限游戏
H
Help Net Security
G
Google Developers Blog
D
Docker
阮一峰的网络日志
阮一峰的网络日志
A
About on SuperTechFans
aimingoo的专栏
aimingoo的专栏
博客园 - 聂微东
Hugging Face - Blog
Hugging Face - Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Apple Machine Learning Research
Apple Machine Learning Research
云风的 BLOG
云风的 BLOG
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
腾讯CDC
T
The Blog of Author Tim Ferriss
Microsoft Security Blog
Microsoft Security Blog
WordPress大学
WordPress大学
I
InfoQ
Engineering at Meta
Engineering at Meta
Stack Overflow Blog
Stack Overflow Blog
Google DeepMind News
Google DeepMind News

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 context reset boundary · openclaw/openclaw@b...
VACInc · 2026-05-12 · via Recent Commits to openclaw:main

@@ -481,4 +481,91 @@ describe("telegram message cache", () => {

481481

expect(context.find((entry) => entry.node.messageId === "33868")?.isReplyTarget).toBe(true);

482482

expect(context.find((entry) => entry.node.messageId === "34477")).toBeUndefined();

483483

});

484+485+

it("does not select messages before the latest session reset command", () => {

486+

const cache = createTelegramMessageCache();

487+

const beforeSession = Date.parse("2026-05-10T12:40:00.000Z");

488+

const sessionStartedAt = Date.parse("2026-05-10T17:30:43.980Z");

489+

const afterSession = Date.parse("2026-05-11T23:36:00.000Z");

490+

const staleInstruction = "okay so we just flip in openclaw? if yes do it up";

491+

const record = (params: {

492+

id: number;

493+

text: string;

494+

timestampMs: number;

495+

replyTo?: { id: number; text: string; timestampMs: number };

496+

}) =>

497+

cache.record({

498+

accountId: "default",

499+

chatId: 7,

500+

threadId: 22534,

501+

msg: {

502+

chat: { id: 7, type: "supergroup", title: "Ops", is_forum: true },

503+

message_thread_id: 22534,

504+

message_id: params.id,

505+

date: Math.floor(params.timestampMs / 1000),

506+

text: params.text,

507+

from: { id: params.id, is_bot: false, first_name: "Requester" },

508+

...(params.replyTo

509+

? {

510+

reply_to_message: {

511+

chat: { id: 7, type: "supergroup", title: "Ops", is_forum: true },

512+

message_thread_id: 22534,

513+

message_id: params.replyTo.id,

514+

date: Math.floor(params.replyTo.timestampMs / 1000),

515+

text: params.replyTo.text,

516+

from: { id: params.replyTo.id, is_bot: false, first_name: "Requester" },

517+

} as Message["reply_to_message"],

518+

}

519+

: {}),

520+

} as Message,

521+

});

522+523+

record({ id: 84669, text: "earlier topic setup", timestampMs: beforeSession - 1000 });

524+

record({ id: 84670, text: staleInstruction, timestampMs: beforeSession });

525+

record({ id: 84671, text: "old reply context", timestampMs: beforeSession + 1000 });

526+

record({ id: 85000, text: "/new", timestampMs: sessionStartedAt });

527+

record({

528+

id: 87183,

529+

text: "post-reset context",

530+

timestampMs: afterSession - 60_000,

531+

replyTo: { id: 84670, text: staleInstruction, timestampMs: beforeSession },

532+

});

533+

record({ id: 87184, text: "how does this determine stability?", timestampMs: afterSession });

534+535+

const replyChainNodes = buildTelegramReplyChain({

536+

cache,

537+

accountId: "default",

538+

chatId: 7,

539+

msg: {

540+

chat: { id: 7, type: "supergroup", title: "Ops", is_forum: true },

541+

message_thread_id: 22534,

542+

message_id: 87185,

543+

date: Math.floor(afterSession / 1000) + 30,

544+

text: "follow up",

545+

from: { id: 87185, is_bot: false, first_name: "Requester" },

546+

reply_to_message: {

547+

chat: { id: 7, type: "supergroup", title: "Ops", is_forum: true },

548+

message_thread_id: 22534,

549+

message_id: 84670,

550+

date: Math.floor(beforeSession / 1000),

551+

text: staleInstruction,

552+

from: { id: 84670, is_bot: false, first_name: "Requester" },

553+

} as Message["reply_to_message"],

554+

} as Message,

555+

});

556+557+

const context = buildTelegramConversationContext({

558+

cache,

559+

accountId: "default",

560+

chatId: 7,

561+

messageId: "87185",

562+

threadId: 22534,

563+

replyChainNodes,

564+

recentLimit: 10,

565+

replyTargetWindowSize: 1,

566+

});

567+568+

expect(context.map((entry) => entry.node.messageId)).toEqual(["87183", "87184"]);

569+

expect(context.map((entry) => entry.node.body)).not.toContain(staleInstruction);

570+

});

484571

});