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

推荐订阅源

博客园 - 叶小钗
D
Docker
GbyAI
GbyAI
Y
Y Combinator Blog
Google DeepMind News
Google DeepMind News
G
Google Developers Blog
P
Proofpoint News Feed
云风的 BLOG
云风的 BLOG
雷峰网
雷峰网
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Stack Overflow Blog
Stack Overflow Blog
WordPress大学
WordPress大学
小众软件
小众软件
Engineering at Meta
Engineering at Meta
酷 壳 – CoolShell
酷 壳 – CoolShell
I
InfoQ
B
Blog
H
Help Net Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
A
About on SuperTechFans
B
Blog RSS Feed
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 test: merge chat context notice checks · openclaw/openclaw@5c2f4af 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: trim doctor command hotspots · openclaw/openclaw@c6...
steipete · 2026-04-17 · via Recent Commits to openclaw:main

@@ -12,16 +12,6 @@ vi.mock("../plugins/setup-registry.js", () => ({

1212

}),

1313

}));

141415-

function asLegacyConfig(value: unknown): OpenClawConfig {

16-

return value as OpenClawConfig;

17-

}

18-19-

function getLegacyProperty(value: unknown, key: string): unknown {

20-

if (!value || typeof value !== "object") {

21-

return undefined;

22-

}

23-

return (value as Record<string, unknown>)[key];

24-

}

2515

describe("normalizeCompatibilityConfigValues", () => {

2616

let previousOauthDir: string | undefined;

2717

let tempOauthDir = "";

@@ -90,201 +80,6 @@ describe("normalizeCompatibilityConfigValues", () => {

9080

});

9181

});

928293-

it("migrates Slack dm.policy/dm.allowFrom to dmPolicy/allowFrom aliases", () => {

94-

const res = normalizeCompatibilityConfigValues({

95-

channels: {

96-

slack: {

97-

dm: { enabled: true, policy: "open", allowFrom: ["*"] },

98-

},

99-

},

100-

});

101-102-

expect(res.config.channels?.slack?.dmPolicy).toBe("open");

103-

expect(res.config.channels?.slack?.allowFrom).toEqual(["*"]);

104-

expect(res.config.channels?.slack?.dm).toEqual({

105-

enabled: true,

106-

});

107-

expect(res.changes).toEqual([

108-

"Moved channels.slack.dm.policy → channels.slack.dmPolicy.",

109-

"Moved channels.slack.dm.allowFrom → channels.slack.allowFrom.",

110-

]);

111-

});

112-113-

it("migrates Discord account dm.policy/dm.allowFrom to dmPolicy/allowFrom aliases", () => {

114-

const res = normalizeCompatibilityConfigValues({

115-

channels: {

116-

discord: {

117-

accounts: {

118-

work: {

119-

dm: { policy: "allowlist", allowFrom: ["123"], groupEnabled: true },

120-

},

121-

},

122-

},

123-

},

124-

});

125-126-

expect(res.config.channels?.discord?.accounts?.work?.dmPolicy).toBe("allowlist");

127-

expect(res.config.channels?.discord?.accounts?.work?.allowFrom).toEqual(["123"]);

128-

expect(res.config.channels?.discord?.accounts?.work?.dm).toEqual({

129-

groupEnabled: true,

130-

});

131-

expect(res.changes).toEqual([

132-

"Moved channels.discord.accounts.work.dm.policy → channels.discord.accounts.work.dmPolicy.",

133-

"Moved channels.discord.accounts.work.dm.allowFrom → channels.discord.accounts.work.allowFrom.",

134-

]);

135-

});

136-137-

it("migrates Discord streaming boolean alias into nested streaming.mode", () => {

138-

const res = normalizeCompatibilityConfigValues(

139-

asLegacyConfig({

140-

channels: {

141-

discord: {

142-

streaming: true,

143-

accounts: {

144-

work: {

145-

streaming: false,

146-

},

147-

},

148-

},

149-

},

150-

}),

151-

);

152-153-

expect(res.config.channels?.discord?.streaming).toEqual({ mode: "partial" });

154-

expect(getLegacyProperty(res.config.channels?.discord, "streamMode")).toBeUndefined();

155-

expect(res.config.channels?.discord?.accounts?.work?.streaming).toEqual({ mode: "off" });

156-

expect(

157-

getLegacyProperty(res.config.channels?.discord?.accounts?.work, "streamMode"),

158-

).toBeUndefined();

159-

expect(res.changes).toEqual([

160-

"Moved channels.discord.streaming (boolean) → channels.discord.streaming.mode (partial).",

161-

"Moved channels.discord.accounts.work.streaming (boolean) → channels.discord.accounts.work.streaming.mode (off).",

162-

]);

163-

});

164-165-

it("migrates Discord legacy streamMode into nested streaming.mode", () => {

166-

const res = normalizeCompatibilityConfigValues(

167-

asLegacyConfig({

168-

channels: {

169-

discord: {

170-

streaming: false,

171-

streamMode: "block",

172-

},

173-

},

174-

}),

175-

);

176-177-

expect(res.config.channels?.discord?.streaming).toEqual({ mode: "block" });

178-

expect(getLegacyProperty(res.config.channels?.discord, "streamMode")).toBeUndefined();

179-

expect(res.changes).toEqual([

180-

"Moved channels.discord.streamMode → channels.discord.streaming.mode (block).",

181-

]);

182-

});

183-184-

it("migrates Telegram streamMode into nested streaming.mode", () => {

185-

const res = normalizeCompatibilityConfigValues(

186-

asLegacyConfig({

187-

channels: {

188-

telegram: {

189-

streamMode: "block",

190-

},

191-

},

192-

}),

193-

);

194-195-

expect(res.config.channels?.telegram?.streaming).toEqual({ mode: "block" });

196-

expect(getLegacyProperty(res.config.channels?.telegram, "streamMode")).toBeUndefined();

197-

expect(res.changes).toEqual([

198-

"Moved channels.telegram.streamMode → channels.telegram.streaming.mode (block).",

199-

]);

200-

});

201-202-

it("migrates Slack legacy streaming keys into nested streaming config", () => {

203-

const res = normalizeCompatibilityConfigValues(

204-

asLegacyConfig({

205-

channels: {

206-

slack: {

207-

streaming: false,

208-

streamMode: "status_final",

209-

},

210-

},

211-

}),

212-

);

213-214-

expect(res.config.channels?.slack?.streaming).toEqual({

215-

mode: "progress",

216-

nativeTransport: false,

217-

});

218-

expect(getLegacyProperty(res.config.channels?.slack, "streamMode")).toBeUndefined();

219-

expect(res.changes).toEqual([

220-

"Moved channels.slack.streamMode → channels.slack.streaming.mode (progress).",

221-

"Moved channels.slack.streaming (boolean) → channels.slack.streaming.nativeTransport.",

222-

]);

223-

});

224-225-

it("preserves top-level Telegram allowlist fallback for existing named accounts", () => {

226-

const res = normalizeCompatibilityConfigValues({

227-

channels: {

228-

telegram: {

229-

enabled: true,

230-

dmPolicy: "allowlist",

231-

allowFrom: ["123"],

232-

groupPolicy: "allowlist",

233-

accounts: {

234-

bot1: {

235-

enabled: true,

236-

botToken: "bot-1-token",

237-

},

238-

bot2: {

239-

enabled: true,

240-

botToken: "bot-2-token",

241-

},

242-

},

243-

},

244-

},

245-

});

246-247-

expect(res.config.channels?.telegram?.dmPolicy).toBe("allowlist");

248-

expect(res.config.channels?.telegram?.allowFrom).toEqual(["123"]);

249-

expect(res.config.channels?.telegram?.groupPolicy).toBe("allowlist");

250-

expect(res.config.channels?.telegram?.accounts?.bot1?.botToken).toBe("bot-1-token");

251-

expect(res.config.channels?.telegram?.accounts?.bot2?.botToken).toBe("bot-2-token");

252-

expect(res.changes).not.toContain(

253-

"Moved channels.telegram single-account top-level values into channels.telegram.accounts.default.",

254-

);

255-

});

256-257-

it("keeps Telegram policy fallback top-level while still seeding default auth", () => {

258-

const res = normalizeCompatibilityConfigValues({

259-

channels: {

260-

telegram: {

261-

enabled: true,

262-

botToken: "legacy-token",

263-

dmPolicy: "allowlist",

264-

allowFrom: ["123"],

265-

groupPolicy: "allowlist",

266-

accounts: {

267-

bot1: {

268-

enabled: true,

269-

botToken: "bot-1-token",

270-

},

271-

},

272-

},

273-

},

274-

});

275-276-

expect(res.config.channels?.telegram?.accounts?.default).toMatchObject({

277-

botToken: "legacy-token",

278-

});

279-

expect(res.config.channels?.telegram?.botToken).toBeUndefined();

280-

expect(res.config.channels?.telegram?.dmPolicy).toBe("allowlist");

281-

expect(res.config.channels?.telegram?.allowFrom).toEqual(["123"]);

282-

expect(res.config.channels?.telegram?.groupPolicy).toBe("allowlist");

283-

expect(res.changes).toContain(

284-

"Moved channels.telegram single-account top-level values into channels.telegram.accounts.default.",

285-

);

286-

});

287-28883

it("migrates browser ssrfPolicy allowPrivateNetwork to dangerouslyAllowPrivateNetwork", () => {

28984

const res = normalizeCompatibilityConfigValues({

29085

browser: {