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

推荐订阅源

美团技术团队
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Martin Fowler
Martin Fowler
雷峰网
雷峰网
IT之家
IT之家
小众软件
小众软件
M
MIT News - Artificial intelligence
博客园 - 聂微东
J
Java Code Geeks
Blog — PlanetScale
Blog — PlanetScale
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
A
About on SuperTechFans
G
Google Developers Blog
Engineering at Meta
Engineering at Meta
Recent Announcements
Recent Announcements
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The GitHub Blog
The GitHub Blog
F
Fortinet All Blogs
C
Check Point Blog
云风的 BLOG
云风的 BLOG
腾讯CDC
H
Help Net Security
Y
Y Combinator Blog
I
InfoQ

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
perf(memory): avoid duplicate session store reads · openc...
steipete · 2026-04-26 · via Recent Commits to openclaw:main

@@ -53,6 +53,13 @@ function writeSessionJsonl(fileName: string, records: readonly unknown[]): strin

5353

return filePath;

5454

}

555556+

function buildSessionEntryWithoutStoreClassification(filePath: string) {

57+

return buildSessionEntry(filePath, {

58+

generatedByCronRun: false,

59+

generatedByDreamingNarrative: false,

60+

});

61+

}

62+5663

describe("listSessionFilesForAgent", () => {

5764

it("includes reset and deleted transcripts in session file listing", async () => {

5865

const sessionsDir = path.join(tmpDir, "agents", "main", "sessions");

@@ -104,7 +111,7 @@ describe("buildSessionEntry", () => {

104111

const filePath = path.join(tmpDir, "session.jsonl");

105112

fsSync.writeFileSync(filePath, jsonlLines.join("\n"));

106113107-

const entry = await buildSessionEntry(filePath);

114+

const entry = await buildSessionEntryWithoutStoreClassification(filePath);

108115

expect(entry).not.toBeNull();

109116110117

// The content should have 3 lines (3 message records)

@@ -131,7 +138,7 @@ describe("buildSessionEntry", () => {

131138

const filePath = path.join(tmpDir, "empty-session.jsonl");

132139

fsSync.writeFileSync(filePath, jsonlLines.join("\n"));

133140134-

const entry = await buildSessionEntry(filePath);

141+

const entry = await buildSessionEntryWithoutStoreClassification(filePath);

135142

expect(entry).not.toBeNull();

136143

expect(entry!.content).toBe("");

137144

expect(entry!.lineMap).toEqual([]);

@@ -149,7 +156,7 @@ describe("buildSessionEntry", () => {

149156

const filePath = path.join(tmpDir, "gaps.jsonl");

150157

fsSync.writeFileSync(filePath, jsonlLines.join("\n"));

151158152-

const entry = await buildSessionEntry(filePath);

159+

const entry = await buildSessionEntryWithoutStoreClassification(filePath);

153160

expect(entry).not.toBeNull();

154161

expect(entry!.lineMap).toEqual([3, 5]);

155162

expect(entry!.messageTimestampsMs).toEqual([0, 0]);

@@ -174,7 +181,7 @@ describe("buildSessionEntry", () => {

174181

const filePath = path.join(tmpDir, "timestamps.jsonl");

175182

fsSync.writeFileSync(filePath, jsonlLines.join("\n"));

176183177-

const entry = await buildSessionEntry(filePath);

184+

const entry = await buildSessionEntryWithoutStoreClassification(filePath);

178185

expect(entry).not.toBeNull();

179186

expect(entry!.messageTimestampsMs).toEqual([

180187

Date.parse("2026-04-05T10:00:00.000Z"),

@@ -215,7 +222,7 @@ describe("buildSessionEntry", () => {

215222

const filePath = path.join(tmpDir, "enveloped-session.jsonl");

216223

fsSync.writeFileSync(filePath, jsonlLines.join("\n"));

217224218-

const entry = await buildSessionEntry(filePath);

225+

const entry = await buildSessionEntryWithoutStoreClassification(filePath);

219226

expect(entry).not.toBeNull();

220227221228

const contentLines = entry!.content.split("\n");

@@ -253,7 +260,7 @@ describe("buildSessionEntry", () => {

253260

const filePath = path.join(tmpDir, "enveloped-session-array.jsonl");

254261

fsSync.writeFileSync(filePath, jsonlLines.join("\n"));

255262256-

const entry = await buildSessionEntry(filePath);

263+

const entry = await buildSessionEntryWithoutStoreClassification(filePath);

257264

expect(entry).not.toBeNull();

258265

expect(entry!.content).toBe("User: Actual user text");

259266

});

@@ -271,7 +278,7 @@ describe("buildSessionEntry", () => {

271278

const filePath = path.join(tmpDir, "wrapped-session.jsonl");

272279

fsSync.writeFileSync(filePath, jsonlLines.join("\n"));

273280274-

const entry = await buildSessionEntry(filePath);

281+

const entry = await buildSessionEntryWithoutStoreClassification(filePath);

275282

expect(entry).not.toBeNull();

276283277284

const contentLines = entry!.content.split("\n");

@@ -293,7 +300,7 @@ describe("buildSessionEntry", () => {

293300

const filePath = path.join(tmpDir, "hard-wrapped-session.jsonl");

294301

fsSync.writeFileSync(filePath, jsonlLines.join("\n"));

295302296-

const entry = await buildSessionEntry(filePath);

303+

const entry = await buildSessionEntryWithoutStoreClassification(filePath);

297304

expect(entry).not.toBeNull();

298305299306

const contentLines = entry!.content.split("\n");

@@ -317,7 +324,7 @@ describe("buildSessionEntry", () => {

317324

const filePath = path.join(tmpDir, "surrogate-safe-session.jsonl");

318325

fsSync.writeFileSync(filePath, jsonlLines.join("\n"));

319326320-

const entry = await buildSessionEntry(filePath);

327+

const entry = await buildSessionEntryWithoutStoreClassification(filePath);

321328

expect(entry).not.toBeNull();

322329323330

const contentLines = entry!.content.split("\n");

@@ -344,7 +351,7 @@ describe("buildSessionEntry", () => {

344351

const filePath = path.join(tmpDir, "assistant-sentinel.jsonl");

345352

fsSync.writeFileSync(filePath, jsonlLines.join("\n"));

346353347-

const entry = await buildSessionEntry(filePath);

354+

const entry = await buildSessionEntryWithoutStoreClassification(filePath);

348355

expect(entry).not.toBeNull();

349356

expect(entry!.content).toBe(`Assistant: ${assistantText}`);

350357

});

@@ -367,7 +374,7 @@ describe("buildSessionEntry", () => {

367374

const filePath = path.join(tmpDir, "dreaming-session.jsonl");

368375

fsSync.writeFileSync(filePath, jsonlLines.join("\n"));

369376370-

const entry = await buildSessionEntry(filePath);

377+

const entry = await buildSessionEntryWithoutStoreClassification(filePath);

371378372379

expect(entry).not.toBeNull();

373380

expect(entry?.generatedByDreamingNarrative).toBe(true);

@@ -478,7 +485,7 @@ describe("buildSessionEntry", () => {

478485

const filePath = path.join(tmpDir, "dreaming-prompt-session.jsonl");

479486

fsSync.writeFileSync(filePath, jsonlLines.join("\n"));

480487481-

const entry = await buildSessionEntry(filePath);

488+

const entry = await buildSessionEntryWithoutStoreClassification(filePath);

482489483490

expect(entry).not.toBeNull();

484491

expect(entry?.generatedByDreamingNarrative).toBeUndefined();

@@ -595,7 +602,7 @@ describe("buildSessionEntry", () => {

595602596603

for (const testCase of cases) {

597604

const filePath = writeSessionJsonl(testCase.fileName, testCase.records);

598-

const entry = await buildSessionEntry(filePath);

605+

const entry = await buildSessionEntryWithoutStoreClassification(filePath);

599606600607

expect(entry, testCase.name).not.toBeNull();

601608

expect(entry?.content, testCase.name).toBe(testCase.content);

@@ -626,7 +633,7 @@ describe("buildSessionEntry", () => {

626633

const filePath = path.join(tmpDir, "spoof-attempt-session.jsonl");

627634

fsSync.writeFileSync(filePath, jsonlLines.join("\n"));

628635629-

const entry = await buildSessionEntry(filePath);

636+

const entry = await buildSessionEntryWithoutStoreClassification(filePath);

630637631638

expect(entry).not.toBeNull();

632639

expect(entry?.content).toContain(

@@ -644,8 +651,8 @@ describe("buildSessionEntry", () => {

644651

fsSync.writeFileSync(deletedPath, content);

645652

fsSync.writeFileSync(checkpointPath, content);

646653647-

const deletedEntry = await buildSessionEntry(deletedPath);

648-

const checkpointEntry = await buildSessionEntry(checkpointPath);

654+

const deletedEntry = await buildSessionEntryWithoutStoreClassification(deletedPath);

655+

const checkpointEntry = await buildSessionEntryWithoutStoreClassification(checkpointPath);

649656650657

expect(deletedEntry).not.toBeNull();

651658

expect(deletedEntry?.content).toBe("");

@@ -672,7 +679,7 @@ describe("buildSessionEntry", () => {

672679

const filePath = path.join(tmpDir, "substring-marker-session.jsonl");

673680

fsSync.writeFileSync(filePath, jsonlLines.join("\n"));

674681675-

const entry = await buildSessionEntry(filePath);

682+

const entry = await buildSessionEntryWithoutStoreClassification(filePath);

676683677684

expect(entry).not.toBeNull();

678685

expect(entry?.generatedByDreamingNarrative).toBeUndefined();