From 15917ad524432b8984fbd89789f4bac4ccb51613 Mon Sep 17 00:00:00 2001 From: ci-check Date: Fri, 20 Nov 2026 14:56:56 +0800 Subject: [PATCH] fix: clarify preflight fail-fast NOT-forwarded message is per-request (#7344) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ⚠️ MODEL-FACING TEXT CHANGE: the preflight fail-fast error message now says "This request's over-window payload was NOT forwarded to the upstream." instead of "The over-window payload was NOT forwarded." The old wording ("The over-window payload") reads as a global statement, which is misleading when a concurrent request (different session, or a client retry) forwards its own over-window payload via a forward-once arm (probeForEvidence #2313 / imageArbitration #496/#1800 / post-fold #3146/#4185). The new wording makes it clear that the NOT-forwarded guarantee is scoped to THIS specific request, not to all in-flight traffic on the session or the proxy. The upstream 400 log (relay.ts ← upstream) already carries the session id, so operators can now correlate the two lines and see they are different requests rather than a contradiction. Closes #7344 --- src/server.ts | 2 +- tests/issue1993-preflight-400.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server.ts b/src/server.ts index 3fb954b5ff..82cf750c8a 100644 --- a/src/server.ts +++ b/src/server.ts @@ -4219,7 +4219,7 @@ export async function preflightCompressIfNeeded( `and preflight compression could not bring it under: ${detail.replace(/\.\s*$/, "")}.` + imageNote + shrinkNote + - ` The over-window payload was NOT forwarded.`; + ` This request's over-window payload was NOT forwarded to the upstream.`; log("error", `[${session.id}] preflight fail-fast ${status} (retryable=${retryable}): ${message}`); return { failFast: true, status, message, retryable, respond: !res.writableEnded }; }; diff --git a/tests/issue1993-preflight-400.test.ts b/tests/issue1993-preflight-400.test.ts index 2a65e46dd2..1b337dbe43 100644 --- a/tests/issue1993-preflight-400.test.ts +++ b/tests/issue1993-preflight-400.test.ts @@ -202,7 +202,7 @@ test("#1993 systemic hard 400: body surfaced in log+message, bounded halving cas assert.ok( j2.error?.message?.includes("rejected by the upstream (HTTP 400)") && j2.error?.message?.includes("request too large: 523200 tokens exceeds the 128000 input limit") - && j2.error?.message?.includes("The over-window payload was NOT forwarded."), + && j2.error?.message?.includes("This request's over-window payload was NOT forwarded to the upstream."), `regenerated diagnosis must carry the same rejection core, got: ${j2.error?.message}`, ); const retrySummaries = calls.slice(callsBeforeRetry).filter((c) => c.summary);