mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 16:20:43 +00:00
fix(memory-core): quiet request-scoped fallback
This commit is contained in:
@@ -719,7 +719,8 @@ describe("generateAndAppendDreamNarrative", () => {
|
||||
|
||||
const content = await fs.readFile(path.join(workspaceDir, "DREAMS.md"), "utf-8");
|
||||
expect(content).toContain("API endpoints need authentication");
|
||||
expect(logger.warn).toHaveBeenCalledWith(expect.stringContaining("request-scoped"));
|
||||
expect(logger.info).toHaveBeenCalledWith(expect.stringContaining("request-scoped"));
|
||||
expect(logger.warn).not.toHaveBeenCalledWith(expect.stringContaining("request-scoped"));
|
||||
expect(logger.warn).not.toHaveBeenCalledWith(expect.stringContaining(workspaceDir));
|
||||
expect(logger.warn).not.toHaveBeenCalledWith(
|
||||
expect.stringContaining("narrative session cleanup failed"),
|
||||
@@ -749,6 +750,8 @@ describe("generateAndAppendDreamNarrative", () => {
|
||||
|
||||
const content = await fs.readFile(path.join(workspaceDir, "DREAMS.md"), "utf-8");
|
||||
expect(content).toContain("A durable candidate surfaced.");
|
||||
expect(logger.info).toHaveBeenCalledWith(expect.stringContaining("request-scoped"));
|
||||
expect(logger.warn).not.toHaveBeenCalledWith(expect.stringContaining("request-scoped"));
|
||||
expect(subagent.deleteSession).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ async function startNarrativeRunOrFallback(params: {
|
||||
nowMs: params.nowMs,
|
||||
timezone: params.timezone,
|
||||
});
|
||||
params.logger.warn(
|
||||
params.logger.info(
|
||||
`memory-core: narrative generation used fallback for ${params.data.phase} phase because subagent runtime is request-scoped.`,
|
||||
);
|
||||
} catch (fallbackErr) {
|
||||
|
||||
@@ -319,6 +319,8 @@ describe("memory-core dreaming phases", () => {
|
||||
const dreams = await fs.readFile(path.join(workspaceDir, "DREAMS.md"), "utf-8");
|
||||
expect(dreams).toContain("Move backups to S3 Glacier.");
|
||||
expect(logger.error).not.toHaveBeenCalled();
|
||||
expect(logger.info).toHaveBeenCalledWith(expect.stringContaining("request-scoped"));
|
||||
expect(logger.warn).not.toHaveBeenCalledWith(expect.stringContaining("request-scoped"));
|
||||
expect(logger.warn).not.toHaveBeenCalledWith(
|
||||
expect.stringContaining("narrative session cleanup failed"),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user