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

推荐订阅源

博客园_首页
J
Java Code Geeks
博客园 - 聂微东
量子位
C
Check Point Blog
T
The Blog of Author Tim Ferriss
T
Tailwind CSS Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
B
Blog
罗磊的独立博客
腾讯CDC
GbyAI
GbyAI
博客园 - 【当耐特】
A
About on SuperTechFans
M
MIT News - Artificial intelligence
U
Unit 42
D
Docker
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Y
Y Combinator Blog
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
S
SegmentFault 最新的问题
有赞技术团队
有赞技术团队

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(memory-core): skip stale dreaming recall sources (#71...
MonkeyLeeT · 2026-04-26 · via Recent Commits to openclaw:main

@@ -2118,6 +2118,11 @@ describe("memory-core dreaming phases", () => {

21182118

it("records light/rem signals that reinforce deep promotion ranking", async () => {

21192119

const workspaceDir = await createDreamingWorkspace();

21202120

const nowMs = Date.parse("2026-04-05T10:00:00.000Z");

2121+

await fs.writeFile(

2122+

path.join(workspaceDir, "memory", "2026-04-03.md"),

2123+

"Move backups to S3 Glacier.\n",

2124+

"utf-8",

2125+

);

21212126

await recordShortTermRecalls({

21222127

workspaceDir,

21232128

query: "glacier backup",

@@ -2126,7 +2131,7 @@ describe("memory-core dreaming phases", () => {

21262131

{

21272132

path: "memory/2026-04-03.md",

21282133

startLine: 1,

2129-

endLine: 2,

2134+

endLine: 1,

21302135

score: 0.92,

21312136

snippet: "Move backups to S3 Glacier.",

21322137

source: "memory",

@@ -2141,7 +2146,7 @@ describe("memory-core dreaming phases", () => {

21412146

{

21422147

path: "memory/2026-04-03.md",

21432148

startLine: 1,

2144-

endLine: 2,

2149+

endLine: 1,

21452150

score: 0.9,

21462151

snippet: "Move backups to S3 Glacier.",

21472152

source: "memory",

@@ -2221,6 +2226,93 @@ describe("memory-core dreaming phases", () => {

22212226

});

22222227

});

222322282229+

it("skips REM short-term candidates whose source file disappeared", async () => {

2230+

const workspaceDir = await createDreamingWorkspace();

2231+

await fs.writeFile(

2232+

path.join(workspaceDir, "memory", "2026-04-03.md"),

2233+

"Move backups to S3 Glacier.\n",

2234+

"utf-8",

2235+

);

2236+

const nowMs = DREAMING_TEST_BASE_TIME.getTime();

2237+

await recordShortTermRecalls({

2238+

workspaceDir,

2239+

query: "live backup",

2240+

nowMs,

2241+

results: [

2242+

{

2243+

path: "memory/2026-04-03.md",

2244+

startLine: 1,

2245+

endLine: 1,

2246+

score: 0.91,

2247+

snippet: "Move backups to S3 Glacier.",

2248+

source: "memory",

2249+

},

2250+

],

2251+

});

2252+

await recordShortTermRecalls({

2253+

workspaceDir,

2254+

query: "stale provider setup",

2255+

nowMs,

2256+

results: [

2257+

{

2258+

path: "memory/.dreams/session-corpus/2026-04-16.txt",

2259+

startLine: 2,

2260+

endLine: 2,

2261+

score: 0.88,

2262+

snippet: "Assistant: Documented Ollama provider setup.",

2263+

source: "memory",

2264+

},

2265+

],

2266+

});

2267+

const baseline = await rankShortTermPromotionCandidates({

2268+

workspaceDir,

2269+

minScore: 0,

2270+

minRecallCount: 0,

2271+

minUniqueQueries: 0,

2272+

nowMs,

2273+

});

2274+

const liveKey = baseline.find((candidate) => candidate.path === "memory/2026-04-03.md")?.key;

2275+

const staleKey = baseline.find((candidate) =>

2276+

candidate.path.includes("session-corpus/2026-04-16.txt"),

2277+

)?.key;

2278+

expect(liveKey).toBeDefined();

2279+

expect(staleKey).toBeDefined();

2280+2281+

await withDreamingTestClock(async () => {

2282+

setDreamingTestTime();

2283+

await __testing.runPhaseIfTriggered({

2284+

cleanedBody: __testing.constants.REM_SLEEP_EVENT_TEXT,

2285+

trigger: "heartbeat",

2286+

workspaceDir,

2287+

logger: { info: vi.fn(), warn: vi.fn(), error: vi.fn() },

2288+

phase: "rem",

2289+

eventText: __testing.constants.REM_SLEEP_EVENT_TEXT,

2290+

config: {

2291+

enabled: true,

2292+

lookbackDays: 7,

2293+

limit: 10,

2294+

minPatternStrength: 0,

2295+

timezone: "UTC",

2296+

storage: { mode: "inline", separateReports: false },

2297+

},

2298+

});

2299+

});

2300+2301+

const phaseSignalPath = resolveShortTermPhaseSignalStorePath(workspaceDir);

2302+

const phaseSignalStore = JSON.parse(await fs.readFile(phaseSignalPath, "utf-8")) as {

2303+

entries: Record<string, { remHits: number }>;

2304+

};

2305+

expect(phaseSignalStore.entries[liveKey!]).toMatchObject({ remHits: 1 });

2306+

expect(phaseSignalStore.entries[staleKey!]).toBeUndefined();

2307+2308+

const remOutput = await fs.readFile(

2309+

path.join(workspaceDir, "memory", `${DREAMING_TEST_DAY}.md`),

2310+

"utf-8",

2311+

);

2312+

expect(remOutput).toContain("Move backups to S3 Glacier.");

2313+

expect(remOutput).not.toContain("Documented Ollama provider setup");

2314+

});

2315+22242316

it("passes staged light-dreaming snippets into the narrative pipeline", async () => {

22252317

const workspaceDir = await createDreamingWorkspace();

22262318

const subagent = createMockNarrativeSubagent("The backup plan glowed like cold storage.");