From 52ca4569aedc026b05de521ff652378db18fb774 Mon Sep 17 00:00:00 2001 From: Dotta <34892728+cryppadotta@users.noreply.github.com> Date: Tue, 24 Nov 2026 07:22:17 +0000 Subject: [PATCH] refactor(test): remove vacuous self-comparison assertions A test-audit pass found three assertions that compare a single evaluation to itself. Each one sits next to a stronger retained assertion that already protects the same contract, so the duplicate lines add no failure detection: - mcp-tasks: the task-ID index binding to company and connection is proven by the different-connection inequality assertion. - prepared-statements: per-client, per-shape memoization is proven by identity plus the recorded prepare-call sequence. - runner-image-identity: same-tree digest stability is proven by rebuilding the tree and comparing digests. No production code changes. --- server/src/__tests__/mcp-tasks.test.ts | 1 - server/src/__tests__/prepared-statements.test.ts | 1 - server/src/__tests__/runner-image-identity.test.ts | 1 - 3 files changed, 3 deletions(-) diff --git a/server/src/__tests__/mcp-tasks.test.ts b/server/src/__tests__/mcp-tasks.test.ts index 2abddab643a..2814449672a 100644 --- a/server/src/__tests__/mcp-tasks.test.ts +++ b/server/src/__tests__/mcp-tasks.test.ts @@ -104,7 +104,6 @@ describe("MCP Tasks protocol", () => { expect(openMcpTaskId("secret", scope, sealed)).toBe("task-123"); expect(openMcpTaskId("secret", { ...scope, companyId: "c2" }, sealed)).toBeNull(); expect(openMcpTaskId("other", scope, sealed)).toBeNull(); - expect(mcpTaskIdIndex("secret", scope, "task-123")).toBe(mcpTaskIdIndex("secret", scope, "task-123")); expect(mcpTaskIdIndex("secret", { ...scope, connectionId: "k2" }, "task-123")).not.toBe(mcpTaskIdIndex("secret", scope, "task-123")); }); }); diff --git a/server/src/__tests__/prepared-statements.test.ts b/server/src/__tests__/prepared-statements.test.ts index 4555b10e1dc..21b2450486d 100644 --- a/server/src/__tests__/prepared-statements.test.ts +++ b/server/src/__tests__/prepared-statements.test.ts @@ -12,7 +12,6 @@ describe("prepared statements", () => { const first = statements(root, "first"); expect(statements(root, "first")).toBe(first); expect(statements(root, "after")).not.toBe(first); - expect(statements(root, "after")).toBe(statements(root, "after")); expect(statements(transaction, "first")).toEqual({ db: transaction, shape: "first" }); expect(statements(transaction, "first")).not.toBe(first); expect(prepare.mock.calls).toEqual([[root, "first"], [root, "after"], [transaction, "first"]]); diff --git a/server/src/__tests__/runner-image-identity.test.ts b/server/src/__tests__/runner-image-identity.test.ts index 18e73885d62..22ec5b4dc94 100644 --- a/server/src/__tests__/runner-image-identity.test.ts +++ b/server/src/__tests__/runner-image-identity.test.ts @@ -69,7 +69,6 @@ describe("Runner image identity", () => { it("is the same for the same tree", () => { const root = repository(); - expect(digestOf(root)).toBe(digestOf(root)); expect(digestOf(repository())).toBe(digestOf(root)); });