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

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
The Blog of Author Tim Ferriss
博客园 - 司徒正美
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
有赞技术团队
有赞技术团队
量子位
S
SegmentFault 最新的问题
博客园 - 聂微东
博客园 - 【当耐特】
J
Java Code Geeks
美团技术团队
Hugging Face - Blog
Hugging Face - Blog
H
Help Net Security
V
V2EX
人人都是产品经理
人人都是产品经理
博客园 - Franky
罗磊的独立博客
Engineering at Meta
Engineering at Meta
A
About on SuperTechFans
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
酷 壳 – CoolShell
酷 壳 – CoolShell
云风的 BLOG
云风的 BLOG
Y
Y Combinator Blog
Apple Machine Learning Research
Apple Machine Learning Research

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
fix: harden gateway launchd and configure sections · open...
steipete · 2026-05-17 · via Recent Commits to openclaw:main

@@ -26,6 +26,8 @@ const mocks = vi.hoisted(() => {

2626

waitForGatewayReachable: vi.fn(),

2727

resolveControlUiLinks: vi.fn(),

2828

summarizeExistingConfig: vi.fn(),

29+

promptAuthConfig: vi.fn(),

30+

promptGatewayConfig: vi.fn(),

2931

promptRemoteGatewayConfig: vi.fn(async (cfg: OpenClawConfig) => ({

3032

...cfg,

3133

gateway: { mode: "remote", remote: { url: "wss://gateway.example.test" } },

@@ -86,11 +88,11 @@ vi.mock("./health-format.js", () => ({

8688

}));

87898890

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

89-

promptGatewayConfig: vi.fn(),

91+

promptGatewayConfig: mocks.promptGatewayConfig,

9092

}));

91939294

vi.mock("./configure.gateway-auth.js", () => ({

93-

promptAuthConfig: vi.fn(),

95+

promptAuthConfig: mocks.promptAuthConfig,

9496

}));

95979698

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

@@ -276,6 +278,13 @@ describe("runConfigureWizard", () => {

276278

]);

277279

mocks.setupSearch.mockReset();

278280

mocks.setupSearch.mockImplementation(async (cfg: OpenClawConfig) => cfg);

281+

mocks.promptAuthConfig.mockReset();

282+

mocks.promptAuthConfig.mockImplementation(async (cfg: OpenClawConfig) => cfg);

283+

mocks.promptGatewayConfig.mockReset();

284+

mocks.promptGatewayConfig.mockImplementation(async (cfg: OpenClawConfig) => ({

285+

config: cfg,

286+

port: 18789,

287+

}));

279288

});

280289281290

it("persists gateway.mode=local when only the run mode is selected", async () => {

@@ -328,6 +337,46 @@ describe("runConfigureWizard", () => {

328337

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

329338

});

330339340+

it("does not gate model-only configure behind Gateway run-mode selection", async () => {

341+

setupBaseWizardState();

342+343+

await runConfigureWizard({ command: "configure", sections: ["model"] }, createRuntime());

344+345+

expect(mocks.promptAuthConfig).toHaveBeenCalledOnce();

346+

expect(mocks.clackSelect).not.toHaveBeenCalledWith(

347+

expect.objectContaining({ message: "Where will the Gateway run?" }),

348+

);

349+

expect(mocks.probeGatewayReachable).not.toHaveBeenCalledWith(

350+

expect.objectContaining({ timeoutMs: 300 }),

351+

);

352+

expect(mocks.ensureControlUiAssetsBuilt).not.toHaveBeenCalled();

353+

expect(mocks.resolveControlUiLinks).not.toHaveBeenCalled();

354+

expect(requireWriteConfig().gateway).toBeUndefined();

355+

});

356+357+

it("runs model-only configure for existing remote Gateway configs", async () => {

358+

setupBaseWizardState({

359+

gateway: { mode: "remote", remote: { url: "wss://gateway.example.test" } },

360+

});

361+362+

await runConfigureWizard({ command: "configure", sections: ["model"] }, createRuntime());

363+364+

expect(mocks.promptAuthConfig).toHaveBeenCalledOnce();

365+

expect(mocks.promptRemoteGatewayConfig).not.toHaveBeenCalled();

366+

expect(getGateway(requireWriteConfig()).mode).toBe("remote");

367+

expect(mocks.ensureControlUiAssetsBuilt).not.toHaveBeenCalled();

368+

expect(mocks.resolveControlUiLinks).not.toHaveBeenCalled();

369+

expect(mocks.probeGatewayReachable).not.toHaveBeenCalled();

370+

expect(mocks.note).toHaveBeenCalledWith(

371+

[

372+

"Remote Gateway:",

373+

"wss://gateway.example.test",

374+

"Docs: https://docs.openclaw.ai/gateway/remote",

375+

].join("\n"),

376+

"Gateway",

377+

);

378+

});

379+331380

it("persists provider-owned web search config changes returned by setupSearch", async () => {

332381

setupBaseWizardState();

333382

mocks.setupSearch.mockImplementation(async (cfg: OpenClawConfig) =>

@@ -337,7 +386,7 @@ describe("runConfigureWizard", () => {

337386

})(cfg),

338387

);

339388

queueWizardPrompts({

340-

select: ["local"],

389+

select: [],

341390

confirm: [true, false],

342391

});

343392

@@ -347,7 +396,7 @@ describe("runConfigureWizard", () => {

347396

mockCallArg(mocks.setupSearch, "setupSearch"),

348397

"setupSearch config",

349398

);

350-

expect(getGateway(setupConfig).mode).toBe("local");

399+

expect(setupConfig.gateway).toBeUndefined();

351400

const written = requireWriteConfig();

352401

const search = getWebSearch(written);

353402

expect(search.provider).toBe("firecrawl");

@@ -365,7 +414,7 @@ describe("runConfigureWizard", () => {

365414

setupBaseWizardState();

366415

mocks.resolveSearchProviderOptions.mockReturnValue([]);

367416

queueWizardPrompts({

368-

select: ["local"],

417+

select: [],

369418

confirm: [true, false],

370419

});

371420

@@ -385,7 +434,7 @@ describe("runConfigureWizard", () => {

385434

it("does not load managed search provider options when web search is disabled", async () => {

386435

setupBaseWizardState();

387436

queueWizardPrompts({

388-

select: ["local"],

437+

select: [],

389438

confirm: [false, true],

390439

});

391440

@@ -404,15 +453,15 @@ describe("runConfigureWizard", () => {

404453

it("defers channel status checks until a channel is selected", async () => {

405454

setupBaseWizardState();

406455

queueWizardPrompts({

407-

select: ["local", "configure"],

456+

select: ["configure"],

408457

confirm: [],

409458

});

410459411460

await runConfigureWizard({ command: "configure", sections: ["channels"] }, createRuntime());

412461413462

const setupChannelsCall = mocks.setupChannels.mock.calls[0] as Array<unknown> | undefined;

414463

const setupChannelsConfig = requireRecord(setupChannelsCall?.[0], "setupChannels config");

415-

expect(getGateway(setupChannelsConfig).mode).toBe("local");

464+

expect(setupChannelsConfig.gateway).toBeUndefined();

416465

const setupChannelsOptions = requireRecord(setupChannelsCall?.[3], "setupChannels options");

417466

expect(setupChannelsOptions.deferStatusUntilSelection).toBe(true);

418467

expect(setupChannelsOptions.skipStatusNote).toBe(true);

@@ -439,7 +488,7 @@ describe("runConfigureWizard", () => {

439488

})(cfg),

440489

);

441490

queueWizardPrompts({

442-

select: ["local"],

491+

select: [],

443492

confirm: [true, false],

444493

});

445494

@@ -461,7 +510,7 @@ describe("runConfigureWizard", () => {

461510

},

462511

});

463512

queueWizardPrompts({

464-

select: ["local", "cached"],

513+

select: ["cached"],

465514

confirm: [true, true, false, true],

466515

});

467516

@@ -527,7 +576,7 @@ describe("runConfigureWizard", () => {

527576

};

528577

setupBaseWizardState(baseConfig);

529578

queueWizardPrompts({

530-

select: ["local"],

579+

select: [],

531580

confirm: [],

532581

});

533582