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

推荐订阅源

阮一峰的网络日志
阮一峰的网络日志
Hugging Face - Blog
Hugging Face - Blog
Recent Announcements
Recent Announcements
MongoDB | Blog
MongoDB | Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
G
Google Developers Blog
L
LangChain Blog
The GitHub Blog
The GitHub Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
GbyAI
GbyAI
MyScale Blog
MyScale Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
U
Unit 42
Martin Fowler
Martin Fowler
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Apple Machine Learning Research
Apple Machine Learning Research
爱范儿
爱范儿
博客园 - 聂微东
大猫的无限游戏
大猫的无限游戏
M
MIT News - Artificial intelligence
A
About on SuperTechFans
Stack Overflow Blog
Stack Overflow Blog
V
V2EX

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): share persisted reply cache buckets · open...
obviyus · 2026-05-08 · via Recent Commits to openclaw:main

@@ -34,7 +34,7 @@ describe("telegram message cache", () => {

3434

chat: { id: 7, type: "private", first_name: "Ada" },

3535

message_id: 9001,

3636

date: 1736380750,

37-

text: "r u back from hermes",

37+

text: "The cache warmer is the piece I meant",

3838

from: { id: 2, is_bot: false, first_name: "Ada" },

3939

reply_to_message: {

4040

chat: { id: 7, type: "private", first_name: "Kesava" },

@@ -56,13 +56,13 @@ describe("telegram message cache", () => {

5656

msg: {

5757

chat: { id: 7, type: "private", first_name: "Grace" },

5858

message_id: 9002,

59-

text: "why did you reply?",

59+

text: "Please explain what this reply was about",

6060

from: { id: 3, is_bot: false, first_name: "Grace" },

6161

reply_to_message: {

6262

chat: { id: 7, type: "private", first_name: "Ada" },

6363

message_id: 9001,

6464

date: 1736380750,

65-

text: "r u back from hermes",

65+

text: "The cache warmer is the piece I meant",

6666

from: { id: 2, is_bot: false, first_name: "Ada" },

6767

} as Message["reply_to_message"],

6868

} as Message,

@@ -71,7 +71,7 @@ describe("telegram message cache", () => {

7171

expect(chain).toEqual([

7272

expect.objectContaining({

7373

messageId: "9001",

74-

body: "r u back from hermes",

74+

body: "The cache warmer is the piece I meant",

7575

replyToId: "9000",

7676

}),

7777

expect.objectContaining({

@@ -84,4 +84,67 @@ describe("telegram message cache", () => {

8484

await rm(persistedPath, { force: true });

8585

}

8686

});

87+88+

it("shares one persisted bucket across live cache instances", async () => {

89+

const storePath = `/tmp/openclaw-telegram-message-cache-shared-${process.pid}-${Date.now()}.json`;

90+

const persistedPath = resolveTelegramMessageCachePath(storePath);

91+

await rm(persistedPath, { force: true });

92+

try {

93+

const firstCache = createTelegramMessageCache({ persistedPath });

94+

const secondCache = createTelegramMessageCache({ persistedPath });

95+

firstCache.record({

96+

accountId: "default",

97+

chatId: 7,

98+

msg: {

99+

chat: { id: 7, type: "private", first_name: "Nora" },

100+

message_id: 9100,

101+

date: 1736380700,

102+

text: "Architecture sketch for the cache warmer",

103+

from: { id: 1, is_bot: false, first_name: "Nora" },

104+

} as Message,

105+

});

106+

secondCache.record({

107+

accountId: "default",

108+

chatId: 7,

109+

msg: {

110+

chat: { id: 7, type: "private", first_name: "Ira" },

111+

message_id: 9101,

112+

date: 1736380750,

113+

text: "The cache warmer is the piece I meant",

114+

from: { id: 2, is_bot: false, first_name: "Ira" },

115+

reply_to_message: {

116+

chat: { id: 7, type: "private", first_name: "Nora" },

117+

message_id: 9100,

118+

date: 1736380700,

119+

text: "Architecture sketch for the cache warmer",

120+

from: { id: 1, is_bot: false, first_name: "Nora" },

121+

} as Message["reply_to_message"],

122+

} as Message,

123+

});

124+125+

const reloadedCache = createTelegramMessageCache({ persistedPath });

126+

const chain = buildTelegramReplyChain({

127+

cache: reloadedCache,

128+

accountId: "default",

129+

chatId: 7,

130+

msg: {

131+

chat: { id: 7, type: "private", first_name: "Mina" },

132+

message_id: 9102,

133+

text: "Please explain what this reply was about",

134+

from: { id: 3, is_bot: false, first_name: "Mina" },

135+

reply_to_message: {

136+

chat: { id: 7, type: "private", first_name: "Ira" },

137+

message_id: 9101,

138+

date: 1736380750,

139+

text: "The cache warmer is the piece I meant",

140+

from: { id: 2, is_bot: false, first_name: "Ira" },

141+

} as Message["reply_to_message"],

142+

} as Message,

143+

});

144+145+

expect(chain.map((entry) => entry.messageId)).toEqual(["9101", "9100"]);

146+

} finally {

147+

await rm(persistedPath, { force: true });

148+

}

149+

});

87150

});