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 de09c6764d30..8f70d9ce0f83 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 95b704f0c67f..5d942ae1518c 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 5601daa8bb0f..192631bc8f93 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 febda84f4f3c..61846de512b6 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 8828be96f3ac..75dbdcbb0904 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 66262f85e89d..b0ae47c94922 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 443853afd708..ebf3bc98735d 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 5be6684c699a..75b48a0e61c4 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 917037eb8597..f2d3b61a4b3e 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 c6ccc4bb9a03..5d10b6f58992 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 be7830b1a3e5..2ead84fc815a 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 a4fded141a08..a65b7f9b8cbd 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 fbdbfcc8b63b..2f2c64ace441 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 6f8ac2736e4d..3a5f9393a8c8 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 849a7dcb9f41..14e0051c634d 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 1130e3fef9ab..34361720b856 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 993320726430..fed6db627fff 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 22177fcdf3a7..8d14cc0cc357 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 eac9ba1cc9d3..d3f794e5ad76 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 ffd15ad123dc..b671c7ae7fcf 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";