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

推荐订阅源

爱范儿
爱范儿
P
Palo Alto Networks Blog
月光博客
月光博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More
I
InfoQ
aimingoo的专栏
aimingoo的专栏
腾讯CDC
T
Threatpost
D
DataBreaches.Net
Vercel News
Vercel News
F
Fortinet All Blogs
Engineering at Meta
Engineering at Meta
C
Cybersecurity and Infrastructure Security Agency CISA
Forbes - Security
Forbes - Security
U
Unit 42
C
Check Point Blog
Blog — PlanetScale
Blog — PlanetScale
O
OpenAI News
量子位
TaoSecurity Blog
TaoSecurity Blog
Microsoft Azure Blog
Microsoft Azure Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
V
Visual Studio Blog
Recorded Future
Recorded Future
云风的 BLOG
云风的 BLOG
Security Archives - TechRepublic
Security Archives - TechRepublic
The Last Watchdog
The Last Watchdog
S
Security Affairs
Attack and Defense Labs
Attack and Defense Labs
罗磊的独立博客
Stack Overflow Blog
Stack Overflow Blog
Microsoft Security Blog
Microsoft Security Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V
V2EX
小众软件
小众软件
S
SegmentFault 最新的问题
www.infosecurity-magazine.com
www.infosecurity-magazine.com
W
WeLiveSecurity
AI
AI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
博客园 - 聂微东
I
Intezer
Know Your Adversary
Know Your Adversary
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The Cloudflare Blog
博客园_首页
NISL@THU
NISL@THU
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO

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 test: trim doctor command hotspots · openclaw/openclaw@c66f16a test: isolate agent auth and spawn hotspots · openclaw/openclaw@9285935 test: stabilize MCP startup disposal race · openclaw/openclaw@dd9d2eb test: merge browser contract server suites · openclaw/openclaw@5817a76 test: narrow ollama provider discovery setup · openclaw/openclaw@a0d9598 build: declare qa-lab aimock runtime dependency · openclaw/openclaw@24431e5 test: speed up safe-bins exec harness · openclaw/openclaw@ee856ab test: preserve tool helpers in embedded runner mocks · openclaw/openclaw@acd86a0 refactor: move memory embeddings into provider plugins · openclaw/openclaw@77e6e4c test: reuse system-run temp fixtures · openclaw/openclaw@7e9ff0f test: trim hotspot wait overhead · openclaw/openclaw@12a59b0 Check: avoid duplicate boundary prep · openclaw/openclaw@baf11b8 test: reduce hotspot fixture overhead · openclaw/openclaw@3a59edd feat(ui): overhaul settings and slash command UX (#67819) thanks @Bun… · openclaw/openclaw@2cfb660 QA Matrix: exit cleanly on failure · openclaw/openclaw@42805d2 QA Matrix: isolate scenario coverage · openclaw/openclaw@7e659e1 Matrix: refresh crypto bootstrap state · openclaw/openclaw@94081d8 QA Lab: add provider registry · openclaw/openclaw@bb7e982 Matrix: add plugin changelog · openclaw/openclaw@4acab55 test: trim more hotspot overhead · openclaw/openclaw@f485311 test: trim remaining hotspot tests · openclaw/openclaw@6ba8626 test: narrow hotspot mocks · openclaw/openclaw@dbc8179 test: isolate gemini embedding request helpers · openclaw/openclaw@cd330f5 test: trim memory and mcp hotspots · openclaw/openclaw@fd48dfa test: slim provider registry mocks · openclaw/openclaw@2e08c77 test: harden Parallels update smoke · openclaw/openclaw@1a98090 feat: default Anthropic to Opus 4.7 · openclaw/openclaw@628b454 fix: harden node-host shell payload mutability checks · openclaw/openclaw@75c551e fix: land node-host approval binding for native binaries (#66731) (th… · openclaw/openclaw@29919bb CI: add daily schedule to CodeQL workflow (#67645) · openclaw/openclaw@69d25f5 fix(gateway): capture config hash after plugin auto-enable to prevent… · openclaw/openclaw@8c11210 fix: repair sanitized replay tool results before send (#67620) (thank… · openclaw/openclaw@c3c7a99 fix: restrict HTML timeout short-circuit to transient statuses · openclaw/openclaw@de129a6 fix: keep TUI watchdog bound to active run (#67401) (thanks @xantorres) · openclaw/openclaw@3525273 Gateway/skills: dedupe skills prefix-match + drop dead fallback on log · openclaw/openclaw@d7f489f Extensions/lmstudio: back off inference preload after consecutive fai… · openclaw/openclaw@b555214 TUI/streaming: add watchdog that resets the activity indicator after … · openclaw/openclaw@f44ab20 Agents/tool-loop: enable unknown-tool stream guard by default · openclaw/openclaw@36ed367 Gateway/skills: invalidate session skills snapshot on config write · openclaw/openclaw@b23d59a fix: classify HTML provider error pages correctly (#67642) (thanks @s… · openclaw/openclaw@e588e90 fix(skills): remove unused model-usage import (#67641) · openclaw/openclaw@55f05df docs(changelog): credit codex fix superseded PRs · openclaw/openclaw@e485f24 fix(openai-codex): normalize stale transport metadata in resolution a… · openclaw/openclaw@90801ba CI: pin Docker-related GitHub Actions (#67632) · openclaw/openclaw@f697b01 Android: modernize WebView and discovery API usage (#67627) · openclaw/openclaw@44a6e50 fix(deps): bump hono to 4.12.14 and @hono/node-server to 1.19.14 (GHS… · openclaw/openclaw@fbccc18 fix(deps): bump dompurify to 3.4.0 (#67614) · openclaw/openclaw@2c2dc00 CI: add explicit permissions to all workflow jobs (fixes code-scannin… · openclaw/openclaw@01b7516 fix: register bundled TTS providers and route overrides correctly (#6… · openclaw/openclaw@6ea3cdd fix: align host tilde paths with OS home (#62804) (thanks @stainlu) · openclaw/openclaw@ecfaf64 fix: flush creds queue before reconnect socket open (#67464) (thanks … · openclaw/openclaw@405c63f fix: strip standalone <function> tool call tags from visible text (#6… · openclaw/openclaw@78df859 fix(agents): preserve cli session metadata before transcript persist … · openclaw/openclaw@898fd04 docs(changelog): move cli transcript entry · openclaw/openclaw@c1817c6 fix(agents): normalize cli transcript api field · openclaw/openclaw@3a3fae0 docs(changelog): note cli transcript persistence · openclaw/openclaw@6c343f1 fix(agents): persist cli transcript turns · openclaw/openclaw@b8ef507 fix(msteams): harden security-sensitive flows (#65841) · openclaw/openclaw@c56b56e [Dashboard] Fix exec approval modal overflow for long command content… · openclaw/openclaw@053c5b0 Docs: remove QA changelog entry · openclaw/openclaw@7fd5771 QA: fix private runtime source loading (#67428) · openclaw/openclaw@d5933af docs(gateway): correct protocol.md schema path, hello-ok example, aut… · openclaw/openclaw@489404d CI: pin Node 22 runners to 22.18.0 · openclaw/openclaw@4ffa621 models.authStatus: normalize provider ids + tighten env-backed escape… · openclaw/openclaw@f2fdb9d Update CHANGELOG.md · openclaw/openclaw@7694a92 test(parallels): clean up npm update guard jobs · openclaw/openclaw@045ea7b Plugins: prefer scanDir override paths · openclaw/openclaw@b2974da fix(dreaming): default storage.mode to "separate" so phase blocks sto… · openclaw/openclaw@8c392f0 fix(memory-core): skip dreaming transcript ingestion via session stor… · openclaw/openclaw@a1b01f0 fix: dedupe replayed exec.finished node events (#67281) · openclaw/openclaw@5dcf526
test: clear memory dreaming broad matchers · openclaw/openclaw@2fc8392
steipete · 2026-05-10 · via Recent Commits to openclaw:main

@@ -148,6 +148,69 @@ function createCronHarness(

148148

};

149149

}

150150151+

function mockStringMessages(mock: { mock: { calls: unknown[][] } }): string[] {

152+

return mock.mock.calls.map((call) => String(call[0] ?? ""));

153+

}

154+155+

function expectLogContains(mock: { mock: { calls: unknown[][] } }, expected: string): void {

156+

expect(mockStringMessages(mock).some((message) => message.includes(expected))).toBe(true);

157+

}

158+159+

function expectLogNotContains(mock: { mock: { calls: unknown[][] } }, expected: string): void {

160+

expect(mockStringMessages(mock).every((message) => !message.includes(expected))).toBe(true);

161+

}

162+163+

function requireAddCall(harness: { addCalls: CronAddInput[] }, index: number): CronAddInput {

164+

const call = harness.addCalls[index];

165+

if (!call) {

166+

throw new Error(`expected cron add call ${index}`);

167+

}

168+

return call;

169+

}

170+171+

function requireUpdateCall(

172+

harness: { updateCalls: Array<{ id: string; patch: CronPatch }> },

173+

index: number,

174+

): { id: string; patch: CronPatch } {

175+

const call = harness.updateCalls[index];

176+

if (!call) {

177+

throw new Error(`expected cron update call ${index}`);

178+

}

179+

return call;

180+

}

181+182+

function requireAgentTurnPayload(

183+

payload: CronAddInput["payload"],

184+

): Extract<CronAddInput["payload"], { kind: "agentTurn" }> {

185+

if (payload.kind !== "agentTurn") {

186+

throw new Error(`expected agentTurn payload, got ${payload.kind}`);

187+

}

188+

return payload;

189+

}

190+191+

function expectCronSchedule(

192+

schedule: CronAddInput["schedule"] | CronPatch["schedule"] | undefined,

193+

expr: string,

194+

tz?: string,

195+

): void {

196+

expect(schedule?.kind).toBe("cron");

197+

expect(schedule?.expr).toBe(expr);

198+

expect(schedule?.tz).toBe(tz);

199+

}

200+201+

async function expectPathMissing(targetPath: string): Promise<void> {

202+

try {

203+

await fs.access(targetPath);

204+

} catch (error) {

205+

if (error && typeof error === "object" && "code" in error) {

206+

expect(error.code).toBe("ENOENT");

207+

return;

208+

}

209+

throw error;

210+

}

211+

throw new Error(`expected path to be missing: ${targetPath}`);

212+

}

213+151214

function getBeforeAgentReplyHandler(

152215

onMock: ReturnType<typeof vi.fn>,

153216

): (

@@ -412,13 +475,11 @@ describe("short-term dreaming config", () => {

412475

},

413476

},

414477

});

415-

expect(resolved).toMatchObject({

416-

enabled: true,

417-

minScore: constants.DEFAULT_DREAMING_MIN_SCORE,

418-

minRecallCount: constants.DEFAULT_DREAMING_MIN_RECALL_COUNT,

419-

minUniqueQueries: constants.DEFAULT_DREAMING_MIN_UNIQUE_QUERIES,

420-

recencyHalfLifeDays: constants.DEFAULT_DREAMING_RECENCY_HALF_LIFE_DAYS,

421-

});

478+

expect(resolved.enabled).toBe(true);

479+

expect(resolved.minScore).toBe(constants.DEFAULT_DREAMING_MIN_SCORE);

480+

expect(resolved.minRecallCount).toBe(constants.DEFAULT_DREAMING_MIN_RECALL_COUNT);

481+

expect(resolved.minUniqueQueries).toBe(constants.DEFAULT_DREAMING_MIN_UNIQUE_QUERIES);

482+

expect(resolved.recencyHalfLifeDays).toBe(constants.DEFAULT_DREAMING_RECENCY_HALF_LIFE_DAYS);

422483

expect(resolved.maxAgeDays).toBe(30);

423484

});

424485

@@ -470,24 +531,15 @@ describe("short-term dreaming cron reconciliation", () => {

470531471532

expect(result.status).toBe("added");

472533

expect(harness.addCalls).toHaveLength(1);

473-

expect(harness.addCalls[0]).toMatchObject({

474-

name: constants.MANAGED_DREAMING_CRON_NAME,

475-

sessionTarget: "isolated",

476-

wakeMode: "now",

477-

delivery: {

478-

mode: "none",

479-

},

480-

payload: {

481-

kind: "agentTurn",

482-

message: constants.DREAMING_SYSTEM_EVENT_TEXT,

483-

lightContext: true,

484-

},

485-

schedule: {

486-

kind: "cron",

487-

expr: "0 1 * * *",

488-

tz: "UTC",

489-

},

490-

});

534+

const addCall = requireAddCall(harness, 0);

535+

expect(addCall.name).toBe(constants.MANAGED_DREAMING_CRON_NAME);

536+

expect(addCall.sessionTarget).toBe("isolated");

537+

expect(addCall.wakeMode).toBe("now");

538+

expect(addCall.delivery?.mode).toBe("none");

539+

const payload = requireAgentTurnPayload(addCall.payload);

540+

expect(payload.message).toBe(constants.DREAMING_SYSTEM_EVENT_TEXT);

541+

expect(payload.lightContext).toBe(true);

542+

expectCronSchedule(addCall.schedule, "0 1 * * *", "UTC");

491543

});

492544493545

it("updates drifted managed jobs and prunes duplicates", async () => {

@@ -549,19 +601,14 @@ describe("short-term dreaming cron reconciliation", () => {

549601

expect(result.removed).toBe(1);

550602

expect(harness.removeCalls).toEqual(["job-duplicate"]);

551603

expect(harness.updateCalls).toHaveLength(1);

552-

expect(harness.updateCalls[0]).toMatchObject({

553-

id: "job-primary",

554-

patch: {

555-

enabled: true,

556-

sessionTarget: "isolated",

557-

wakeMode: "now",

558-

schedule: desired.schedule,

559-

delivery: {

560-

mode: "none",

561-

},

562-

payload: desired.payload,

563-

},

564-

});

604+

const updateCall = requireUpdateCall(harness, 0);

605+

expect(updateCall.id).toBe("job-primary");

606+

expect(updateCall.patch.enabled).toBe(true);

607+

expect(updateCall.patch.sessionTarget).toBe("isolated");

608+

expect(updateCall.patch.wakeMode).toBe("now");

609+

expect(updateCall.patch.schedule).toEqual(desired.schedule);

610+

expect(updateCall.patch.delivery?.mode).toBe("none");

611+

expect(updateCall.patch.payload).toEqual(desired.payload);

565612

});

566613567614

it("removes managed dreaming jobs when disabled", async () => {

@@ -772,9 +819,7 @@ describe("short-term dreaming cron reconciliation", () => {

772819

});

773820774821

expect(result).toEqual({ status: "disabled", removed: 0 });

775-

expect(logger.warn).toHaveBeenCalledWith(

776-

expect.stringContaining("failed to remove managed dreaming cron job job-managed"),

777-

);

822+

expectLogContains(logger.warn, "failed to remove managed dreaming cron job job-managed");

778823

});

779824

});

780825

@@ -815,19 +860,10 @@ describe("gateway startup reconciliation", () => {

815860

});

816861817862

expect(harness.addCalls).toHaveLength(1);

818-

expect(harness.addCalls[0]).toMatchObject({

819-

schedule: {

820-

kind: "cron",

821-

expr: "15 4 * * *",

822-

tz: "UTC",

823-

},

824-

delivery: {

825-

mode: "none",

826-

},

827-

});

828-

expect(logger.info).toHaveBeenCalledWith(

829-

expect.stringContaining("created managed dreaming cron job"),

830-

);

863+

const addCall = requireAddCall(harness, 0);

864+

expectCronSchedule(addCall.schedule, "15 4 * * *", "UTC");

865+

expect(addCall.delivery?.mode).toBe("none");

866+

expectLogContains(logger.info, "created managed dreaming cron job");

831867

} finally {

832868

clearInternalHooks();

833869

}

@@ -892,11 +928,7 @@ describe("gateway startup reconciliation", () => {

892928

);

893929894930

expect(harness.addCalls).toHaveLength(1);

895-

expect(harness.addCalls[0]?.schedule).toMatchObject({

896-

kind: "cron",

897-

expr: "30 6 * * *",

898-

tz: "America/New_York",

899-

});

931+

expectCronSchedule(requireAddCall(harness, 0).schedule, "30 6 * * *", "America/New_York");

900932

} finally {

901933

clearInternalHooks();

902934

}

@@ -978,11 +1010,11 @@ describe("gateway startup reconciliation", () => {

97810109791011

expect(startupHarness.updateCalls).toHaveLength(0);

9801012

expect(reloadedHarness.updateCalls).toHaveLength(1);

981-

expect(reloadedHarness.updateCalls[0]?.patch.schedule).toMatchObject({

982-

kind: "cron",

983-

expr: "45 8 * * *",

984-

tz: "America/Los_Angeles",

985-

});

1013+

expectCronSchedule(

1014+

requireUpdateCall(reloadedHarness, 0).patch.schedule,

1015+

"45 8 * * *",

1016+

"America/Los_Angeles",

1017+

);

9861018

} finally {

9871019

clearInternalHooks();

9881020

}

@@ -1039,11 +1071,7 @@ describe("gateway startup reconciliation", () => {

10391071

);

1040107210411073

expect(harness.addCalls).toHaveLength(2);

1042-

expect(harness.addCalls[1]?.schedule).toMatchObject({

1043-

kind: "cron",

1044-

expr: "0 2 * * *",

1045-

tz: "UTC",

1046-

});

1074+

expectCronSchedule(requireAddCall(harness, 1).schedule, "0 2 * * *", "UTC");

10471075

} finally {

10481076

clearInternalHooks();

10491077

}

@@ -1300,13 +1328,9 @@ describe("gateway startup reconciliation", () => {

13001328

getCron: () => undefined,

13011329

});

130213301303-

expect(logger.warn).not.toHaveBeenCalledWith(

1304-

expect.stringContaining("cron service unavailable"),

1305-

);

1331+

expectLogNotContains(logger.warn, "cron service unavailable");

13061332

// The startup-path log should be demoted to debug instead.

1307-

expect(logger.debug).toHaveBeenCalledWith(

1308-

expect.stringContaining("cron service not yet available at gateway_start"),

1309-

);

1333+

expectLogContains(logger.debug, "cron service not yet available at gateway_start");

13101334

} finally {

13111335

clearInternalHooks();

13121336

}

@@ -1355,7 +1379,7 @@ describe("gateway startup reconciliation", () => {

13551379

{ trigger: "heartbeat", workspaceDir: ".", sessionKey: "agent:main:main:heartbeat" },

13561380

);

135713811358-

expect(logger.warn).toHaveBeenCalledWith(expect.stringContaining("cron service unavailable"));

1382+

expectLogContains(logger.warn, "cron service unavailable");

13591383

} finally {

13601384

clearInternalHooks();

13611385

}

@@ -1398,32 +1422,23 @@ describe("gateway startup reconciliation", () => {

13981422

});

1399142314001424

expect(harness.addCalls).toHaveLength(0);

1401-

expect(logger.debug).toHaveBeenCalledWith(

1402-

expect.stringContaining("cron service not yet available at gateway_start"),

1403-

);

1425+

expectLogContains(logger.debug, "cron service not yet available at gateway_start");

1404142614051427

await vi.advanceTimersByTimeAsync(constants.STARTUP_CRON_RETRY_DELAY_MS);

14061428

expect(harness.addCalls).toHaveLength(0);

1407-

expect(logger.warn).toHaveBeenCalledWith(expect.stringContaining("cron service unavailable"));

1429+

expectLogContains(logger.warn, "cron service unavailable");

1408143014091431

cronAvailable = true;

14101432

await vi.advanceTimersByTimeAsync(constants.STARTUP_CRON_RETRY_DELAY_MS);

1411143314121434

expect(harness.addCalls).toHaveLength(1);

1413-

expect(harness.addCalls[0]).toMatchObject({

1414-

name: "Memory Dreaming Promotion",

1415-

schedule: {

1416-

kind: "cron",

1417-

expr: "15 4 * * *",

1418-

tz: "UTC",

1419-

},

1420-

sessionTarget: "isolated",

1421-

payload: {

1422-

kind: "agentTurn",

1423-

message: constants.DREAMING_SYSTEM_EVENT_TEXT,

1424-

lightContext: true,

1425-

},

1426-

});

1435+

const addCall = requireAddCall(harness, 0);

1436+

expect(addCall.name).toBe("Memory Dreaming Promotion");

1437+

expectCronSchedule(addCall.schedule, "15 4 * * *", "UTC");

1438+

expect(addCall.sessionTarget).toBe("isolated");

1439+

const payload = requireAgentTurnPayload(addCall.payload);

1440+

expect(payload.message).toBe(constants.DREAMING_SYSTEM_EVENT_TEXT);

1441+

expect(payload.lightContext).toBe(true);

14271442

} finally {

14281443

vi.useRealTimers();

14291444

clearInternalHooks();

@@ -1486,9 +1501,7 @@ describe("gateway startup reconciliation", () => {

14861501

await vi.advanceTimersByTimeAsync(constants.STARTUP_CRON_RETRY_DELAY_MS);

14871502

await vi.advanceTimersByTimeAsync(constants.STARTUP_CRON_RETRY_DELAY_MS);

148815031489-

expect(logger.error).toHaveBeenCalledWith(

1490-

expect.stringContaining("deferred dreaming cron retry failed"),

1491-

);

1504+

expectLogContains(logger.error, "deferred dreaming cron retry failed");

14921505

expect(harness.listCalls).toBe(1);

14931506

expect(harness.addCalls).toHaveLength(0);

14941507

} finally {

@@ -2146,9 +2159,7 @@ describe("short-term dreaming trigger", () => {

21462159

const dreamsText = await fs.readFile(path.join(workspaceDir, "DREAMS.md"), "utf-8");

21472160

expect(dreamsText).toContain("A diary entry.");

21482161

});

2149-

expect(subagent.run.mock.calls[0]?.[0]).toMatchObject({

2150-

model: "anthropic/claude-sonnet-4-6",

2151-

});

2162+

expect(subagent.run.mock.calls[0]?.[0]?.model).toBe("anthropic/claude-sonnet-4-6");

21522163

});

2153216421542165

it("skips dreaming promotion cleanly when limit is zero", async () => {

@@ -2179,9 +2190,7 @@ describe("short-term dreaming trigger", () => {

21792190

expect(logger.info).toHaveBeenCalledWith(

21802191

"memory-core: dreaming promotion skipped because limit=0.",

21812192

);

2182-

await expect(fs.access(path.join(workspaceDir, "MEMORY.md"))).rejects.toMatchObject({

2183-

code: "ENOENT",

2184-

});

2193+

await expectPathMissing(path.join(workspaceDir, "MEMORY.md"));

21852194

});

2186219521872196

it("repairs recall artifacts before dreaming promotion runs", async () => {

@@ -2242,9 +2251,7 @@ describe("short-term dreaming trigger", () => {

22422251

});

2243225222442253

expect(result?.handled).toBe(true);

2245-

expect(logger.info).toHaveBeenCalledWith(

2246-

expect.stringContaining("normalized recall artifacts before dreaming"),

2247-

);

2254+

expectLogContains(logger.info, "normalized recall artifacts before dreaming");

22482255

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

22492256

entries: Record<

22502257

string,

@@ -2259,9 +2266,10 @@ describe("short-term dreaming trigger", () => {

22592266

"2026-04-01",

22602267

"2026-04-03",

22612268

]);

2262-

expect(repaired.entries["memory:memory/2026-04-03.md:1:2"]?.conceptTags).toEqual(

2263-

expect.arrayContaining(["glacier", "router", "failover"]),

2264-

);

2269+

const conceptTags = repaired.entries["memory:memory/2026-04-03.md:1:2"]?.conceptTags ?? [];

2270+

expect(conceptTags).toContain("failover");

2271+

expect(conceptTags).toContain("glacier");

2272+

expect(conceptTags).toContain("router");

22652273

});

2266227422672275

it("emits detailed run logs when verboseLogging is enabled", async () => {

@@ -2302,15 +2310,9 @@ describe("short-term dreaming trigger", () => {

23022310

});

2303231123042312

expect(result?.handled).toBe(true);

2305-

expect(logger.info).toHaveBeenCalledWith(

2306-

expect.stringContaining("memory-core: dreaming verbose enabled"),

2307-

);

2308-

expect(logger.info).toHaveBeenCalledWith(

2309-

expect.stringContaining("memory-core: dreaming candidate details"),

2310-

);

2311-

expect(logger.info).toHaveBeenCalledWith(

2312-

expect.stringContaining("memory-core: dreaming applied details"),

2313-

);

2313+

expectLogContains(logger.info, "memory-core: dreaming verbose enabled");

2314+

expectLogContains(logger.info, "memory-core: dreaming candidate details");

2315+

expectLogContains(logger.info, "memory-core: dreaming applied details");

23142316

});

2315231723162318

it("fans out one dreaming run across configured agent workspaces", async () => {