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

推荐订阅源

H
Hackread – Cybersecurity News, Data Breaches, AI and More
U
Unit 42
Vercel News
Vercel News
Martin Fowler
Martin Fowler
云风的 BLOG
云风的 BLOG
爱范儿
爱范儿
MongoDB | Blog
MongoDB | Blog
J
Java Code Geeks
F
Fortinet All Blogs
MyScale Blog
MyScale Blog
C
Check Point Blog
N
Netflix TechBlog - Medium
Microsoft Azure Blog
Microsoft Azure Blog
aimingoo的专栏
aimingoo的专栏
博客园_首页
WordPress大学
WordPress大学
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
IT之家
IT之家
Last Week in AI
Last Week in AI
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
Jina AI
Jina AI
V
Visual Studio 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 matrix onboarding assertions · openclaw/ope...
steipete · 2026-05-11 · via Recent Commits to openclaw:main

@@ -54,9 +54,7 @@ describe("matrix onboarding", () => {

5454

}

5555

| undefined;

5656

expect(result.accountId).toBe("ops");

57-

expect(opsAccount).toMatchObject({

58-

enabled: true,

59-

});

57+

expect(opsAccount?.enabled).toBe(true);

6058

expect(opsAccount?.homeserver).toBeUndefined();

6159

expect(opsAccount?.accessToken).toBeUndefined();

6260

}

@@ -104,15 +102,12 @@ describe("matrix onboarding", () => {

104102

}

105103106104

expect(result.accountId).toBe("ops");

107-

expect(result.cfg.channels?.matrix?.accounts?.ops).toMatchObject({

108-

enabled: true,

109-

groupPolicy: "allowlist",

110-

groups: {

111-

"!ops-room:example.org": { enabled: true },

112-

},

113-

autoJoin: "allowlist",

114-

autoJoinAllowlist: ["#ops-invites:example.org"],

115-

});

105+

const opsAccount = result.cfg.channels?.matrix?.accounts?.ops;

106+

expect(opsAccount?.enabled).toBe(true);

107+

expect(opsAccount?.groupPolicy).toBe("allowlist");

108+

expect(opsAccount?.groups?.["!ops-room:example.org"]?.enabled).toBe(true);

109+

expect(opsAccount?.autoJoin).toBe("allowlist");

110+

expect(opsAccount?.autoJoinAllowlist).toEqual(["#ops-invites:example.org"]);

116111

expect(notes.join("\n")).toContain("WARNING: Matrix invite auto-join defaults to off.");

117112

});

118113

@@ -136,17 +131,15 @@ describe("matrix onboarding", () => {

136131

expect(result.cfg.channels?.matrix?.homeserver).toBeUndefined();

137132

expect(result.cfg.channels?.matrix?.accessToken).toBeUndefined();

138133

expect(result.cfg.channels?.matrix?.avatarUrl).toBeUndefined();

139-

expect(result.cfg.channels?.matrix?.accounts?.default).toMatchObject({

140-

homeserver: "https://matrix.main.example.org",

141-

userId: "@main:example.org",

142-

accessToken: "main-token",

143-

avatarUrl: "mxc://matrix.main.example.org/main-avatar",

144-

});

145-

expect(result.cfg.channels?.matrix?.accounts?.ops).toMatchObject({

146-

name: "ops",

147-

homeserver: "https://matrix.ops.example.org",

148-

accessToken: "ops-token",

149-

});

134+

const defaultAccount = result.cfg.channels?.matrix?.accounts?.default;

135+

expect(defaultAccount?.homeserver).toBe("https://matrix.main.example.org");

136+

expect(defaultAccount?.userId).toBe("@main:example.org");

137+

expect(defaultAccount?.accessToken).toBe("main-token");

138+

expect(defaultAccount?.avatarUrl).toBe("mxc://matrix.main.example.org/main-avatar");

139+

const opsAccount = result.cfg.channels?.matrix?.accounts?.ops;

140+

expect(opsAccount?.name).toBe("ops");

141+

expect(opsAccount?.homeserver).toBe("https://matrix.ops.example.org");

142+

expect(opsAccount?.accessToken).toBe("ops-token");

150143

});

151144152145

it("reuses an existing raw default-like key during onboarding promotion when defaultAccount is unset", async () => {

@@ -183,24 +176,21 @@ describe("matrix onboarding", () => {

183176

return;

184177

}

185178186-

expect(result.cfg.channels?.matrix?.accounts?.Default).toMatchObject({

187-

enabled: true,

188-

deviceName: "Legacy raw key",

189-

homeserver: "https://matrix.main.example.org",

190-

userId: "@main:example.org",

191-

accessToken: "main-token",

192-

avatarUrl: "mxc://matrix.main.example.org/main-avatar",

193-

});

179+

const defaultAccount = result.cfg.channels?.matrix?.accounts?.Default;

180+

expect(defaultAccount?.enabled).toBe(true);

181+

expect(defaultAccount?.deviceName).toBe("Legacy raw key");

182+

expect(defaultAccount?.homeserver).toBe("https://matrix.main.example.org");

183+

expect(defaultAccount?.userId).toBe("@main:example.org");

184+

expect(defaultAccount?.accessToken).toBe("main-token");

185+

expect(defaultAccount?.avatarUrl).toBe("mxc://matrix.main.example.org/main-avatar");

194186

expect(result.cfg.channels?.matrix?.accounts?.default).toBeUndefined();

195-

expect(result.cfg.channels?.matrix?.accounts?.support).toMatchObject({

196-

homeserver: "https://matrix.support.example.org",

197-

accessToken: "support-token",

198-

});

199-

expect(result.cfg.channels?.matrix?.accounts?.ops).toMatchObject({

200-

name: "ops",

201-

homeserver: "https://matrix.ops.example.org",

202-

accessToken: "ops-token",

203-

});

187+

const supportAccount = result.cfg.channels?.matrix?.accounts?.support;

188+

expect(supportAccount?.homeserver).toBe("https://matrix.support.example.org");

189+

expect(supportAccount?.accessToken).toBe("support-token");

190+

const opsAccount = result.cfg.channels?.matrix?.accounts?.ops;

191+

expect(opsAccount?.name).toBe("ops");

192+

expect(opsAccount?.homeserver).toBe("https://matrix.ops.example.org");

193+

expect(opsAccount?.accessToken).toBe("ops-token");

204194

});

205195206196

it("includes device env var names in auth help text", async () => {

@@ -259,13 +249,10 @@ describe("matrix onboarding", () => {

259249

return;

260250

}

261251262-

expect(result.cfg.channels?.matrix).toMatchObject({

263-

homeserver: "http://localhost.localdomain:8008",

264-

network: {

265-

dangerouslyAllowPrivateNetwork: true,

266-

},

267-

accessToken: "ops-token",

268-

});

252+

const matrixConfig = result.cfg.channels?.matrix;

253+

expect(matrixConfig?.homeserver).toBe("http://localhost.localdomain:8008");

254+

expect(matrixConfig?.network?.dangerouslyAllowPrivateNetwork).toBe(true);

255+

expect(matrixConfig?.accessToken).toBe("ops-token");

269256

});

270257271258

it("preserves SecretRef access tokens when keeping existing credentials", async () => {

@@ -357,21 +344,16 @@ describe("matrix onboarding", () => {

357344

}

358345359346

expect(result.accountId).toBe("ops");

360-

expect(result.cfg.channels?.["matrix"]?.accounts?.ops).toMatchObject({

361-

homeserver: "https://matrix.ops.example.org",

362-

accessToken: "ops-token",

363-

deviceName: "Ops Gateway",

364-

dm: {

365-

policy: "allowlist",

366-

allowFrom: ["@alice:example.org"],

367-

},

368-

groupPolicy: "allowlist",

369-

autoJoin: "allowlist",

370-

autoJoinAllowlist: ["#ops-invites:example.org"],

371-

groups: {

372-

"!ops-room:example.org": { enabled: true },

373-

},

374-

});

347+

const opsAccount = result.cfg.channels?.["matrix"]?.accounts?.ops;

348+

expect(opsAccount?.homeserver).toBe("https://matrix.ops.example.org");

349+

expect(opsAccount?.accessToken).toBe("ops-token");

350+

expect(opsAccount?.deviceName).toBe("Ops Gateway");

351+

expect(opsAccount?.dm?.policy).toBe("allowlist");

352+

expect(opsAccount?.dm?.allowFrom).toEqual(["@alice:example.org"]);

353+

expect(opsAccount?.groupPolicy).toBe("allowlist");

354+

expect(opsAccount?.autoJoin).toBe("allowlist");

355+

expect(opsAccount?.autoJoinAllowlist).toEqual(["#ops-invites:example.org"]);

356+

expect(opsAccount?.groups?.["!ops-room:example.org"]?.enabled).toBe(true);

375357

expect(result.cfg.channels?.["matrix"]?.dm).toBeUndefined();

376358

expect(result.cfg.channels?.["matrix"]?.groups).toBeUndefined();

377359

expect(notes.join("\n")).toContain("WARNING: Matrix invite auto-join defaults to off.");