fix: guard QMD session stem fallback (#86482) · openclaw/openclaw@2e3b59b
clawsweeper
·
2026-05-25
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -23,6 +23,7 @@ Docs: https://docs.openclaw.ai
|
23 | 23 | - Media understanding: convert HEIC and HEIF images to JPEG before image description providers run so iPhone photos work in direct and configured image-description flows. (#86037) |
24 | 24 | - Agents: release embedded-attempt session locks from outer teardown so post-prompt exceptions cannot wedge later requests behind `SessionWriteLockTimeoutError`. Fixes #86014. Thanks @openperf. |
25 | 25 | - Discord/OpenAI voice: rotate Realtime sessions at provider max duration without logging the expected session-expiry event as an error. |
| 26 | +- Sessions: skip metadata-only entries during QMD-slugified session lookup so one incomplete row does not block transcript hit resolution. (#86327) Thanks @abnershang. |
26 | 27 | - Agents/media: derive bundled plugin local-media trust from plugin tool metadata instead of importing the full plugin registry on subscription paths. (#84409) Thanks @samzong. |
27 | 28 | - Image tool: keep config-backed custom-provider API keys usable for auto-discovered vision models, including deferred image-tool execution without env keys or auth profiles. (#85733) |
28 | 29 | - Memory/local embeddings: run local GGUF embeddings in an isolated worker sidecar and degrade to configured fallback or keyword search on worker failure so native embedding crashes do not take down the Gateway. (#85348) Thanks @osolmaz. |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -217,6 +217,23 @@ describe("resolveTranscriptStemToSessionKeys", () => {
|
217 | 217 | ).toEqual(["agent:main:s1"]); |
218 | 218 | }); |
219 | 219 | |
| 220 | +it("ignores store entries without session ids during QMD-slugified fallback", () => { |
| 221 | +const store: Record<string, SessionEntry> = { |
| 222 | +"agent:main:non-session": { |
| 223 | +updatedAt: 1, |
| 224 | +} as SessionEntry, |
| 225 | +"agent:main:s1": baseEntry({ sessionId: "foo_bar.v1" }), |
| 226 | +}; |
| 227 | + |
| 228 | +expect( |
| 229 | +resolveTranscriptStemToSessionKeys({ |
| 230 | + store, |
| 231 | +stem: "foo-bar-v1", |
| 232 | +allowQmdSlugFallback: true, |
| 233 | +}), |
| 234 | +).toEqual(["agent:main:s1"]); |
| 235 | +}); |
| 236 | + |
220 | 237 | it("does not use QMD-slugified fallback unless requested", () => { |
221 | 238 | const store: Record<string, SessionEntry> = { |
222 | 239 | "agent:main:s1": baseEntry({ sessionId: "foo_bar.v1" }), |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -151,7 +151,8 @@ export function resolveTranscriptStemToSessionKeys(params: {
|
151 | 151 | continue; |
152 | 152 | } |
153 | 153 | } |
154 | | -if (normalizeQmdSessionStem(entry.sessionId) === normalizedStem) { |
| 154 | +const entrySessionId = normalizeOptionalString(entry.sessionId); |
| 155 | +if (entrySessionId && normalizeQmdSessionStem(entrySessionId) === normalizedStem) { |
155 | 156 | matches.push(sessionKey); |
156 | 157 | } |
157 | 158 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。