From 0de924b35cdf3c35b33cfe2cc67775b3f78a42bd Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 4 Jun 2026 18:52:07 -0400 Subject: [PATCH] docs: document command support batch --- src/commands/agent-command.test-mocks.ts | 9 ++------- src/commands/agents.bind.test-support.ts | 1 + src/commands/backup.atomic.test.ts | 1 + src/commands/backup.create-verify.test.ts | 1 + src/commands/channels.config-only-status-output.test.ts | 1 + src/commands/doctor-auth-canonical-api-key-alias.test.ts | 1 + src/commands/doctor-browser.facade.test.ts | 1 + src/commands/doctor-config-flow.test.ts | 1 + src/commands/doctor-legacy-config.test.ts | 1 + src/commands/doctor-lint.test.ts | 1 + .../doctor-state-integrity.cloud-storage.test.ts | 1 + src/commands/doctor-update.test.ts | 1 + src/commands/flows.test.ts | 1 + .../onboard-non-interactive.gateway-health-auth.test.ts | 1 + src/commands/onboard-non-interactive.test-helpers.ts | 1 + src/commands/onboard-remote.test.ts | 1 + src/commands/sandbox.test.ts | 1 + src/commands/sessions.test-helpers.ts | 1 + src/commands/status-overview-rows.test.ts | 1 + src/commands/status.scan-execute.test.ts | 1 + 20 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/commands/agent-command.test-mocks.ts b/src/commands/agent-command.test-mocks.ts index de09c6764d3..8f70d9ce0f8 100644 --- a/src/commands/agent-command.test-mocks.ts +++ b/src/commands/agent-command.test-mocks.ts @@ -1,3 +1,4 @@ +// Agent command test mocks replace logging and runtime-heavy modules shared by agent command suites. import { vi } from "vitest"; vi.mock("../logging/subsystem.js", () => { @@ -197,13 +198,7 @@ vi.mock("../agents/model-selection.js", () => { resolveDefaultRef(cfg), ), resolveModelRefFromString: vi.fn( - ({ - raw, - defaultProvider, - }: { - raw: string; - defaultProvider?: string; - }) => { + ({ raw, defaultProvider }: { raw: string; defaultProvider?: string }) => { const ref = parseModelRef(raw, defaultProvider ?? "openai"); return ref ? { ref, source: "parsed" } : null; }, diff --git a/src/commands/agents.bind.test-support.ts b/src/commands/agents.bind.test-support.ts index 95b704f0c67..5d942ae1518 100644 --- a/src/commands/agents.bind.test-support.ts +++ b/src/commands/agents.bind.test-support.ts @@ -1,3 +1,4 @@ +// Agent binding test support centralizes mocked channel plugin registries and lazy imports. import type { Mock } from "vitest"; import { vi } from "vitest"; import type { OpenClawConfig } from "../config/types.openclaw.js"; diff --git a/src/commands/backup.atomic.test.ts b/src/commands/backup.atomic.test.ts index 5601daa8bb0..192631bc8f9 100644 --- a/src/commands/backup.atomic.test.ts +++ b/src/commands/backup.atomic.test.ts @@ -1,3 +1,4 @@ +// Backup atomicity tests cover temp-file writes, rollback behavior, and backup archive consistency. import fs from "node:fs/promises"; import os from "node:os"; import path from "node:path"; diff --git a/src/commands/backup.create-verify.test.ts b/src/commands/backup.create-verify.test.ts index febda84f4f3..61846de512b 100644 --- a/src/commands/backup.create-verify.test.ts +++ b/src/commands/backup.create-verify.test.ts @@ -1,3 +1,4 @@ +// Backup create/verify tests cover archive creation, runtime output, and verification failure handling. import { describe, expect, it, vi } from "vitest"; import type { RuntimeEnv } from "../runtime.js"; import { backupCreateCommand } from "./backup.js"; diff --git a/src/commands/channels.config-only-status-output.test.ts b/src/commands/channels.config-only-status-output.test.ts index 8828be96f3a..75dbdcbb090 100644 --- a/src/commands/channels.config-only-status-output.test.ts +++ b/src/commands/channels.config-only-status-output.test.ts @@ -1,3 +1,4 @@ +// Channels config-only status tests cover fallback output when gateway status is unavailable. import { describe, expect, it, vi } from "vitest"; import type { ChannelPlugin } from "../channels/plugins/types.js"; import { makeDirectPlugin } from "../test-utils/channel-plugin-test-fixtures.js"; diff --git a/src/commands/doctor-auth-canonical-api-key-alias.test.ts b/src/commands/doctor-auth-canonical-api-key-alias.test.ts index 66262f85e89..b0ae47c9492 100644 --- a/src/commands/doctor-auth-canonical-api-key-alias.test.ts +++ b/src/commands/doctor-auth-canonical-api-key-alias.test.ts @@ -1,3 +1,4 @@ +// Doctor auth alias tests cover canonical API-key profile repair and auth-profile store migration. import fs from "node:fs"; import path from "node:path"; import { afterEach, describe, expect, it, vi } from "vitest"; diff --git a/src/commands/doctor-browser.facade.test.ts b/src/commands/doctor-browser.facade.test.ts index 443853afd70..ebf3bc98735 100644 --- a/src/commands/doctor-browser.facade.test.ts +++ b/src/commands/doctor-browser.facade.test.ts @@ -1,3 +1,4 @@ +// Doctor browser facade tests cover legacy browser residue detection and browser doctor repair wiring. import { beforeEach, describe, expect, it, vi } from "vitest"; import type { OpenClawConfig } from "../config/config.js"; import { diff --git a/src/commands/doctor-config-flow.test.ts b/src/commands/doctor-config-flow.test.ts index 5be6684c699..75b48a0e61c 100644 --- a/src/commands/doctor-config-flow.test.ts +++ b/src/commands/doctor-config-flow.test.ts @@ -1,3 +1,4 @@ +// Doctor config-flow tests cover config repair, migration, stripping, and validation orchestration. import fs from "node:fs/promises"; import path from "node:path"; import { withTempHome } from "openclaw/plugin-sdk/test-env"; diff --git a/src/commands/doctor-legacy-config.test.ts b/src/commands/doctor-legacy-config.test.ts index 917037eb859..f2d3b61a4b3 100644 --- a/src/commands/doctor-legacy-config.test.ts +++ b/src/commands/doctor-legacy-config.test.ts @@ -1,3 +1,4 @@ +// Doctor legacy-config tests cover compatibility normalizers for old channel, browser, and config shapes. import { describe, expect, it } from "vitest"; import { normalizeLegacyStreamingAliases } from "../config/channel-compat-normalization.js"; import type { OpenClawConfig } from "../config/config.js"; diff --git a/src/commands/doctor-lint.test.ts b/src/commands/doctor-lint.test.ts index c6ccc4bb9a0..5d10b6f5899 100644 --- a/src/commands/doctor-lint.test.ts +++ b/src/commands/doctor-lint.test.ts @@ -1,3 +1,4 @@ +// Doctor lint tests cover health-check registry integration and lint warning output. import { beforeEach, describe, expect, it, vi } from "vitest"; import type { OpenClawConfig } from "../config/types.openclaw.js"; import { resetCoreHealthChecksForTest } from "../flows/doctor-core-checks.js"; diff --git a/src/commands/doctor-state-integrity.cloud-storage.test.ts b/src/commands/doctor-state-integrity.cloud-storage.test.ts index be7830b1a3e..2ead84fc815 100644 --- a/src/commands/doctor-state-integrity.cloud-storage.test.ts +++ b/src/commands/doctor-state-integrity.cloud-storage.test.ts @@ -1,3 +1,4 @@ +// Doctor state integrity cloud-storage tests cover macOS cloud-synced state directory detection. import os from "node:os"; import path from "node:path"; import { describe, expect, it, vi } from "vitest"; diff --git a/src/commands/doctor-update.test.ts b/src/commands/doctor-update.test.ts index a4fded141a0..a65b7f9b8cb 100644 --- a/src/commands/doctor-update.test.ts +++ b/src/commands/doctor-update.test.ts @@ -1,3 +1,4 @@ +// Doctor update tests cover pre-doctor update prompts, state files, and declined update flows. import fs from "node:fs/promises"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import { maybeOfferUpdateBeforeDoctor } from "./doctor-update.js"; diff --git a/src/commands/flows.test.ts b/src/commands/flows.test.ts index fbdbfcc8b63..2f2c64ace44 100644 --- a/src/commands/flows.test.ts +++ b/src/commands/flows.test.ts @@ -1,3 +1,4 @@ +// Flows command tests cover task creation, task execution, and runtime command output. import { afterEach, describe, expect, it, vi } from "vitest"; import type { RuntimeEnv } from "../runtime.js"; import { createRunningTaskRun as createRunningTaskRunOrNull } from "../tasks/task-executor.js"; diff --git a/src/commands/onboard-non-interactive.gateway-health-auth.test.ts b/src/commands/onboard-non-interactive.gateway-health-auth.test.ts index 6f8ac2736e4..3a5f9393a8c 100644 --- a/src/commands/onboard-non-interactive.gateway-health-auth.test.ts +++ b/src/commands/onboard-non-interactive.gateway-health-auth.test.ts @@ -1,3 +1,4 @@ +// Non-interactive gateway health auth tests cover SecretRef and password resolution for setup probes. import fs from "node:fs/promises"; import os from "node:os"; import path from "node:path"; diff --git a/src/commands/onboard-non-interactive.test-helpers.ts b/src/commands/onboard-non-interactive.test-helpers.ts index 849a7dcb9f4..14e0051c634 100644 --- a/src/commands/onboard-non-interactive.test-helpers.ts +++ b/src/commands/onboard-non-interactive.test-helpers.ts @@ -1,3 +1,4 @@ +// Non-interactive onboarding test helpers build runtime stubs that throw instead of exiting. import type { RuntimeEnv } from "../runtime.js"; type RuntimeLike = Pick; diff --git a/src/commands/onboard-remote.test.ts b/src/commands/onboard-remote.test.ts index 1130e3fef9a..34361720b85 100644 --- a/src/commands/onboard-remote.test.ts +++ b/src/commands/onboard-remote.test.ts @@ -1,3 +1,4 @@ +// Onboard remote tests cover remote gateway prompts, Bonjour discovery, and remote config mutation. import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import type { OpenClawConfig } from "../config/config.js"; import type { GatewayBonjourBeacon } from "../infra/bonjour-discovery.js"; diff --git a/src/commands/sandbox.test.ts b/src/commands/sandbox.test.ts index 99332072643..fed6db627ff 100644 --- a/src/commands/sandbox.test.ts +++ b/src/commands/sandbox.test.ts @@ -1,3 +1,4 @@ +// Sandbox command tests cover browser/container status formatting and sandbox diagnostics. import { beforeEach, describe, expect, it, vi } from "vitest"; import type { SandboxBrowserInfo, SandboxContainerInfo } from "../agents/sandbox.js"; diff --git a/src/commands/sessions.test-helpers.ts b/src/commands/sessions.test-helpers.ts index 22177fcdf3a..8d14cc0cc35 100644 --- a/src/commands/sessions.test-helpers.ts +++ b/src/commands/sessions.test-helpers.ts @@ -1,3 +1,4 @@ +// Session command test helpers create temporary homes, session stores, and runtime fixtures. import { randomUUID } from "node:crypto"; import fs from "node:fs"; import os from "node:os"; diff --git a/src/commands/status-overview-rows.test.ts b/src/commands/status-overview-rows.test.ts index eac9ba1cc9d..d3f794e5ad7 100644 --- a/src/commands/status-overview-rows.test.ts +++ b/src/commands/status-overview-rows.test.ts @@ -1,3 +1,4 @@ +// Status overview row tests cover status-all overview values, update metadata, and display rows. import { describe, expect, it } from "vitest"; import { VERSION } from "../version.js"; import { diff --git a/src/commands/status.scan-execute.test.ts b/src/commands/status.scan-execute.test.ts index ffd15ad123d..b671c7ae7fc 100644 --- a/src/commands/status.scan-execute.test.ts +++ b/src/commands/status.scan-execute.test.ts @@ -1,3 +1,4 @@ +// Status scan execute tests cover overview-driven status probe execution and memory snapshot aggregation. import { beforeEach, describe, expect, it, vi } from "vitest"; import { executeStatusScanFromOverview } from "./status.scan-execute.ts"; import type { StatusScanOverviewResult } from "./status.scan-overview.ts";