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

推荐订阅源

B
Blog RSS Feed
Martin Fowler
Martin Fowler
爱范儿
爱范儿
IT之家
IT之家
Last Week in AI
Last Week in AI
A
About on SuperTechFans
Google DeepMind News
Google DeepMind News
阮一峰的网络日志
阮一峰的网络日志
V
V2EX
aimingoo的专栏
aimingoo的专栏
G
Google Developers Blog
J
Java Code Geeks
Microsoft Azure Blog
Microsoft Azure Blog
美团技术团队
The Cloudflare Blog
MyScale Blog
MyScale Blog
T
The Blog of Author Tim Ferriss
Hugging Face - Blog
Hugging Face - Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
云风的 BLOG
云风的 BLOG
Y
Y Combinator Blog
The GitHub Blog
The GitHub Blog
腾讯CDC
Microsoft Security Blog
Microsoft Security Blog

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(active-memory): exclude dreaming-narrative session ke...
vincentkoc · 2026-06-22 · via Recent Commits to openclaw:main

@@ -844,6 +844,79 @@ describe("active-memory plugin", () => {

844844

expect(runEmbeddedAgent).not.toHaveBeenCalled();

845845

});

846846847+

it("does not run for dreaming-narrative cron session keys", async () => {

848+

const result = await hooks.before_prompt_build(

849+

{ prompt: "what wings should i order?", messages: [] },

850+

{

851+

agentId: "main",

852+

trigger: "user",

853+

sessionKey: "agent:main:dreaming-narrative-light-abc123",

854+

messageProvider: "webchat",

855+

},

856+

);

857+858+

expect(result).toBeUndefined();

859+

expect(runEmbeddedAgent).not.toHaveBeenCalled();

860+

});

861+862+

it("does not run when a session id resolves to a dreaming-narrative cron session key", async () => {

863+

hoisted.sessionStore["agent:main:dreaming-narrative-light-abc123"] = {

864+

sessionId: "dreaming-session",

865+

updatedAt: 1,

866+

};

867+868+

const result = await hooks.before_prompt_build(

869+

{ prompt: "what wings should i order?", messages: [] },

870+

{

871+

agentId: "main",

872+

trigger: "user",

873+

sessionId: "dreaming-session",

874+

messageProvider: "webchat",

875+

},

876+

);

877+878+

expect(result).toBeUndefined();

879+

expect(runEmbeddedAgent).not.toHaveBeenCalled();

880+

});

881+882+

it("allows non-canonical session keys that merely contain the dreaming-narrative substring", async () => {

883+

const result = await hooks.before_prompt_build(

884+

{ prompt: "what wings should i order?", messages: [] },

885+

{

886+

agentId: "main",

887+

trigger: "user",

888+

sessionKey: "agent:main:webchat:dreaming-narrative-room",

889+

messageProvider: "webchat",

890+

},

891+

);

892+893+

// Real session keys that happen to contain "dreaming-narrative" in a

894+

// non-canonical way (not {light|rem|deep} phase suffix) must remain eligible.

895+

// The session key "agent:main:webchat:dreaming-narrative-room" is a real chat

896+

// whose topic happens to contain the string — not a dreaming cron key.

897+

expect(runEmbeddedAgent).toHaveBeenCalledTimes(1);

898+

expect(result).not.toBeUndefined();

899+

});

900+901+

it("allows real webchat session keys whose peer id starts with a phased dreaming-narrative prefix", async () => {

902+

const result = await hooks.before_prompt_build(

903+

{ prompt: "what wings should i order?", messages: [] },

904+

{

905+

agentId: "main",

906+

trigger: "user",

907+

sessionKey: "agent:main:webchat:dreaming-narrative-light-room",

908+

messageProvider: "webchat",

909+

},

910+

);

911+912+

// A real webchat session key whose peer id begins with a phased dreaming-narrative

913+

// phrase must not be excluded. Only the canonical bare or agent-prefixed key

914+

// shape (dreaming-narrative-<phase>-<hash> directly after agentId or bare) should

915+

// be rejected — not the same phrase appearing deeper in the key as a peer id.

916+

expect(runEmbeddedAgent).toHaveBeenCalledTimes(1);

917+

expect(result).not.toBeUndefined();

918+

});

919+847920

it("defaults to direct-style sessions only", async () => {

848921

const result = await hooks.before_prompt_build(

849922

{ prompt: "what wings should we order?", messages: [] },