From 791859385778f854c92c2c6ea90e810a5b3b265b Mon Sep 17 00:00:00 2001 From: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> Date: Thu, 10 Sep 2026 11:47:45 -0300 Subject: [PATCH] fix(tests): align model-sync log assertion to shipped path redaction (base-red) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tests/unit/model-sync-route.test.ts expected the persisted call-log error to be 'Invalid JSON response from /models', but the call-log write now runs the error through sanitizeErrorForLog -> errorPathRedaction, which redacts the path to for stored logs (defense in depth for exported call logs). The live API response to the caller is unchanged (body.error still /models); only the persisted logs[0].error is redacted. Align the log assertion to the shipped behavior; body.error assertion stays /models. No production change — test alignment to an already-merged redaction. Refs base-red #12732. --- tests/unit/model-sync-route.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/model-sync-route.test.ts b/tests/unit/model-sync-route.test.ts index d4a14456164..163b38cc459 100644 --- a/tests/unit/model-sync-route.test.ts +++ b/tests/unit/model-sync-route.test.ts @@ -302,7 +302,7 @@ test("model sync route reports invalid JSON /models responses without losing ups assert.equal(body.upstreamStatus, 200); assert.equal(logs.length, 1); assert.equal(logs[0].status, 200); - assert.equal(logs[0].error, "Invalid JSON response from /models"); + assert.equal(logs[0].error, "Invalid JSON response from "); }); test("model sync route preserves previously synced models when the upstream omits the models list", async () => {