diff --git a/server/src/__tests__/heartbeat-run-log.test.ts b/server/src/__tests__/heartbeat-run-log.test.ts index 18eb05b7354..524ea86bef6 100644 --- a/server/src/__tests__/heartbeat-run-log.test.ts +++ b/server/src/__tests__/heartbeat-run-log.test.ts @@ -2,26 +2,6 @@ import { describe, expect, it } from "vitest"; import { compactRunLogChunk } from "../services/heartbeat.js"; describe("compactRunLogChunk", () => { - it("redacts inline base64 image data from structured log chunks", () => { - const base64 = "A".repeat(4096); - const chunk = `{"type":"user","message":{"content":[{"type":"image","source":{"type":"base64","data":"${base64}"}}]}}\n`; - - const compacted = compactRunLogChunk(chunk); - - expect(compacted).not.toContain(base64); - expect(compacted).toContain("[omitted base64 image data: 4096 chars]"); - }); - - it("truncates oversized chunks after sanitizing them", () => { - const chunk = `${"x".repeat(90_000)}tail`; - - const compacted = compactRunLogChunk(chunk, 16_384); - - expect(compacted.length).toBeLessThan(chunk.length); - expect(compacted).toContain("[paperclip truncated run log chunk:"); - expect(compacted.endsWith("tail")).toBe(true); - }); - it("redacts Paperclip credential shapes before persisting run-log chunks", () => { const chunk = [ "Authorization: Bearer live-bearer-token-value",