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

推荐订阅源

Hugging Face - Blog
Hugging Face - Blog
腾讯CDC
阮一峰的网络日志
阮一峰的网络日志
博客园_首页
Last Week in AI
Last Week in AI
月光博客
月光博客
D
DataBreaches.Net
WordPress大学
WordPress大学
雷峰网
雷峰网
酷 壳 – CoolShell
酷 壳 – CoolShell
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 叶小钗
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
U
Unit 42
Recent Announcements
Recent Announcements
宝玉的分享
宝玉的分享
MyScale Blog
MyScale Blog
C
Check Point Blog
F
Fortinet All Blogs
B
Blog
小众软件
小众软件
Vercel News
Vercel 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(hooks): avoid session memory filename collisions · op...
vincentkoc · 2026-05-05 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -73,6 +73,7 @@ Docs: https://docs.openclaw.ai

7373

- Gateway/status: show recent supervisor restart handoffs in `openclaw gateway status --deep`, including JSON details, so clean service-managed restarts are reported as restart handoffs instead of opaque stopped-service diagnostics. Thanks @shakkernerd.

7474

- Providers/Fireworks: expose Kimi models as thinking-off-only and keep K2.5/K2.6 requests on `thinking: disabled`, so manual model switches do not send Fireworks-rejected `reasoning*` parameters. Refs #74289. Thanks @frankekn.

7575

- WhatsApp responsiveness: stop only verified stale local TUI clients when they degrade the Gateway event loop and delay replies. Thanks @vincentkoc.

76+

- Hooks/session-memory: add collision suffixes to fallback memory filenames so repeated `/new` or `/reset` captures in the same minute do not overwrite the earlier session archive. Thanks @vincentkoc.

7677

- Video generation: wait up to 20 minutes for slow fal/MiniMax queue-backed jobs, stop forwarding unsupported Google Veo generated-audio options, and normalize MiniMax `720P` requests to its supported `768P` resolution with the usual override warning/details instead of failing fallback.

7778

- Video generation: accept provider-specific aspect-ratio and resolution hints at the tool boundary, normalize `720P` to MiniMax's supported `768P`, and stop sending Google `generateAudio` on Gemini video requests so provider fallback can recover from model-specific parameter differences. Thanks @vincentkoc.

7879

- OpenAI/Google Meet: fail realtime voice connection attempts when the socket closes before `session.updated`, avoiding stuck Meet joins waiting on a bridge that never became ready. Thanks @vincentkoc.

Original file line numberDiff line numberDiff line change

@@ -413,6 +413,41 @@ describe("session-memory hook", () => {

413413

});

414414

});

415415
416+

it("keeps same-minute fallback timestamp captures by adding a filename suffix", async () => {

417+

await withEnvAsync({ TZ: "UTC" }, async () => {

418+

const tempDir = await createCaseWorkspace("workspace");

419+

const timestamp = new Date("2026-01-01T04:30:15.000Z");

420+
421+

await runNewWithPreviousSessionEntry({

422+

tempDir,

423+

timestamp,

424+

previousSessionEntry: {

425+

sessionId: "first-session",

426+

},

427+

});

428+

await runNewWithPreviousSessionEntry({

429+

tempDir,

430+

timestamp,

431+

previousSessionEntry: {

432+

sessionId: "second-session",

433+

},

434+

});

435+
436+

const memoryDir = path.join(tempDir, "memory");

437+

const files = await fs.readdir(memoryDir);

438+

expect(files).toHaveLength(2);

439+

expect(files).toContain("2026-01-01-0430.md");

440+

expect(files).toContain("2026-01-01-0430-2.md");

441+
442+

await expect(

443+

fs.readFile(path.join(memoryDir, "2026-01-01-0430.md"), "utf-8"),

444+

).resolves.toContain("- **Session ID**: first-session");

445+

await expect(

446+

fs.readFile(path.join(memoryDir, "2026-01-01-0430-2.md"), "utf-8"),

447+

).resolves.toContain("- **Session ID**: second-session");

448+

});

449+

});

450+
416451

it("prefers workspaceDir from hook context when sessionKey points at main", async () => {

417452

const mainWorkspace = await createCaseWorkspace("workspace-main");

418453

const naviWorkspace = await createCaseWorkspace("workspace-navi");

Original file line numberDiff line numberDiff line change

@@ -85,6 +85,28 @@ function formatLocalSessionTimestamp(date: Date): {

8585

};

8686

}

8787
88+

async function resolveAvailableMemoryFilename(params: {

89+

memoryDir: string;

90+

dateStr: string;

91+

slug: string;

92+

}): Promise<string> {

93+

const basename = `${params.dateStr}-${params.slug}`;

94+

let suffix = 1;

95+
96+

while (true) {

97+

const filename = suffix === 1 ? `${basename}.md` : `${basename}-${suffix}.md`;

98+

try {

99+

await fs.access(path.join(params.memoryDir, filename));

100+

suffix += 1;

101+

} catch (err) {

102+

if ((err as { code?: string }).code === "ENOENT") {

103+

return filename;

104+

}

105+

throw err;

106+

}

107+

}

108+

}

109+
88110

function resolveDisplaySessionKey(params: {

89111

cfg?: OpenClawConfig;

90112

workspaceDir?: string;

@@ -223,7 +245,7 @@ async function saveSessionMemoryNow(event: Parameters<HookHandler>[0]): Promise<

223245

}

224246
225247

// Create filename with date and slug

226-

const filename = `${dateStr}-${slug}.md`;

248+

const filename = await resolveAvailableMemoryFilename({ memoryDir, dateStr, slug });

227249

const memoryFilePath = path.join(memoryDir, filename);

228250

log.debug("Memory file path resolved", {

229251

filename,