From ff1189c6d68b6ace1f3cd6ea45b5abbf3a727dee Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 19 Feb 2026 07:41:38 +0000 Subject: [PATCH] test: remove duplicate inbound-meta coverage from reply-flow --- src/auto-reply/reply/reply-flow.test.ts | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/src/auto-reply/reply/reply-flow.test.ts b/src/auto-reply/reply/reply-flow.test.ts index 6df2037ae2..9883d3da05 100644 --- a/src/auto-reply/reply/reply-flow.test.ts +++ b/src/auto-reply/reply/reply-flow.test.ts @@ -2,10 +2,9 @@ import { afterAll, beforeAll, describe, expect, it, vi } from "vitest"; import { expectInboundContextContract } from "../../../test/helpers/inbound-contract.js"; import type { OpenClawConfig } from "../../config/config.js"; import { defaultRuntime } from "../../runtime.js"; -import type { MsgContext, TemplateContext } from "../templating.js"; +import type { MsgContext } from "../templating.js"; import { HEARTBEAT_TOKEN, SILENT_REPLY_TOKEN } from "../tokens.js"; import { finalizeInboundContext } from "./inbound-context.js"; -import { buildInboundUserContextPrefix } from "./inbound-meta.js"; import { normalizeInboundTextNewlines } from "./inbound-text.js"; import { parseLineDirectives, hasLineDirectives } from "./line-directives.js"; import type { FollowupRun, QueueSettings } from "./queue.js"; @@ -13,27 +12,6 @@ import { enqueueFollowupRun, scheduleFollowupDrain } from "./queue.js"; import { createReplyDispatcher } from "./reply-dispatcher.js"; import { createReplyToModeFilter, resolveReplyToMode } from "./reply-threading.js"; -describe("buildInboundUserContextPrefix", () => { - it("omits conversation label block for direct chats", () => { - const text = buildInboundUserContextPrefix({ - ChatType: "direct", - ConversationLabel: "openclaw-tui", - } as TemplateContext); - - expect(text).toBe(""); - }); - - it("keeps conversation label for group chats", () => { - const text = buildInboundUserContextPrefix({ - ChatType: "group", - ConversationLabel: "ops-room", - } as TemplateContext); - - expect(text).toContain("Conversation info (untrusted metadata):"); - expect(text).toContain('"conversation_label": "ops-room"'); - }); -}); - describe("normalizeInboundTextNewlines", () => { it("converts CRLF to LF", () => { expect(normalizeInboundTextNewlines("hello\r\nworld")).toBe("hello\nworld");