Skip to content

Commit 1f9e47e

Browse files
committed
test(llm): preserve nested source text
1 parent 76152ee commit 1f9e47e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎src/llm/tool-result-redaction.test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { describe, expect, it } from "vitest";
66
import "./stream.js";
77

88
describe("tool result redaction via AI transport host", () => {
9-
it("redacts structured secret fields with the shared tool-payload contract", () => {
9+
it("redacts structured secret fields without reparsing source strings", () => {
1010
const text = extractToolResultText([
1111
{
1212
type: "json",
@@ -64,8 +64,8 @@ describe("tool result redaction via AI transport host", () => {
6464
expect(text).not.toContain("payment-credential-value-1234567890");
6565
expect(text).not.toContain("4111111111111111");
6666
expect(text).not.toContain('"cvc":123');
67-
expect(text).not.toContain("api-token-in-text-1234567890");
68-
expect(text).not.toContain("oauth-code-in-text-1234567890");
67+
expect(text).toContain("api-token-in-text-1234567890");
68+
expect(text).toContain("oauth-code-in-text-1234567890");
6969
expect(text).toContain('\\"safe\\":\\"ok\\"');
7070
expect(text).not.toContain("live-credential-value");
7171
expect(text).not.toContain("app-secret-value");

0 commit comments

Comments
 (0)