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

推荐订阅源

WordPress大学
WordPress大学
Engineering at Meta
Engineering at Meta
D
DataBreaches.Net
月光博客
月光博客
Recent Announcements
Recent Announcements
Google DeepMind News
Google DeepMind News
U
Unit 42
腾讯CDC
爱范儿
爱范儿
J
Java Code Geeks
有赞技术团队
有赞技术团队
Blog — PlanetScale
Blog — PlanetScale
N
Netflix TechBlog - Medium
B
Blog
Stack Overflow Blog
Stack Overflow Blog
GbyAI
GbyAI
T
The Blog of Author Tim Ferriss
小众软件
小众软件
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Y
Y Combinator Blog
大猫的无限游戏
大猫的无限游戏
Microsoft Azure Blog
Microsoft Azure Blog
T
Tailwind CSS 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(qa): add discord voice autojoin smoke · openclaw/ope...
vincentkoc · 2026-05-07 · via Recent Commits to openclaw:main

@@ -30,6 +30,26 @@ describe("discord live qa runtime", () => {

3030

});

3131

});

323233+

it("resolves optional Discord QA voice channel env var", () => {

34+

expect(

35+

__testing.resolveDiscordQaRuntimeEnv({

36+

OPENCLAW_QA_DISCORD_GUILD_ID: "123456789012345678",

37+

OPENCLAW_QA_DISCORD_CHANNEL_ID: "223456789012345678",

38+

OPENCLAW_QA_DISCORD_VOICE_CHANNEL_ID: "523456789012345678",

39+

OPENCLAW_QA_DISCORD_DRIVER_BOT_TOKEN: "driver",

40+

OPENCLAW_QA_DISCORD_SUT_BOT_TOKEN: "sut",

41+

OPENCLAW_QA_DISCORD_SUT_APPLICATION_ID: "323456789012345678",

42+

}),

43+

).toEqual({

44+

guildId: "123456789012345678",

45+

channelId: "223456789012345678",

46+

voiceChannelId: "523456789012345678",

47+

driverBotToken: "driver",

48+

sutBotToken: "sut",

49+

sutApplicationId: "323456789012345678",

50+

});

51+

});

52+3353

it("fails when a required Discord QA env var is missing", () => {

3454

expect(() =>

3555

__testing.resolveDiscordQaRuntimeEnv({

@@ -58,13 +78,15 @@ describe("discord live qa runtime", () => {

5878

__testing.parseDiscordQaCredentialPayload({

5979

guildId: "123456789012345678",

6080

channelId: "223456789012345678",

81+

voiceChannelId: "523456789012345678",

6182

driverBotToken: "driver",

6283

sutBotToken: "sut",

6384

sutApplicationId: "323456789012345678",

6485

}),

6586

).toEqual({

6687

guildId: "123456789012345678",

6788

channelId: "223456789012345678",

89+

voiceChannelId: "523456789012345678",

6890

driverBotToken: "driver",

6991

sutBotToken: "sut",

7092

sutApplicationId: "323456789012345678",

@@ -141,6 +163,35 @@ describe("discord live qa runtime", () => {

141163

});

142164

});

143165166+

it("injects Discord voice auto-join config for the voice smoke", () => {

167+

const next = __testing.buildDiscordQaConfig(

168+

{},

169+

{

170+

guildId: "123456789012345678",

171+

channelId: "223456789012345678",

172+

driverBotId: "423456789012345678",

173+

sutAccountId: "sut",

174+

sutBotToken: "sut-token",

175+

},

176+

{

177+

voiceAutoJoin: {

178+

guildId: "123456789012345678",

179+

channelId: "523456789012345678",

180+

},

181+

},

182+

);

183+184+

expect(next.channels?.discord?.voice).toEqual({

185+

enabled: true,

186+

autoJoin: [

187+

{

188+

guildId: "123456789012345678",

189+

channelId: "523456789012345678",

190+

},

191+

],

192+

});

193+

});

194+144195

it("injects tool-only Discord status reaction config for the Mantis scenario", () => {

145196

const next = __testing.buildDiscordQaConfig(

146197

{},

@@ -250,6 +301,9 @@ describe("discord live qa runtime", () => {

250301

expect(

251302

__testing.findScenario(["discord-status-reactions-tool-only"]).map((scenario) => scenario.id),

252303

).toEqual(["discord-status-reactions-tool-only"]);

304+

expect(

305+

__testing.findScenario(["discord-voice-autojoin"]).map((scenario) => scenario.id),

306+

).toEqual(["discord-voice-autojoin"]);

253307

expect(

254308

__testing

255309

.findScenario(["discord-thread-reply-filepath-attachment"])

@@ -464,6 +518,60 @@ describe("discord live qa runtime", () => {

464518

]);

465519

});

466520521+

it("discovers the first visible Discord voice channel for the voice smoke", async () => {

522+

vi.stubGlobal(

523+

"fetch",

524+

vi.fn(

525+

async () =>

526+

new Response(

527+

JSON.stringify([

528+

{ id: "123456789012345678", name: "general", position: 0, type: 0 },

529+

{ id: "523456789012345678", name: "qa-voice", position: 1, type: 2 },

530+

{ id: "623456789012345678", name: "stage", position: 2, type: 13 },

531+

]),

532+

{

533+

status: 200,

534+

headers: {

535+

"content-type": "application/json",

536+

},

537+

},

538+

),

539+

),

540+

);

541+542+

await expect(

543+

__testing.resolveDiscordQaVoiceChannel({

544+

token: "token",

545+

guildId: "123456789012345678",

546+

}),

547+

).resolves.toMatchObject({

548+

id: "523456789012345678",

549+

name: "qa-voice",

550+

});

551+

});

552+553+

it("normalizes missing current Discord voice state to null", async () => {

554+

vi.stubGlobal(

555+

"fetch",

556+

vi.fn(

557+

async () =>

558+

new Response(JSON.stringify({ message: "Unknown Voice State" }), {

559+

status: 404,

560+

headers: {

561+

"content-type": "application/json",

562+

},

563+

}),

564+

),

565+

);

566+567+

await expect(

568+

__testing.getCurrentDiscordVoiceState({

569+

token: "token",

570+

guildId: "123456789012345678",

571+

}),

572+

).resolves.toBeNull();

573+

});

574+467575

it("waits for required Discord application commands to be registered", async () => {

468576

vi.useFakeTimers();

469577

try {