From 50dcaad71a4bf65b37f8b96e7bb516ed6852873d Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 4 Jun 2026 19:11:43 -0400 Subject: [PATCH] docs: document remaining command tests --- src/commands/agent-via-gateway.test.ts | 1 + src/commands/auth-choice.test.ts | 1 + src/commands/backup.test.ts | 1 + src/commands/channels.resolve.test.ts | 1 + ...surfaces-signal-runtime-errors-channels-status-output.test.ts | 1 + src/commands/config-validation.test.ts | 1 + src/commands/daemon-install-plan.shared.test.ts | 1 + src/commands/doctor-auth.deprecated-cli-profiles.test.ts | 1 + src/commands/doctor-completion.test.ts | 1 + src/commands/doctor-config-flow.include-warning.test.ts | 1 + src/commands/doctor-device-pairing.test.ts | 1 + src/commands/doctor-format.test.ts | 1 + src/commands/doctor-gateway-auth-token.test.ts | 1 + src/commands/doctor-heartbeat-session-target.test.ts | 1 + src/commands/doctor-plugin-registry.test.ts | 1 + src/commands/doctor-session-snapshots.test.ts | 1 + src/commands/doctor-session-transcripts.test.ts | 1 + src/commands/doctor-state-integrity.test.ts | 1 + src/commands/doctor-state-migrations.test.ts | 1 + src/commands/doctor-workspace-status.test.ts | 1 + src/commands/doctor.warns-state-directory-is-missing.e2e.test.ts | 1 + src/commands/export-trajectory.test.ts | 1 + src/commands/gateway-readiness.test.ts | 1 + src/commands/health.test.ts | 1 + src/commands/models.auth.provider-resolution.test.ts | 1 + src/commands/node-daemon-install-helpers.test.ts | 1 + src/commands/onboard-auth.config-shared.test.ts | 1 + src/commands/onboard-channels.post-write.test.ts | 1 + src/commands/onboard-helpers.test.ts | 1 + src/commands/onboarding-plugin-install.test.ts | 1 + src/commands/setup.test.ts | 1 + src/commands/status.link-channel.test.ts | 1 + 32 files changed, 32 insertions(+) diff --git a/src/commands/agent-via-gateway.test.ts b/src/commands/agent-via-gateway.test.ts index cfd8429e75de..eb525e812f6f 100644 --- a/src/commands/agent-via-gateway.test.ts +++ b/src/commands/agent-via-gateway.test.ts @@ -1,3 +1,4 @@ +// Agent via gateway tests cover gateway-backed agent command dispatch and session loading. import fs from "node:fs"; import os from "node:os"; import path from "node:path"; diff --git a/src/commands/auth-choice.test.ts b/src/commands/auth-choice.test.ts index f8f67fca46d7..0754a3ce685e 100644 --- a/src/commands/auth-choice.test.ts +++ b/src/commands/auth-choice.test.ts @@ -1,3 +1,4 @@ +// Auth choice tests cover auth choice application, provider config, and credential prompts. import fs from "node:fs/promises"; import path from "node:path"; import { afterAll, afterEach, beforeAll, describe, expect, it, vi } from "vitest"; diff --git a/src/commands/backup.test.ts b/src/commands/backup.test.ts index e5dcf42313d1..59dbe9c7ff24 100644 --- a/src/commands/backup.test.ts +++ b/src/commands/backup.test.ts @@ -1,3 +1,4 @@ +// Backup command tests cover backup create, verify, and runtime output paths. import fs from "node:fs/promises"; import os from "node:os"; import path from "node:path"; diff --git a/src/commands/channels.resolve.test.ts b/src/commands/channels.resolve.test.ts index 51aad52074d3..4538aa97301f 100644 --- a/src/commands/channels.resolve.test.ts +++ b/src/commands/channels.resolve.test.ts @@ -1,3 +1,4 @@ +// Channels resolve tests cover channel/account selection and command output for message routing. import { beforeEach, describe, expect, it, vi } from "vitest"; import { channelsResolveCommand } from "./channels/resolve.js"; diff --git a/src/commands/channels.surfaces-signal-runtime-errors-channels-status-output.test.ts b/src/commands/channels.surfaces-signal-runtime-errors-channels-status-output.test.ts index 4955af53d4c4..34bb7092b6b1 100644 --- a/src/commands/channels.surfaces-signal-runtime-errors-channels-status-output.test.ts +++ b/src/commands/channels.surfaces-signal-runtime-errors-channels-status-output.test.ts @@ -1,3 +1,4 @@ +// Channels status error-surface tests cover Signal runtime errors in channel status output. import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import { collectStatusIssuesFromLastError } from "../plugin-sdk/status-helpers.js"; import { setActivePluginRegistry } from "../plugins/runtime.js"; diff --git a/src/commands/config-validation.test.ts b/src/commands/config-validation.test.ts index e8e7cc98c41c..c47cee4553ee 100644 --- a/src/commands/config-validation.test.ts +++ b/src/commands/config-validation.test.ts @@ -1,3 +1,4 @@ +// Config validation tests cover config snapshot validation and command error handling. import { beforeEach, describe, expect, it, vi } from "vitest"; import type { PluginCompatibilityNotice } from "../plugins/status.js"; import { createCompatibilityNotice } from "../plugins/status.test-helpers.js"; diff --git a/src/commands/daemon-install-plan.shared.test.ts b/src/commands/daemon-install-plan.shared.test.ts index 322c87c767d1..74656c66bd67 100644 --- a/src/commands/daemon-install-plan.shared.test.ts +++ b/src/commands/daemon-install-plan.shared.test.ts @@ -1,3 +1,4 @@ +// Daemon install plan tests cover shared install plan validation and platform warning helpers. import { describe, expect, it } from "vitest"; import { resolveDaemonInstallRuntimeInputs, diff --git a/src/commands/doctor-auth.deprecated-cli-profiles.test.ts b/src/commands/doctor-auth.deprecated-cli-profiles.test.ts index c470e14f8cb6..276834a97904 100644 --- a/src/commands/doctor-auth.deprecated-cli-profiles.test.ts +++ b/src/commands/doctor-auth.deprecated-cli-profiles.test.ts @@ -1,3 +1,4 @@ +// Doctor deprecated CLI profile tests cover legacy auth profile migration and warnings. import { beforeEach, describe, expect, it, vi } from "vitest"; import type { AuthProfileStore } from "../agents/auth-profiles/types.js"; import type { OpenClawConfig } from "../config/config.js"; diff --git a/src/commands/doctor-completion.test.ts b/src/commands/doctor-completion.test.ts index 4b5e32ef01ef..61af8caa0f24 100644 --- a/src/commands/doctor-completion.test.ts +++ b/src/commands/doctor-completion.test.ts @@ -1,3 +1,4 @@ +// Doctor completion tests cover final doctor status summaries and completion messaging. import { describe, expect, it } from "vitest"; import { shellCompletionStatusToHealthFindings, diff --git a/src/commands/doctor-config-flow.include-warning.test.ts b/src/commands/doctor-config-flow.include-warning.test.ts index 5be9d7b6ee36..24319ca0d922 100644 --- a/src/commands/doctor-config-flow.include-warning.test.ts +++ b/src/commands/doctor-config-flow.include-warning.test.ts @@ -1,3 +1,4 @@ +// Doctor config-flow include-warning tests cover config include warnings during repair. import { describe, expect, it, vi } from "vitest"; import { note } from "../../packages/terminal-core/src/note.js"; import { noteIncludeConfinementWarning } from "./doctor-config-analysis.js"; diff --git a/src/commands/doctor-device-pairing.test.ts b/src/commands/doctor-device-pairing.test.ts index 6f38337f3fe9..85c52406c12a 100644 --- a/src/commands/doctor-device-pairing.test.ts +++ b/src/commands/doctor-device-pairing.test.ts @@ -1,3 +1,4 @@ +// Doctor device pairing tests cover device-pairing checks, repair prompts, and diagnostics. import fs from "node:fs/promises"; import path from "node:path"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/commands/doctor-format.test.ts b/src/commands/doctor-format.test.ts index f0885333f779..cf0420c3f97b 100644 --- a/src/commands/doctor-format.test.ts +++ b/src/commands/doctor-format.test.ts @@ -1,3 +1,4 @@ +// Doctor format tests cover doctor output formatting and issue display helpers. import { describe, expect, it } from "vitest"; import { buildGatewayRuntimeHints } from "./doctor-format.js"; diff --git a/src/commands/doctor-gateway-auth-token.test.ts b/src/commands/doctor-gateway-auth-token.test.ts index 5dd0844768ff..7bafd30a8542 100644 --- a/src/commands/doctor-gateway-auth-token.test.ts +++ b/src/commands/doctor-gateway-auth-token.test.ts @@ -1,3 +1,4 @@ +// Doctor gateway auth token tests cover token resolution, repair prompts, and credential status output. import fs from "node:fs/promises"; import { tmpdir } from "node:os"; import { join } from "node:path"; diff --git a/src/commands/doctor-heartbeat-session-target.test.ts b/src/commands/doctor-heartbeat-session-target.test.ts index 79e0863b6f5c..aba25a151f40 100644 --- a/src/commands/doctor-heartbeat-session-target.test.ts +++ b/src/commands/doctor-heartbeat-session-target.test.ts @@ -1,3 +1,4 @@ +// Doctor heartbeat session-target tests cover heartbeat target checks and repair output. import fs from "node:fs"; import os from "node:os"; import path from "node:path"; diff --git a/src/commands/doctor-plugin-registry.test.ts b/src/commands/doctor-plugin-registry.test.ts index 75167e57267f..87b4b75d2401 100644 --- a/src/commands/doctor-plugin-registry.test.ts +++ b/src/commands/doctor-plugin-registry.test.ts @@ -1,3 +1,4 @@ +// Doctor plugin registry tests cover plugin registry checks and repair diagnostics. import fs from "node:fs"; import path from "node:path"; import { afterEach, describe, expect, it, vi } from "vitest"; diff --git a/src/commands/doctor-session-snapshots.test.ts b/src/commands/doctor-session-snapshots.test.ts index 159110c25a39..957db75fa235 100644 --- a/src/commands/doctor-session-snapshots.test.ts +++ b/src/commands/doctor-session-snapshots.test.ts @@ -1,3 +1,4 @@ +// Doctor session snapshot tests cover session snapshot validation and repair guidance. import fs from "node:fs/promises"; import os from "node:os"; import path from "node:path"; diff --git a/src/commands/doctor-session-transcripts.test.ts b/src/commands/doctor-session-transcripts.test.ts index 833fd727173e..fb983588c7e0 100644 --- a/src/commands/doctor-session-transcripts.test.ts +++ b/src/commands/doctor-session-transcripts.test.ts @@ -1,3 +1,4 @@ +// Doctor session transcript tests cover transcript inspection and repair guidance. import fs from "node:fs/promises"; import os from "node:os"; import path from "node:path"; diff --git a/src/commands/doctor-state-integrity.test.ts b/src/commands/doctor-state-integrity.test.ts index 61b783da73d0..90cbcc351a51 100644 --- a/src/commands/doctor-state-integrity.test.ts +++ b/src/commands/doctor-state-integrity.test.ts @@ -1,3 +1,4 @@ +// Doctor state integrity tests cover state directory checks, migration, and repair diagnostics. import fs from "node:fs"; import os from "node:os"; import path from "node:path"; diff --git a/src/commands/doctor-state-migrations.test.ts b/src/commands/doctor-state-migrations.test.ts index a568381c13ee..566ca60e726d 100644 --- a/src/commands/doctor-state-migrations.test.ts +++ b/src/commands/doctor-state-migrations.test.ts @@ -1,3 +1,4 @@ +// Doctor state migration tests cover legacy state moves, archive markers, and repair behavior. import fs from "node:fs"; import os from "node:os"; import path from "node:path"; diff --git a/src/commands/doctor-workspace-status.test.ts b/src/commands/doctor-workspace-status.test.ts index efc11e10dd4b..88ab026435af 100644 --- a/src/commands/doctor-workspace-status.test.ts +++ b/src/commands/doctor-workspace-status.test.ts @@ -1,3 +1,4 @@ +// Doctor workspace status tests cover workspace inspection and status output. import { describe, expect, it, vi } from "vitest"; import * as noteModule from "../../packages/terminal-core/src/note.js"; import { diff --git a/src/commands/doctor.warns-state-directory-is-missing.e2e.test.ts b/src/commands/doctor.warns-state-directory-is-missing.e2e.test.ts index 20a3548499ba..b7d1db92f457 100644 --- a/src/commands/doctor.warns-state-directory-is-missing.e2e.test.ts +++ b/src/commands/doctor.warns-state-directory-is-missing.e2e.test.ts @@ -1,3 +1,4 @@ +// Doctor missing-state e2e tests cover warning output when the state directory is absent. import fs from "node:fs"; import os from "node:os"; import path from "node:path"; diff --git a/src/commands/export-trajectory.test.ts b/src/commands/export-trajectory.test.ts index 4a96da4ff7d2..c3f5ccd86764 100644 --- a/src/commands/export-trajectory.test.ts +++ b/src/commands/export-trajectory.test.ts @@ -1,3 +1,4 @@ +// Export trajectory tests cover trajectory export command output and file selection. import { beforeEach, describe, expect, it, vi } from "vitest"; import type { RuntimeEnv } from "../runtime.js"; import { exportTrajectoryCommand } from "./export-trajectory.js"; diff --git a/src/commands/gateway-readiness.test.ts b/src/commands/gateway-readiness.test.ts index 0157ea45a71b..7d119a52d5ca 100644 --- a/src/commands/gateway-readiness.test.ts +++ b/src/commands/gateway-readiness.test.ts @@ -1,3 +1,4 @@ +// Gateway readiness tests cover readiness checks, status details, and failure messages. import { beforeEach, describe, expect, it, vi } from "vitest"; import type { DaemonStatus } from "../cli/daemon-cli/status.gather.js"; import { ensureGatewayReadyForOperation } from "./gateway-readiness.js"; diff --git a/src/commands/health.test.ts b/src/commands/health.test.ts index e438899fa777..1b7842ff3ae2 100644 --- a/src/commands/health.test.ts +++ b/src/commands/health.test.ts @@ -1,3 +1,4 @@ +// Health command tests cover gateway health probes, JSON output, and status formatting. import { beforeEach, describe, expect, it, vi } from "vitest"; import { stripAnsi } from "../../packages/terminal-core/src/ansi.js"; import { diff --git a/src/commands/models.auth.provider-resolution.test.ts b/src/commands/models.auth.provider-resolution.test.ts index a5c30542ca29..fadbc213d32d 100644 --- a/src/commands/models.auth.provider-resolution.test.ts +++ b/src/commands/models.auth.provider-resolution.test.ts @@ -1,3 +1,4 @@ +// Models auth provider-resolution tests cover provider auth status grouping and selection. import { describe, expect, it } from "vitest"; import type { ProviderPlugin } from "../plugins/types.js"; import { resolveRequestedLoginProviderOrThrow } from "./models/auth.js"; diff --git a/src/commands/node-daemon-install-helpers.test.ts b/src/commands/node-daemon-install-helpers.test.ts index 36c7ac282e5a..33e48fe0acaa 100644 --- a/src/commands/node-daemon-install-helpers.test.ts +++ b/src/commands/node-daemon-install-helpers.test.ts @@ -1,3 +1,4 @@ +// Node daemon install helper tests cover node daemon install plans and runtime warnings. import { afterEach, describe, expect, it, vi } from "vitest"; const mocks = vi.hoisted(() => ({ diff --git a/src/commands/onboard-auth.config-shared.test.ts b/src/commands/onboard-auth.config-shared.test.ts index 450be8cdaa0b..5f6e37e1eb16 100644 --- a/src/commands/onboard-auth.config-shared.test.ts +++ b/src/commands/onboard-auth.config-shared.test.ts @@ -1,3 +1,4 @@ +// Onboard auth shared-config tests cover provider config merges for auth setup. import { describe, expect, it } from "vitest"; import type { OpenClawConfig } from "../config/config.js"; import type { AgentModelEntryConfig } from "../config/types.agent-defaults.js"; diff --git a/src/commands/onboard-channels.post-write.test.ts b/src/commands/onboard-channels.post-write.test.ts index c3af0c8648c2..de17f49134d3 100644 --- a/src/commands/onboard-channels.post-write.test.ts +++ b/src/commands/onboard-channels.post-write.test.ts @@ -1,3 +1,4 @@ +// Onboard channel post-write tests cover plugin post-write hooks after channel setup. import { describe, expect, it, vi } from "vitest"; import type { OpenClawConfig } from "../config/config.js"; import { diff --git a/src/commands/onboard-helpers.test.ts b/src/commands/onboard-helpers.test.ts index 434315e051e6..a621f095fccf 100644 --- a/src/commands/onboard-helpers.test.ts +++ b/src/commands/onboard-helpers.test.ts @@ -1,3 +1,4 @@ +// Onboard helper tests cover workspace setup, control UI links, and gateway reachability probes. import * as fs from "node:fs"; import fsPromises from "node:fs/promises"; import os from "node:os"; diff --git a/src/commands/onboarding-plugin-install.test.ts b/src/commands/onboarding-plugin-install.test.ts index 7a10e8ef83e4..453eeb1c724f 100644 --- a/src/commands/onboarding-plugin-install.test.ts +++ b/src/commands/onboarding-plugin-install.test.ts @@ -1,3 +1,4 @@ +// Onboarding plugin install tests cover install sources, trust checks, and install records. import fs from "node:fs/promises"; import path from "node:path"; import { beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/src/commands/setup.test.ts b/src/commands/setup.test.ts index 10f6b16755bd..0da404bf8020 100644 --- a/src/commands/setup.test.ts +++ b/src/commands/setup.test.ts @@ -1,3 +1,4 @@ +// Setup command tests cover local setup initialization and next-step messaging. import fs from "node:fs/promises"; import path from "node:path"; import { withTempHome } from "openclaw/plugin-sdk/test-env"; diff --git a/src/commands/status.link-channel.test.ts b/src/commands/status.link-channel.test.ts index c1e7b2585f0e..ffb8d50e992f 100644 --- a/src/commands/status.link-channel.test.ts +++ b/src/commands/status.link-channel.test.ts @@ -1,3 +1,4 @@ +// Status link-channel tests cover channel link status summaries and redaction. import { describe, expect, it, vi } from "vitest"; import type { OpenClawConfig } from "../config/config.js";