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

推荐订阅源

V
Visual Studio Blog
量子位
大猫的无限游戏
大猫的无限游戏
Hugging Face - Blog
Hugging Face - Blog
S
SegmentFault 最新的问题
Blog — PlanetScale
Blog — PlanetScale
月光博客
月光博客
Google DeepMind News
Google DeepMind News
小众软件
小众软件
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
MongoDB | Blog
MongoDB | Blog
B
Blog RSS Feed
博客园 - Franky
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
B
Blog
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
Recent Announcements
Recent Announcements
Y
Y Combinator Blog
Microsoft Security Blog
Microsoft Security Blog
雷峰网
雷峰网
Jina AI
Jina AI
酷 壳 – CoolShell
酷 壳 – CoolShell

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: guard update cli mock calls · openclaw/openclaw@2fe...
steipete · 2026-05-12 · via Recent Commits to openclaw:main

@@ -359,7 +359,7 @@ describe("update-cli", () => {

359359

};

360360361361

const expectUpdateCallChannel = (channel: string) => {

362-

const call = vi.mocked(runGatewayUpdate).mock.calls[0]?.[0];

362+

const call = vi.mocked(runGatewayUpdate).mock.calls.at(0)?.[0];

363363

expect(call?.channel).toBe(channel);

364364

return call;

365365

};

@@ -851,7 +851,7 @@ describe("update-cli", () => {

851851

},

852852

);

853853854-

const spawnEnv = (spawn.mock.calls[0]?.[2] as { env?: NodeJS.ProcessEnv } | undefined)?.env;

854+

const spawnEnv = (spawn.mock.calls.at(0)?.[2] as { env?: NodeJS.ProcessEnv } | undefined)?.env;

855855

expect(spawnEnv?.OPENCLAW_SERVICE_MARKER).toBeUndefined();

856856

expect(spawnEnv?.OPENCLAW_SERVICE_KIND).toBeUndefined();

857857

});

@@ -1193,7 +1193,7 @@ describe("update-cli", () => {

11931193

},

11941194

);

119511951196-

const updateCall = updateNpmInstalledPlugins.mock.calls[0]?.[0] as

1196+

const updateCall = updateNpmInstalledPlugins.mock.calls.at(0)?.[0] as

11971197

| {

11981198

onIntegrityDrift?: (drift: {

11991199

pluginId: string;

@@ -1670,7 +1670,7 @@ describe("update-cli", () => {

1670167016711671

if (expectedPersistedChannel !== undefined) {

16721672

expect(replaceConfigFile).toHaveBeenCalledTimes(1);

1673-

const writeCall = vi.mocked(replaceConfigFile).mock.calls[0]?.[0] as

1673+

const writeCall = vi.mocked(replaceConfigFile).mock.calls.at(0)?.[0] as

16741674

| { nextConfig?: { update?: { channel?: string } } }

16751675

| undefined;

16761676

expect(writeCall?.nextConfig?.update?.channel).toBe(expectedPersistedChannel);

@@ -2222,7 +2222,7 @@ describe("update-cli", () => {

22222222

);

22232223

const npmInstallCallOrder =

22242224

vi.mocked(runCommandWithTimeout).mock.invocationCallOrder[npmInstallCallIndex];

2225-

const serviceStopCall = serviceStop.mock.calls[0]?.[0] as

2225+

const serviceStopCall = serviceStop.mock.calls.at(0)?.[0] as

22262226

| { env?: NodeJS.ProcessEnv }

22272227

| undefined;

22282228

expect(serviceStopCall?.env?.OPENCLAW_SERVICE_MARKER).toBe("openclaw");

@@ -2678,7 +2678,7 @@ describe("update-cli", () => {

26782678

await updateCommand({ channel: "beta", yes: true });

2679267926802680

const repairCall =

2681-

legacyConfigRepairMocks.repairLegacyConfigForUpdateChannel.mock.calls[0]?.[0];

2681+

legacyConfigRepairMocks.repairLegacyConfigForUpdateChannel.mock.calls.at(0)?.[0];

26822682

expect(repairCall?.configSnapshot.hash).toBe("legacy-hash");

26832683

expect(repairCall?.configSnapshot.valid).toBe(false);

26842684

expect(repairCall?.jsonMode).toBe(false);

@@ -2894,10 +2894,10 @@ describe("update-cli", () => {

2894289428952895

await updateCommand({ channel: "beta", yes: true });

289628962897-

const syncConfig = vi.mocked(syncPluginsForUpdateChannel).mock.calls[0]?.[0]?.config as

2897+

const syncConfig = vi.mocked(syncPluginsForUpdateChannel).mock.calls.at(0)?.[0]?.config as

28982898

| OpenClawConfig

28992899

| undefined;

2900-

const updateCall = vi.mocked(updateNpmInstalledPlugins).mock.calls[0]?.[0] as

2900+

const updateCall = vi.mocked(updateNpmInstalledPlugins).mock.calls.at(0)?.[0] as

29012901

| { skipDisabledPlugins?: boolean; syncOfficialPluginInstalls?: boolean }

29022902

| undefined;

29032903

expect(syncConfig?.plugins?.installs).toEqual(pluginInstallRecords);

@@ -2948,7 +2948,7 @@ describe("update-cli", () => {

2948294829492949

await updateCommand({ channel: "dev", yes: true, restart: false });

295029502951-

const persistedConfig = vi.mocked(replaceConfigFile).mock.calls[0]?.[0]?.nextConfig;

2951+

const persistedConfig = vi.mocked(replaceConfigFile).mock.calls.at(0)?.[0]?.nextConfig;

29522952

expect(persistedConfig?.update?.channel).toBe("dev");

29532953

const syncCall = syncPluginCall() as

29542954

| { channel?: string; config?: OpenClawConfig; workspaceDir?: string }

@@ -3130,7 +3130,9 @@ describe("update-cli", () => {

31303130

expect(restartCall?.[0].slice(1)).toEqual([updatedEntrypoint, "gateway", "restart", "--json"]);

31313131

expect(restartCall?.[1].cwd).toBe(updatedRoot);

31323132

expect(restartCall?.[1].timeoutMs).toBe(60_000);

3133-

const probeCall = probeGateway.mock.calls[0]?.[0] as { includeDetails?: boolean } | undefined;

3133+

const probeCall = probeGateway.mock.calls.at(0)?.[0] as

3134+

| { includeDetails?: boolean }

3135+

| undefined;

31343136

expect(probeCall?.includeDetails).toBe(true);

31353137

expect(defaultRuntime.exit).toHaveBeenCalledWith(1);

31363138

expect(defaultRuntime.writeJson).not.toHaveBeenCalled();

@@ -3185,7 +3187,9 @@ describe("update-cli", () => {

31853187

expect(installCall?.[1].timeoutMs).toBe(60_000);

31863188

expect(gatewayCommandCall(updatedEntrypoint, "restart")).toBeUndefined();

31873189

expect(runRestartScript).not.toHaveBeenCalled();

3188-

const probeCall = probeGateway.mock.calls[0]?.[0] as { includeDetails?: boolean } | undefined;

3190+

const probeCall = probeGateway.mock.calls.at(0)?.[0] as

3191+

| { includeDetails?: boolean }

3192+

| undefined;

31893193

expect(probeCall?.includeDetails).toBe(true);

31903194

expect(defaultRuntime.exit).not.toHaveBeenCalledWith(1);

31913195

});

@@ -3237,7 +3241,9 @@ describe("update-cli", () => {

32373241

await updateCommand({ yes: true });

3238324232393243

expect(runRestartScript).toHaveBeenCalledTimes(1);

3240-

const probeCall = probeGateway.mock.calls[0]?.[0] as { includeDetails?: boolean } | undefined;

3244+

const probeCall = probeGateway.mock.calls.at(0)?.[0] as

3245+

| { includeDetails?: boolean }

3246+

| undefined;

32413247

expect(probeCall?.includeDetails).toBe(true);

32423248

expect(defaultRuntime.exit).toHaveBeenCalledWith(1);

32433249

expect(

@@ -3328,7 +3334,7 @@ describe("update-cli", () => {

33283334

const runCommandWithTimeoutMock = vi.mocked(runCommandWithTimeout) as unknown as {

33293335

mock: { calls: Array<[unknown, { cwd?: string }?]> };

33303336

};

3331-

const root = setup?.root ?? runCommandWithTimeoutMock.mock.calls[0]?.[1]?.cwd;

3337+

const root = setup?.root ?? runCommandWithTimeoutMock.mock.calls.at(0)?.[1]?.cwd;

33323338

const entryPath = setup?.entrypoints?.[0] ?? path.join(String(root), "dist", "entry.js");

3333333933343340

const installCall = gatewayCommandCall(entryPath, "install");

@@ -3355,7 +3361,7 @@ describe("update-cli", () => {

3355336133563362

await updateCommand({});

335733633358-

const doctorCall = vi.mocked(doctorCommand).mock.calls[0];

3364+

const doctorCall = vi.mocked(doctorCommand).mock.calls.at(0);

33593365

expect(doctorCall?.[0]).toBe(defaultRuntime);

33603366

expect(doctorCall?.[1]?.nonInteractive).toBe(true);

33613367

expect(process.env.OPENCLAW_UPDATE_IN_PROGRESS).toBeUndefined();

@@ -3473,7 +3479,7 @@ describe("update-cli", () => {

3473347934743480

await updateWizardCommand({});

347534813476-

const call = vi.mocked(runGatewayUpdate).mock.calls[0]?.[0];

3482+

const call = vi.mocked(runGatewayUpdate).mock.calls.at(0)?.[0];

34773483

expect(call?.channel).toBe("dev");

34783484

});

34793485

});