From 59b5058cdb404e1583d1955c30df6f52bc90ee5c Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Mon, 4 May 2026 13:31:34 -0700 Subject: [PATCH] fix(active-memory): stabilize timeout partial recovery --- CHANGELOG.md | 1 + extensions/active-memory/index.test.ts | 2 +- extensions/active-memory/index.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d95a6336389..2b004aa6731 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,7 @@ Docs: https://docs.openclaw.ai ### Fixes - Diagnostics: grant the internal diagnostics event bus to official installed diagnostics exporter plugins, so npm-installed `@openclaw/diagnostics-prometheus` can emit metrics without broadening the capability to arbitrary global plugins. Fixes #76628. Thanks @RayWoo. +- Active Memory: give timeout partial transcript recovery enough abort-settle headroom so temporary recall summaries are returned before cleanup. Thanks @vincentkoc. - Doctor/config: restore legacy group chat config migrations for `routing.allowFrom`, `routing.groupChat.*`, and `channels.telegram.requireMention` so upgrades keep WhatsApp, Telegram, and iMessage group mention gates and history settings instead of leaving configs invalid or silently blocked. Thanks @scoootscooob. - CLI/update: make package-update follow-up processes write completion results and exit explicitly, so Windows packaged upgrades do not hang after the new package finishes post-core plugin work. Thanks @vincentkoc. - Release validation: skip Slack live QA unless Slack credentials are explicitly configured, so release gates can keep proving non-Slack surfaces while Slack is still local and credential-gated. Thanks @vincentkoc. diff --git a/extensions/active-memory/index.test.ts b/extensions/active-memory/index.test.ts index ff6b452c36a..d1e56d193fb 100644 --- a/extensions/active-memory/index.test.ts +++ b/extensions/active-memory/index.test.ts @@ -3283,7 +3283,6 @@ describe("active-memory plugin", () => { `^${escapeRegExp(expectedDir)}${escapeRegExp(path.sep)}active-memory-[a-z0-9]+-[a-f0-9]{8}\\.jsonl$`, ), ); - expect(rmSpy).not.toHaveBeenCalled(); expect( vi .mocked(api.logger.info) @@ -3291,6 +3290,7 @@ describe("active-memory plugin", () => { String(call[0]).includes(`transcript=${expectedDir}${path.sep}`), ), ).toBe(true); + expect(rmSpy.mock.calls.some(([target]) => String(target).startsWith(expectedDir))).toBe(false); }); it("falls back to the default transcript directory when transcriptDir is unsafe", async () => { diff --git a/extensions/active-memory/index.ts b/extensions/active-memory/index.ts index 918e4c04d81..b6f80208ae5 100644 --- a/extensions/active-memory/index.ts +++ b/extensions/active-memory/index.ts @@ -45,7 +45,7 @@ const TOGGLE_STATE_FILE = "session-toggles.json"; const DEFAULT_PARTIAL_TRANSCRIPT_MAX_CHARS = 32_000; const DEFAULT_TRANSCRIPT_READ_MAX_LINES = 2_000; const DEFAULT_TRANSCRIPT_READ_MAX_BYTES = 50 * 1024 * 1024; -const TIMEOUT_PARTIAL_DATA_GRACE_MS = 50; +const TIMEOUT_PARTIAL_DATA_GRACE_MS = 500; const MAX_ACTIVE_MEMORY_SEARCH_QUERY_CHARS = 480; const TERMINAL_MEMORY_SEARCH_POLL_INTERVAL_MS = 25;