Skip to content

Commit b7a9941

Browse files
authored
fix(release): repair .35 validation backports (#120982)
* fix(release): repair missing validation backports * fix(deps): update NanoID 5 past advisory * test(e2e): stabilize readyz diagnostics
1 parent b122101 commit b7a9941

6 files changed

Lines changed: 47 additions & 24 deletions

File tree

‎extensions/llama-cpp/npm-shrinkwrap.json‎

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎extensions/memory-core/src/memory/qmd-manager.slugified-paths.test.ts‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,18 @@ const { logWarnMock, logDebugMock, logInfoMock } = vi.hoisted(() => ({
1212
logInfoMock: vi.fn(),
1313
}));
1414

15+
type MockStream = EventEmitter & { setEncoding: ReturnType<typeof vi.fn> };
16+
1517
interface MockChild extends EventEmitter {
16-
stdout: EventEmitter;
17-
stderr: EventEmitter;
18+
stdout: MockStream;
19+
stderr: MockStream;
1820
kill: (signal?: NodeJS.Signals) => void;
1921
closeWith: (code?: number | null) => void;
2022
}
2123

2224
function createMockChild(params?: { autoClose?: boolean }): MockChild {
23-
const stdout = new EventEmitter();
24-
const stderr = new EventEmitter();
25+
const stdout = Object.assign(new EventEmitter(), { setEncoding: vi.fn() });
26+
const stderr = Object.assign(new EventEmitter(), { setEncoding: vi.fn() });
2527
const child = new EventEmitter() as unknown as MockChild;
2628
child.stdout = stdout;
2729
child.stderr = stderr;

‎extensions/memory-core/src/tools.ts‎

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// Memory Core plugin module implements tools behavior.
22
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
3-
import type { MemorySource } from "openclaw/plugin-sdk/memory-core-host-engine-storage";
3+
import type {
4+
MemoryReadResult,
5+
MemorySource,
6+
} from "openclaw/plugin-sdk/memory-core-host-engine-storage";
47
import {
58
asToolParamsRecord,
69
jsonResult,
@@ -342,16 +345,33 @@ async function resolveMemoryReadFailureResult(params: {
342345
return jsonResult({ path: params.relPath, text: "", disabled: true, error: message });
343346
}
344347

345-
async function executeMemoryReadResult<T>(params: {
346-
read: () => Promise<T>;
348+
function isMissingMemoryReadResult(result: MemoryReadResult, relPath: string): boolean {
349+
return result.path === relPath && result.text === "" && result.from === undefined;
350+
}
351+
352+
async function executeMemoryReadResult(params: {
353+
read: () => Promise<MemoryReadResult>;
347354
requestedCorpus?: "memory" | "wiki" | "all";
348355
relPath: string;
349356
from?: number;
350357
lines?: number;
351358
agentSessionKey?: string;
352359
}) {
353360
try {
354-
return jsonResult(await params.read());
361+
const result = await params.read();
362+
if (params.requestedCorpus === "all" && isMissingMemoryReadResult(result, params.relPath)) {
363+
const supplement = await getSupplementMemoryReadResult({
364+
relPath: params.relPath,
365+
from: params.from,
366+
lines: params.lines,
367+
agentSessionKey: params.agentSessionKey,
368+
corpus: params.requestedCorpus,
369+
});
370+
if (supplement) {
371+
return jsonResult(supplement);
372+
}
373+
}
374+
return jsonResult(result);
355375
} catch (error) {
356376
return await resolveMemoryReadFailureResult({
357377
error,

‎pnpm-lock.yaml‎

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pnpm-workspace.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ minimumReleaseAgeExclude:
2121
- "hono"
2222
2323
24+
2425
- "openclaw"
2526
- "protobufjs"
2627
- "vite"

‎test/scripts/bundled-plugin-install-uninstall-probe.test.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,7 +1117,7 @@ describe("bundled plugin install/uninstall probe", () => {
11171117

11181118
it("allows degraded runtime readiness only for expected channel failures", async () => {
11191119
const runtimeSmoke = await importRuntimeSmokeWithEnv({
1120-
OPENCLAW_BUNDLED_PLUGIN_RUNTIME_HTTP_MS: "100",
1120+
OPENCLAW_BUNDLED_PLUGIN_RUNTIME_HTTP_MS: "1000",
11211121
OPENCLAW_BUNDLED_PLUGIN_RUNTIME_RPC_READY_MS: "50",
11221122
});
11231123
const server = createHttpServer((_request, response) => {
@@ -1142,7 +1142,7 @@ describe("bundled plugin install/uninstall probe", () => {
11421142

11431143
it("rejects degraded runtime readiness for unexpected channel failures", async () => {
11441144
const runtimeSmoke = await importRuntimeSmokeWithEnv({
1145-
OPENCLAW_BUNDLED_PLUGIN_RUNTIME_HTTP_MS: "100",
1145+
OPENCLAW_BUNDLED_PLUGIN_RUNTIME_HTTP_MS: "1000",
11461146
OPENCLAW_BUNDLED_PLUGIN_RUNTIME_RPC_READY_MS: "50",
11471147
});
11481148
const server = createHttpServer((_request, response) => {
@@ -1167,7 +1167,7 @@ describe("bundled plugin install/uninstall probe", () => {
11671167

11681168
it("rejects generic readyz server errors in degraded runtime mode", async () => {
11691169
const runtimeSmoke = await importRuntimeSmokeWithEnv({
1170-
OPENCLAW_BUNDLED_PLUGIN_RUNTIME_HTTP_MS: "100",
1170+
OPENCLAW_BUNDLED_PLUGIN_RUNTIME_HTTP_MS: "1000",
11711171
OPENCLAW_BUNDLED_PLUGIN_RUNTIME_RPC_READY_MS: "50",
11721172
});
11731173
const server = createHttpServer((_request, response) => {
@@ -1192,7 +1192,7 @@ describe("bundled plugin install/uninstall probe", () => {
11921192

11931193
it("keeps readyz HTTP status diagnostics when the body is malformed", async () => {
11941194
const runtimeSmoke = await importRuntimeSmokeWithEnv({
1195-
OPENCLAW_BUNDLED_PLUGIN_RUNTIME_HTTP_MS: "100",
1195+
OPENCLAW_BUNDLED_PLUGIN_RUNTIME_HTTP_MS: "1000",
11961196
OPENCLAW_BUNDLED_PLUGIN_RUNTIME_RPC_READY_MS: "50",
11971197
});
11981198
const server = createHttpServer((_request, response) => {
@@ -1217,7 +1217,7 @@ describe("bundled plugin install/uninstall probe", () => {
12171217

12181218
it("bounds readyz diagnostic response bodies", async () => {
12191219
const runtimeSmoke = await importRuntimeSmokeWithEnv({
1220-
OPENCLAW_BUNDLED_PLUGIN_RUNTIME_HTTP_MS: "100",
1220+
OPENCLAW_BUNDLED_PLUGIN_RUNTIME_HTTP_MS: "1000",
12211221
OPENCLAW_BUNDLED_PLUGIN_RUNTIME_RPC_READY_MS: "50",
12221222
});
12231223
const server = createHttpServer((_request, response) => {

0 commit comments

Comments
 (0)