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

推荐订阅源

Google DeepMind News
Google DeepMind News
F
Fortinet All Blogs
量子位
G
Google Developers Blog
J
Java Code Geeks
N
Netflix TechBlog - Medium
博客园 - 聂微东
宝玉的分享
宝玉的分享
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
月光博客
月光博客
The Cloudflare Blog
Apple Machine Learning Research
Apple Machine Learning Research
爱范儿
爱范儿
雷峰网
雷峰网
M
MIT News - Artificial intelligence
T
Tailwind CSS Blog
V
Visual Studio Blog
阮一峰的网络日志
阮一峰的网络日志
博客园 - 三生石上(FineUI控件)
Microsoft Azure Blog
Microsoft Azure Blog
aimingoo的专栏
aimingoo的专栏
Martin Fowler
Martin Fowler
有赞技术团队
有赞技术团队
T
The Blog of Author Tim Ferriss

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
[AI-assisted] fix(feishu): probe status with account cred...
clawsweeper · 2026-05-03 · via Recent Commits to openclaw:main

@@ -5,10 +5,18 @@ import {

55

createTestWizardPrompter,

66

runSetupWizardConfigure,

77

} from "openclaw/plugin-sdk/plugin-test-runtime";

8-

import { describe, expect, it, vi } from "vitest";

8+

import { beforeEach, describe, expect, it, vi } from "vitest";

9+

import type { FeishuProbeResult } from "./types.js";

10+11+

const { probeFeishuMock } = vi.hoisted(() => ({

12+

probeFeishuMock: vi.fn<() => Promise<FeishuProbeResult>>(async () => ({

13+

ok: false,

14+

error: "mocked",

15+

})),

16+

}));

9171018

vi.mock("./probe.js", () => ({

11-

probeFeishu: vi.fn(async () => ({ ok: false, error: "mocked" })),

19+

probeFeishu: probeFeishuMock,

1220

}));

13211422

vi.mock("./app-registration.js", () => ({

@@ -69,6 +77,11 @@ const feishuConfigure = createPluginSetupWizardConfigure(feishuPlugin);

6977

const feishuGetStatus = createPluginSetupWizardStatus(feishuPlugin);

70787179

describe("feishu setup wizard", () => {

80+

beforeEach(() => {

81+

probeFeishuMock.mockReset();

82+

probeFeishuMock.mockResolvedValue({ ok: false, error: "mocked" });

83+

});

84+7285

it("does not throw when config appId/appSecret are SecretRef objects", async () => {

7386

const text = vi

7487

.fn()

@@ -101,6 +114,11 @@ describe("feishu setup wizard", () => {

101114

});

102115103116

describe("feishu setup wizard status", () => {

117+

beforeEach(() => {

118+

probeFeishuMock.mockReset();

119+

probeFeishuMock.mockResolvedValue({ ok: false, error: "mocked" });

120+

});

121+104122

it("treats SecretRef appSecret as configured when appId is present", async () => {

105123

const status = await feishuGetStatus({

106124

cfg: {

@@ -121,6 +139,39 @@ describe("feishu setup wizard status", () => {

121139

expect(status.configured).toBe(true);

122140

});

123141142+

it("probes the resolved default account in multi-account config", async () => {

143+

probeFeishuMock.mockResolvedValueOnce({ ok: true, botName: "Feishu Main" });

144+145+

const status = await feishuGetStatus({

146+

cfg: {

147+

channels: {

148+

feishu: {

149+

enabled: true,

150+

defaultAccount: "main-bot",

151+

accounts: {

152+

"main-bot": {

153+

appId: "cli_main",

154+

appSecret: "main-app-secret", // pragma: allowlist secret

155+

connectionMode: "websocket",

156+

},

157+

},

158+

},

159+

},

160+

} as never,

161+

...baseStatusContext,

162+

});

163+164+

expect(status.configured).toBe(true);

165+

expect(status.statusLines).toEqual(["Feishu: connected as Feishu Main"]);

166+

expect(probeFeishuMock).toHaveBeenCalledWith(

167+

expect.objectContaining({

168+

accountId: "main-bot",

169+

appId: "cli_main",

170+

appSecret: "main-app-secret", // pragma: allowlist secret

171+

}),

172+

);

173+

});

174+124175

it("does not fallback to top-level appId when account explicitly sets empty appId", async () => {

125176

const status = await feishuGetStatus({

126177

cfg: {