diff --git a/src/config/redact-snapshot.test.ts b/src/config/redact-snapshot.test.ts index c029345cf86..646dd01eac6 100644 --- a/src/config/redact-snapshot.test.ts +++ b/src/config/redact-snapshot.test.ts @@ -366,7 +366,9 @@ describe("redactConfigSnapshot", () => { }); const result = redactConfigSnapshot(snapshot, hints); const custom = result.config.custom as Record; + const resolved = result.resolved as Record>; expect(custom.mySecret).toBe(REDACTED_SENTINEL); + expect(resolved.custom.mySecret).toBe(REDACTED_SENTINEL); }); it("keeps regex fallback for extension keys not covered by uiHints", () => { @@ -653,7 +655,9 @@ describe("redactConfigSnapshot", () => { }); const result = redactConfigSnapshot(snapshot, hints); const gw = result.config.gateway as Record>; + const resolved = result.resolved as Record>>; expect(gw.auth.token).toBe("not-actually-secret-value"); + expect(resolved.gateway.auth.token).toBe("not-actually-secret-value"); }); it("does not redact paths absent from uiHints (schema is single source of truth)", () => { @@ -665,7 +669,9 @@ describe("redactConfigSnapshot", () => { }); const result = redactConfigSnapshot(snapshot, hints); const gw = result.config.gateway as Record>; + const resolved = result.resolved as Record>>; expect(gw.auth.password).toBe("not-in-hints-value"); + expect(resolved.gateway.auth.password).toBe("not-in-hints-value"); }); it("uses wildcard hints for array items", () => { diff --git a/src/config/redact-snapshot.ts b/src/config/redact-snapshot.ts index eaf6ed3ee97..02db6d13261 100644 --- a/src/config/redact-snapshot.ts +++ b/src/config/redact-snapshot.ts @@ -301,7 +301,7 @@ export function redactConfigSnapshot( const redactedRaw = snapshot.raw ? redactRawText(snapshot.raw, snapshot.config, uiHints) : null; const redactedParsed = snapshot.parsed ? redactObject(snapshot.parsed, uiHints) : snapshot.parsed; // Also redact the resolved config (contains values after ${ENV} substitution) - const redactedResolved = redactConfigObject(snapshot.resolved); + const redactedResolved = redactConfigObject(snapshot.resolved, uiHints); return { ...snapshot,