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

推荐订阅源

The GitHub Blog
The GitHub Blog
Martin Fowler
Martin Fowler
Vercel News
Vercel News
U
Unit 42
Engineering at Meta
Engineering at Meta
aimingoo的专栏
aimingoo的专栏
MyScale Blog
MyScale Blog
Y
Y Combinator Blog
阮一峰的网络日志
阮一峰的网络日志
爱范儿
爱范儿
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
B
Blog RSS Feed
N
Netflix TechBlog - Medium
GbyAI
GbyAI
F
Fortinet All Blogs
MongoDB | Blog
MongoDB | Blog
大猫的无限游戏
大猫的无限游戏
C
Check Point Blog
M
MIT News - Artificial intelligence
D
Docker
IT之家
IT之家
Stack Overflow Blog
Stack Overflow 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: dedupe server channel startup mock calls · openclaw...
steipete · 2026-05-12 · via Recent Commits to openclaw:main

@@ -124,6 +124,24 @@ async function waitForMicrotaskCondition(

124124

throw new Error(message);

125125

}

126126127+

function firstSleepWithAbortCall(): [number, AbortSignal | undefined] {

128+

const call = hoisted.sleepWithAbort.mock.calls.at(0);

129+

if (!call) {

130+

throw new Error("expected sleepWithAbort call");

131+

}

132+

return call as [number, AbortSignal | undefined];

133+

}

134+135+

function firstStartAccountContext(

136+

startAccount: ReturnType<typeof vi.fn>,

137+

): ChannelGatewayContext<TestAccount> {

138+

const ctx = startAccount.mock.calls.at(0)?.at(0);

139+

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

140+

throw new Error("expected channel start context");

141+

}

142+

return ctx as ChannelGatewayContext<TestAccount>;

143+

}

144+127145

function installTestRegistry(

128146

...plugins: Array<

129147

ChannelPlugin<TestAccount> | { plugin: ChannelPlugin<TestAccount>; origin: string }

@@ -395,11 +413,9 @@ describe("server-channels auto restart", () => {

395413

() => hoisted.sleepWithAbort.mock.calls.length > 0,

396414

"expected recovery restart backoff to be scheduled",

397415

);

398-

const sleepCall = hoisted.sleepWithAbort.mock.calls[0] as

399-

| [number, AbortSignal | undefined]

400-

| undefined;

401-

expect(sleepCall?.[0]).toBe(10);

402-

expect(sleepCall?.[1]).toBeInstanceOf(AbortSignal);

416+

const sleepCall = firstSleepWithAbortCall();

417+

expect(sleepCall[0]).toBe(10);

418+

expect(sleepCall[1]).toBeInstanceOf(AbortSignal);

403419404420

await manager.stopChannel("discord", DEFAULT_ACCOUNT_ID);

405421

await vi.advanceTimersByTimeAsync(10);

@@ -455,7 +471,7 @@ describe("server-channels auto restart", () => {

455471456472

await manager.startChannels();

457473

expect(startAccount).toHaveBeenCalledTimes(1);

458-

const [ctx] = startAccount.mock.calls[0] ?? [];

474+

const ctx = firstStartAccountContext(startAccount);

459475

expect((ctx?.channelRuntime as { marker?: string } | undefined)?.marker).toBe(

460476

"channel-runtime",

461477

);

@@ -476,7 +492,7 @@ describe("server-channels auto restart", () => {

476492

await manager.startChannel("slack");

477493478494

expect(startAccount).toHaveBeenCalledTimes(1);

479-

const [ctx] = startAccount.mock.calls[0] ?? [];

495+

const ctx = firstStartAccountContext(startAccount);

480496

expect(ctx?.log).toBe(channelLogs.slack);

481497

expect(ctx?.runtime).toBe(channelRuntimeEnvs.slack);

482498

expect((ctx?.log as SubsystemLogger | undefined)?.subsystem).toBe("channels/slack");

@@ -548,7 +564,7 @@ describe("server-channels auto restart", () => {

548564549565

expect(resolveChannelRuntime).toHaveBeenCalledTimes(1);

550566

expect(startAccount).toHaveBeenCalledTimes(1);

551-

const [ctx] = startAccount.mock.calls[0] ?? [];

567+

const ctx = firstStartAccountContext(startAccount);

552568

expect((ctx?.channelRuntime as { marker?: string } | undefined)?.marker).toBe(

553569

"lazy-channel-runtime",

554570

);

@@ -576,7 +592,7 @@ describe("server-channels auto restart", () => {

576592

expect(resolveStartupChannelRuntime).toHaveBeenCalledTimes(1);

577593

expect(resolveChannelRuntime).not.toHaveBeenCalled();

578594

expect(startAccount).toHaveBeenCalledTimes(1);

579-

const [ctx] = startAccount.mock.calls[0] ?? [];

595+

const ctx = firstStartAccountContext(startAccount);

580596

expect((ctx?.channelRuntime as { marker?: string } | undefined)?.marker).toBe(

581597

"startup-channel-runtime",

582598

);

@@ -603,7 +619,7 @@ describe("server-channels auto restart", () => {

603619604620

expect(resolveStartupChannelRuntime).not.toHaveBeenCalled();

605621

expect(resolveChannelRuntime).toHaveBeenCalledTimes(1);

606-

const [ctx] = startAccount.mock.calls[0] ?? [];

622+

const ctx = firstStartAccountContext(startAccount);

607623

expect((ctx?.channelRuntime as { marker?: string } | undefined)?.marker).toBe(

608624

"full-channel-runtime",

609625

);