fix(cli): stop emitting retired wide-area config (#121392)

Co-authored-by: Peter Steinberger <steipete@gmail.com>
This commit is contained in:
ClawSweeper
2026-08-09 21:15:24 -07:00
committed by GitHub
parent 1512dd88cb
commit 4fe078fcd8
5 changed files with 11 additions and 4 deletions
-1
View File
@@ -854,7 +854,6 @@ async function runGatewayPrompt(prompt: string): Promise<PromptResult> {
},
discovery: {
mdns: { mode: "off" },
wideArea: { enabled: false },
},
...(proxyPort
? {
+7
View File
@@ -1,6 +1,7 @@
// CLI utility tests cover shared command helpers, option parsing, and output formatting.
import { Command } from "commander";
import { describe, expect, it, vi } from "vitest";
import { defaultRuntime } from "../runtime.js";
import { runCommandWithRuntime } from "./cli-utils.js";
import { registerDnsCli } from "./dns-cli.js";
import { parseByteSize } from "./parse-bytes.js";
@@ -129,6 +130,7 @@ describe("shouldSkipStartupEnvironmentRespawnForArgv", () => {
describe("dns cli", () => {
it("prints setup info (no apply)", async () => {
const log = vi.spyOn(console, "log").mockImplementation(() => {});
const writeJson = vi.spyOn(defaultRuntime, "writeJson").mockImplementation(() => {});
try {
const program = new Command();
registerDnsCli(program);
@@ -136,7 +138,12 @@ describe("dns cli", () => {
const output = log.mock.calls.map((call) => call.join(" ")).join("\\n");
expect(output).toContain("DNS setup");
expect(output).toContain("openclaw.internal");
expect(writeJson).toHaveBeenCalledWith({
gateway: { bind: "auto" },
discovery: { wideArea: { domain: "openclaw.internal." } },
});
} finally {
writeJson.mockRestore();
log.mockRestore();
}
});
+1 -1
View File
@@ -177,7 +177,7 @@ export function registerDnsCli(program: Command) {
);
defaultRuntime.writeJson({
gateway: { bind: "auto" },
discovery: { wideArea: { enabled: true, domain: wideAreaDomain } },
discovery: { wideArea: { domain: wideAreaDomain } },
});
defaultRuntime.log("");
defaultRuntime.log(theme.heading("Tailscale admin (DNS → Nameservers):"));
+1 -1
View File
@@ -936,7 +936,7 @@ describe("gateway-status command", () => {
config: {
...createSecretRefGatewayConfig({ gatewayMode: "remote" }),
discovery: {
wideArea: { enabled: true },
wideArea: { domain: "openclaw.internal" },
},
},
issues: [],
+2 -1
View File
@@ -228,7 +228,8 @@ export function extractConfigSummary(snapshotUnknown: unknown): GatewayConfigSum
const remoteTokenConfigured = hasConfiguredSecretInput(remote.token, secretDefaults);
const remotePasswordConfigured = hasConfiguredSecretInput(remote.password, secretDefaults);
const wideAreaEnabled = typeof wideArea.enabled === "boolean" ? wideArea.enabled : null;
const wideAreaEnabled =
typeof wideArea.domain === "string" ? wideArea.domain.trim().length > 0 : null;
return {
path,