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

推荐订阅源

freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
P
Proofpoint News Feed
宝玉的分享
宝玉的分享
人人都是产品经理
人人都是产品经理
博客园_首页
爱范儿
爱范儿
博客园 - 叶小钗
aimingoo的专栏
aimingoo的专栏
S
SegmentFault 最新的问题
MyScale Blog
MyScale Blog
阮一峰的网络日志
阮一峰的网络日志
IT之家
IT之家
Microsoft Security Blog
Microsoft Security Blog
Blog — PlanetScale
Blog — PlanetScale
博客园 - 【当耐特】
Y
Y Combinator Blog
量子位
博客园 - 三生石上(FineUI控件)
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
The Blog of Author Tim Ferriss
月光博客
月光博客
有赞技术团队
有赞技术团队
Apple Machine Learning Research
Apple Machine Learning Research
A
About on SuperTechFans

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
test: tighten memory promotion assertions · openclaw/open...
steipete · 2026-05-11 · via Recent Commits to openclaw:main

@@ -87,6 +87,10 @@ describe("short-term promotion", () => {

8787

return candidate.promotedAt;

8888

}

898990+

async function expectEnoent(promise: Promise<unknown>): Promise<void> {

91+

await expect(promise).rejects.toHaveProperty("code", "ENOENT");

92+

}

93+9094

it("detects short-term daily memory paths", () => {

9195

expect(isShortTermMemoryPath("memory/2026-04-03.md")).toBe(true);

9296

expect(isShortTermMemoryPath("2026-04-03.md")).toBe(true);

@@ -190,11 +194,7 @@ describe("short-term promotion", () => {

190194

],

191195

});

192196193-

await expect(

194-

fs.readFile(resolveShortTermRecallStorePath(workspaceDir), "utf-8"),

195-

).rejects.toMatchObject({

196-

code: "ENOENT",

197-

});

197+

await expectEnoent(fs.readFile(resolveShortTermRecallStorePath(workspaceDir), "utf-8"));

198198

});

199199

});

200200

@@ -215,11 +215,7 @@ describe("short-term promotion", () => {

215215

],

216216

});

217217218-

await expect(

219-

fs.readFile(resolveShortTermRecallStorePath(workspaceDir), "utf-8"),

220-

).rejects.toMatchObject({

221-

code: "ENOENT",

222-

});

218+

await expectEnoent(fs.readFile(resolveShortTermRecallStorePath(workspaceDir), "utf-8"));

223219

});

224220

});

225221

@@ -241,12 +237,11 @@ describe("short-term promotion", () => {

241237

],

242238

});

243239244-

expect(

245-

JSON.parse(await fs.readFile(resolveShortTermRecallStorePath(workspaceDir), "utf-8")),

246-

).toMatchObject({

247-

version: 1,

248-

entries: {},

249-

});

240+

const store = JSON.parse(

241+

await fs.readFile(resolveShortTermRecallStorePath(workspaceDir), "utf-8"),

242+

) as { version?: number; entries?: unknown };

243+

expect(store.version).toBe(1);

244+

expect(store.entries).toEqual({});

250245

});

251246

});

252247

@@ -273,12 +268,11 @@ describe("short-term promotion", () => {

273268

],

274269

});

275270276-

expect(

277-

JSON.parse(await fs.readFile(resolveShortTermRecallStorePath(workspaceDir), "utf-8")),

278-

).toMatchObject({

279-

version: 1,

280-

entries: {},

281-

});

271+

const store = JSON.parse(

272+

await fs.readFile(resolveShortTermRecallStorePath(workspaceDir), "utf-8"),

273+

) as { version?: number; entries?: unknown };

274+

expect(store.version).toBe(1);

275+

expect(store.entries).toEqual({});

282276

});

283277

});

284278

@@ -490,11 +484,9 @@ describe("short-term promotion", () => {

490484

});

491485492486

expect(ranked).toHaveLength(1);

493-

expect(ranked[0]).toMatchObject({

494-

recallCount: 0,

495-

dailyCount: 3,

496-

uniqueQueries: 3,

497-

});

487+

expect(ranked[0]?.recallCount).toBe(0);

488+

expect(ranked[0]?.dailyCount).toBe(3);

489+

expect(ranked[0]?.uniqueQueries).toBe(3);

498490

expect(ranked[0]?.recallDays).toEqual(queryDays);

499491

expect(ranked[0]?.score).toBeGreaterThanOrEqual(0.75);

500492

});

@@ -803,10 +795,8 @@ describe("short-term promotion", () => {

803795

const phaseStore = JSON.parse(await fs.readFile(phaseStorePath, "utf-8")) as {

804796

entries: Record<string, { lightHits: number; remHits: number }>;

805797

};

806-

expect(phaseStore.entries[boostedKey]).toMatchObject({

807-

lightHits: 1,

808-

remHits: 1,

809-

});

798+

expect(phaseStore.entries[boostedKey]?.lightHits).toBe(1);

799+

expect(phaseStore.entries[boostedKey]?.remHits).toBe(1);

810800

});

811801

});

812802

@@ -1167,11 +1157,7 @@ describe("short-term promotion", () => {

11671157

});

1168115811691159

expect(applied.applied).toBe(0);

1170-

await expect(

1171-

fs.readFile(path.join(workspaceDir, "MEMORY.md"), "utf-8"),

1172-

).rejects.toMatchObject({

1173-

code: "ENOENT",

1174-

});

1160+

await expectEnoent(fs.readFile(path.join(workspaceDir, "MEMORY.md"), "utf-8"));

11751161

});

11761162

});

11771163

@@ -1214,11 +1200,7 @@ describe("short-term promotion", () => {

12141200

});

1215120112161202

expect(applied.applied).toBe(0);

1217-

await expect(

1218-

fs.readFile(path.join(workspaceDir, "MEMORY.md"), "utf-8"),

1219-

).rejects.toMatchObject({

1220-

code: "ENOENT",

1221-

});

1203+

await expectEnoent(fs.readFile(path.join(workspaceDir, "MEMORY.md"), "utf-8"));

12221204

});

12231205

});

12241206

@@ -1526,9 +1508,7 @@ describe("short-term promotion", () => {

15261508

});

1527150915281510

expect(applied.applied).toBe(0);

1529-

await expect(fs.access(path.join(workspaceDir, "MEMORY.md"))).rejects.toMatchObject({

1530-

code: "ENOENT",

1531-

});

1511+

await expectEnoent(fs.access(path.join(workspaceDir, "MEMORY.md")));

15321512

});

15331513

});

15341514

@@ -1651,10 +1631,12 @@ describe("short-term promotion", () => {

1651163116521632

expect(repair.changed).toBe(true);

16531633

expect(repair.rewroteStore).toBe(true);

1654-

expect(JSON.parse(await fs.readFile(storePath, "utf-8"))).toMatchObject({

1655-

version: 1,

1656-

entries: {},

1657-

});

1634+

const store = JSON.parse(await fs.readFile(storePath, "utf-8")) as {

1635+

version?: number;

1636+

entries?: unknown;

1637+

};

1638+

expect(store.version).toBe(1);

1639+

expect(store.entries).toEqual({});

16581640

});

16591641

});

16601642