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

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
B
Blog
Jina AI
Jina AI
N
Netflix TechBlog - Medium
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园_首页
Hugging Face - Blog
Hugging Face - Blog
博客园 - 聂微东
美团技术团队
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
阮一峰的网络日志
阮一峰的网络日志
U
Unit 42
The Cloudflare Blog
V
V2EX
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
小众软件
小众软件
罗磊的独立博客
Microsoft Security Blog
Microsoft Security Blog
Apple Machine Learning Research
Apple Machine Learning Research
I
InfoQ
GbyAI
GbyAI
腾讯CDC
MongoDB | Blog
MongoDB | 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
test: tighten compaction context assertions · openclaw/op...
steipete · 2026-05-09 · via Recent Commits to openclaw:main

@@ -7,29 +7,7 @@ import {

7788

describe("buildEmbeddedCompactionRuntimeContext", () => {

99

it("preserves sender and current message routing for compaction", () => {

10-

expect(

11-

buildEmbeddedCompactionRuntimeContext({

12-

sessionKey: "agent:main:thread:1",

13-

messageChannel: "slack",

14-

messageProvider: "slack",

15-

agentAccountId: "acct-1",

16-

currentChannelId: "C123",

17-

currentThreadTs: "thread-9",

18-

currentMessageId: "msg-42",

19-

authProfileId: "openai:p1",

20-

workspaceDir: "/tmp/workspace",

21-

agentDir: "/tmp/agent",

22-

config: {} as OpenClawConfig,

23-

senderIsOwner: true,

24-

senderId: "user-123",

25-

provider: "openai-codex",

26-

modelId: "gpt-5.4",

27-

thinkLevel: "off",

28-

reasoningLevel: "on",

29-

extraSystemPrompt: "extra",

30-

ownerNumbers: ["+15555550123"],

31-

}),

32-

).toMatchObject({

10+

const result = buildEmbeddedCompactionRuntimeContext({

3311

sessionKey: "agent:main:thread:1",

3412

messageChannel: "slack",

3513

messageProvider: "slack",

@@ -40,42 +18,58 @@ describe("buildEmbeddedCompactionRuntimeContext", () => {

4018

authProfileId: "openai:p1",

4119

workspaceDir: "/tmp/workspace",

4220

agentDir: "/tmp/agent",

21+

config: {} as OpenClawConfig,

22+

senderIsOwner: true,

4323

senderId: "user-123",

4424

provider: "openai-codex",

45-

model: "gpt-5.4",

25+

modelId: "gpt-5.4",

26+

thinkLevel: "off",

27+

reasoningLevel: "on",

28+

extraSystemPrompt: "extra",

29+

ownerNumbers: ["+15555550123"],

4630

});

31+

expect(result.sessionKey).toBe("agent:main:thread:1");

32+

expect(result.messageChannel).toBe("slack");

33+

expect(result.messageProvider).toBe("slack");

34+

expect(result.agentAccountId).toBe("acct-1");

35+

expect(result.currentChannelId).toBe("C123");

36+

expect(result.currentThreadTs).toBe("thread-9");

37+

expect(result.currentMessageId).toBe("msg-42");

38+

expect(result.authProfileId).toBe("openai:p1");

39+

expect(result.workspaceDir).toBe("/tmp/workspace");

40+

expect(result.agentDir).toBe("/tmp/agent");

41+

expect(result.senderId).toBe("user-123");

42+

expect(result.provider).toBe("openai-codex");

43+

expect(result.model).toBe("gpt-5.4");

4744

});

48454946

it("normalizes nullable compaction routing fields to undefined", () => {

50-

expect(

51-

buildEmbeddedCompactionRuntimeContext({

52-

sessionKey: null,

53-

messageChannel: null,

54-

messageProvider: null,

55-

agentAccountId: null,

56-

currentChannelId: null,

57-

currentThreadTs: null,

58-

currentMessageId: null,

59-

authProfileId: null,

60-

workspaceDir: "/tmp/workspace",

61-

agentDir: "/tmp/agent",

62-

senderId: null,

63-

provider: null,

64-

modelId: null,

65-

}),

66-

).toMatchObject({

67-

sessionKey: undefined,

68-

messageChannel: undefined,

69-

messageProvider: undefined,

70-

agentAccountId: undefined,

71-

currentChannelId: undefined,

72-

currentThreadTs: undefined,

73-

currentMessageId: undefined,

74-

authProfileId: undefined,

75-

senderId: undefined,

76-

provider: undefined,

77-

model: undefined,

47+

const result = buildEmbeddedCompactionRuntimeContext({

48+

sessionKey: null,

49+

messageChannel: null,

50+

messageProvider: null,

51+

agentAccountId: null,

52+

currentChannelId: null,

53+

currentThreadTs: null,

54+

currentMessageId: null,

55+

authProfileId: null,

56+

workspaceDir: "/tmp/workspace",

57+

agentDir: "/tmp/agent",

58+

senderId: null,

59+

provider: null,

60+

modelId: null,

7861

});

62+

expect(result.sessionKey).toBeUndefined();

63+

expect(result.messageChannel).toBeUndefined();

64+

expect(result.messageProvider).toBeUndefined();

65+

expect(result.agentAccountId).toBeUndefined();

66+

expect(result.currentChannelId).toBeUndefined();

67+

expect(result.currentThreadTs).toBeUndefined();

68+

expect(result.currentMessageId).toBeUndefined();

69+

expect(result.authProfileId).toBeUndefined();

70+

expect(result.senderId).toBeUndefined();

71+

expect(result.provider).toBeUndefined();

72+

expect(result.model).toBeUndefined();

7973

});

80748175

it("applies compaction.model override with provider/model format", () => {