diff --git a/extensions/onepassword/src/secret-ref-resolver.test.ts b/extensions/onepassword/src/secret-ref-resolver.test.ts index d651f92926c9..c4d9a26276dd 100644 --- a/extensions/onepassword/src/secret-ref-resolver.test.ts +++ b/extensions/onepassword/src/secret-ref-resolver.test.ts @@ -256,8 +256,6 @@ describe("plugin manifest", () => { expect(integration?.maxOutputBytes).toBeGreaterThan( maxRefsPerRequest * worstCaseEscapedValueBytes, ); - expect(resolverSource).toContain("#!/usr/bin/env node"); - expect(resolverSource).toContain('from "execa"'); expect(packageJson.openclaw?.build?.staticAssets).toContainEqual({ source: "./onepassword-op-path.js", output: "onepassword-op-path.js", diff --git a/packages/gateway-protocol/src/schema/sessions-row.test.ts b/packages/gateway-protocol/src/schema/sessions-row.test.ts index 53cd896f87c6..c61415e70b9a 100644 --- a/packages/gateway-protocol/src/schema/sessions-row.test.ts +++ b/packages/gateway-protocol/src/schema/sessions-row.test.ts @@ -29,7 +29,6 @@ describe("SessionRowSchema", () => { activeLeafEntryId: "leaf-rendered", createdActor: { avatarUrl: "/api/users/profile-ada/avatar?v=7" }, archivedBy: { type: "human", id: "profile-bob", label: "Bob" }, - icon: "🦞", visibility: "suggest", sharingRole: "owner", restartRecoveryStatus: "tombstoned", diff --git a/src/agents/agent-model-discovery.internal.test.ts b/src/agents/agent-model-discovery.internal.test.ts deleted file mode 100644 index c2caee787665..000000000000 --- a/src/agents/agent-model-discovery.internal.test.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** Tests internal model discovery imports avoid public SDK facade coupling. */ -import { beforeAll, describe, expect, it } from "vitest"; - -let modelDiscovery: typeof import("./agent-model-discovery.js"); - -describe("agent-model-discovery internal runtime", () => { - beforeAll(async () => { - modelDiscovery = await import("./agent-model-discovery.js"); - }); - - it("loads without the public agent-sessions SDK facade", () => { - expect(typeof modelDiscovery.discoverAuthStorage).toBe("function"); - expect(typeof modelDiscovery.discoverModels).toBe("function"); - }); -}); diff --git a/src/agents/tools/sessions-tool.test.ts b/src/agents/tools/sessions-tool.test.ts index 1406b1d37cdc..9e72f6b0a4bd 100644 --- a/src/agents/tools/sessions-tool.test.ts +++ b/src/agents/tools/sessions-tool.test.ts @@ -8,7 +8,6 @@ import { } from "../../config/sessions/session-accessor.js"; import type { OpenClawConfig } from "../../config/types.openclaw.js"; import { isAgentSessionModelPatchOrigin } from "../../gateway/session-model-patch-origin.js"; -import { GATEWAY_OWNER_ONLY_CORE_TOOLS } from "../../security/dangerous-tools.js"; import { beginSessionWorkAdmission } from "../../sessions/session-lifecycle-admission.js"; import { withTestDir } from "../../test-helpers/temp-dir.js"; import { createAgentPatchedSessionModelRunGuard } from "../session-model-auto-revert.js"; @@ -25,10 +24,6 @@ import { type AgentToolGatewayRequest = Parameters[0]; describe("sessions tool", () => { - it("uses the core owner gate", () => { - expect(GATEWAY_OWNER_ONLY_CORE_TOOLS).toContain("sessions"); - }); - it("carries the persisted fixed-store owner for a bare patch key", async () => { const callGateway = vi.fn().mockResolvedValue({}); const tool = createSessionsTool({ diff --git a/src/cli/directory-cli.test.ts b/src/cli/directory-cli.test.ts index 11ae9b444c7e..b2bbd42a6c91 100644 --- a/src/cli/directory-cli.test.ts +++ b/src/cli/directory-cli.test.ts @@ -389,7 +389,6 @@ describe("registerDirectoryCli", () => { if (mode === "JSON") { const payload = JSON.parse(runtimeState.runtimeLogs.at(-1) ?? ""); expect(payload).toEqual({ error: error.message }); - expect(Object.keys(payload)).toEqual(["error"]); expect(runtimeState.defaultRuntime.error).not.toHaveBeenCalled(); } else { expect(runtimeErrors()).toEqual([error.message]); diff --git a/src/cli/program.nodes-basic.e2e.test.ts b/src/cli/program.nodes-basic.e2e.test.ts index 782fc92d4078..793db88f078e 100644 --- a/src/cli/program.nodes-basic.e2e.test.ts +++ b/src/cli/program.nodes-basic.e2e.test.ts @@ -434,7 +434,8 @@ describe("cli program (nodes basics)", () => { "S10 Ultra", "Detail", "device: Android", - "hw: samsung", + "hw:", + "samsung", "SM-X926B", "Status", "unpaired", diff --git a/src/cli/program.nodes-test-helpers.test.ts b/src/cli/program.nodes-test-helpers.test.ts deleted file mode 100644 index 84a859a736ba..000000000000 --- a/src/cli/program.nodes-test-helpers.test.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Program nodes test-helper tests cover node command fixture helpers. -import { describe, expect, it } from "vitest"; -import { IOS_NODE, createIosNodeListResponse } from "./program.nodes-test-helpers.js"; - -describe("program.nodes-test-helpers", () => { - it("builds a node.list response with iOS node fixture", () => { - const response = createIosNodeListResponse(1234); - expect(response).toEqual({ - ts: 1234, - nodes: [IOS_NODE], - }); - }); -}); diff --git a/src/cli/program/message/helpers.test.ts b/src/cli/program/message/helpers.test.ts index 60e2bf9f3be9..46276eb59483 100644 --- a/src/cli/program/message/helpers.test.ts +++ b/src/cli/program/message/helpers.test.ts @@ -530,27 +530,6 @@ describe("runMessageAction", () => { expect(exitMock).toHaveBeenCalledWith(1); }); - it("does not call exit(0) when the action throws", async () => { - messageCommandMock.mockRejectedValueOnce(new Error("boom")); - await runSendAction(); - - // exit should only be called once with code 1, never with 0 - expect(exitMock).toHaveBeenCalledOnce(); - expect(exitMock).not.toHaveBeenCalledWith(0); - }); - - it("does not call exit(0) if the error path returns", async () => { - messageCommandMock.mockRejectedValueOnce(new Error("boom")); - exitMock.mockClear().mockImplementation(() => undefined as never); - const runMessageAction = createRunMessageAction(); - await expect(runMessageAction("send", baseSendOptions)).resolves.toBeUndefined(); - - expect(errorMock).toHaveBeenCalledWith("boom"); - expect(exitMock).toHaveBeenCalledOnce(); - expect(exitMock).toHaveBeenCalledWith(1); - expect(exitMock).not.toHaveBeenCalledWith(0); - }); - it("passes action and maps account to accountId", async () => { const fakeCommand = { help: vi.fn() } as never; const { runMessageAction } = createMessageCliHelpers(fakeCommand, "discord"); diff --git a/src/cli/system-cli.test.ts b/src/cli/system-cli.test.ts index 92f7a6b3eb9d..6f08185d1859 100644 --- a/src/cli/system-cli.test.ts +++ b/src/cli/system-cli.test.ts @@ -135,7 +135,6 @@ describe("system-cli", () => { if (mode === "JSON") { const payload = JSON.parse(runtimeLogs.at(-1) ?? ""); expect(payload).toEqual({ error: error.message }); - expect(Object.keys(payload)).toEqual(["error"]); expect(runtimeErrors).toEqual([]); } else { expect(runtimeErrors).toEqual([error.message]); diff --git a/src/cli/webhooks-cli.test.ts b/src/cli/webhooks-cli.test.ts index 2196b543f380..49e610bef6f7 100644 --- a/src/cli/webhooks-cli.test.ts +++ b/src/cli/webhooks-cli.test.ts @@ -101,7 +101,6 @@ describe("webhooks cli", () => { expect(payload).toEqual({ error: expect.stringContaining("Gmail failed: Authorization: Bearer"), }); - expect(Object.keys(payload)).toEqual(["error"]); expect(mocks.defaultRuntime.error).not.toHaveBeenCalled(); } else { expect(runtimeErrors()).toEqual([ diff --git a/src/gateway/managed-image-actions.e2e.test.ts b/src/gateway/managed-image-actions.e2e.test.ts index e9551274e26a..512208d996ef 100644 --- a/src/gateway/managed-image-actions.e2e.test.ts +++ b/src/gateway/managed-image-actions.e2e.test.ts @@ -116,23 +116,6 @@ describe("managed image actions Gateway E2E", () => { expect(rootFull.headers.get("content-type")).toBe("image/png"); expect(Buffer.from(await rootFull.arrayBuffer())).toEqual(source); - const partial = await fetch(fullUrl, { headers: { Range: "bytes=3-10" } }); - expect(partial.status).toBe(206); - expect(partial.headers.get("content-range")).toBe(`bytes 3-10/${source.byteLength}`); - expect(Buffer.from(await partial.arrayBuffer())).toEqual(source.subarray(3, 11)); - - const head = await fetch(fullUrl, { method: "HEAD" }); - expect(head.status).toBe(200); - expect(head.headers.get("content-length")).toBe(String(source.byteLength)); - expect((await head.arrayBuffer()).byteLength).toBe(0); - - const unsatisfiable = await fetch(fullUrl, { - headers: { Range: `bytes=${source.byteLength}-` }, - }); - expect(unsatisfiable.status).toBe(416); - expect(unsatisfiable.headers.get("content-range")).toBe(`bytes */${source.byteLength}`); - expect((await unsatisfiable.arrayBuffer()).byteLength).toBe(0); - fullUrl.pathname = `/rosita${fullUrl.pathname}`; const full = await fetch(fullUrl); diff --git a/src/gateway/managed-image-attachments.test.ts b/src/gateway/managed-image-attachments.test.ts index 893e08c1d091..d8b5590fa504 100644 --- a/src/gateway/managed-image-attachments.test.ts +++ b/src/gateway/managed-image-attachments.test.ts @@ -383,12 +383,6 @@ async function requestManagedImage(params: { } } -describe("resolveManagedImageAttachmentLimits", () => { - it("keeps the existing public limit shape", () => { - expect(resolveManagedImageAttachmentLimits()).toEqual(DEFAULT_MANAGED_IMAGE_ATTACHMENT_LIMITS); - }); -}); - describe("handleManagedOutgoingImageHttpRequest", () => { let stateDir: string; diff --git a/src/shared/avatar-limits.test.ts b/src/shared/avatar-limits.test.ts deleted file mode 100644 index a95bb94fe6f5..000000000000 --- a/src/shared/avatar-limits.test.ts +++ /dev/null @@ -1,15 +0,0 @@ -// Avatar projection limits stay browser-safe and independent of persisted config validation. -import { describe, expect, it } from "vitest"; -import { AVATAR_MAX_DATA_URL_CHARS, isRenderableAvatarImageDataUrl } from "./avatar-limits.js"; - -describe("isRenderableAvatarImageDataUrl", () => { - it("accepts the exact encoded boundary and rejects larger or non-image data URLs", () => { - const prefix = "data:image/svg+xml;base64,"; - const exact = `${prefix}${"A".repeat(AVATAR_MAX_DATA_URL_CHARS - prefix.length)}`; - - expect(exact).toHaveLength(AVATAR_MAX_DATA_URL_CHARS); - expect(isRenderableAvatarImageDataUrl(exact)).toBe(true); - expect(isRenderableAvatarImageDataUrl(`${exact}A`)).toBe(false); - expect(isRenderableAvatarImageDataUrl("data:text/plain,avatar")).toBe(false); - }); -}); diff --git a/test/scripts/ci-workflow-guards.test.ts b/test/scripts/ci-workflow-guards.test.ts index 9b4f073f4780..0945db4c3cd5 100644 --- a/test/scripts/ci-workflow-guards.test.ts +++ b/test/scripts/ci-workflow-guards.test.ts @@ -1880,7 +1880,6 @@ NODE expect(workflow.concurrency["cancel-in-progress"]).toBe(false); expect(workflow.concurrency.group).toBe("native-app-locale-refresh"); expect(controlUiResolveBase.if).not.toContain("chore(ui): refresh control ui locales"); - expect(nativeResolveBase.if).not.toContain("chore(i18n): refresh native locales"); const controlResolveCondition = controlUiResolveBase.if.replace(/\s+/gu, " "); expect(controlResolveCondition).toBe( "github.repository == 'openclaw/openclaw' && (github.event_name != 'workflow_dispatch' || github.ref == 'refs/heads/main')",