From 2ba14edf366a66f1a3fb360c8012b1a9604a3a92 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 10 Feb 2026 03:35:12 +0000 Subject: [PATCH] Assert Last-Modified stability on conditional responses Co-authored-by: Theo Browne --- apps/t3/scripts/smoke-test.mjs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/apps/t3/scripts/smoke-test.mjs b/apps/t3/scripts/smoke-test.mjs index 5635b240ae..2a8f217e20 100644 --- a/apps/t3/scripts/smoke-test.mjs +++ b/apps/t3/scripts/smoke-test.mjs @@ -292,6 +292,13 @@ async function main() { if ((conditionalAsset.headers.get("vary") ?? "").toLowerCase() !== "range") { throw new Error("Smoke test failed: expected vary=range on conditional asset response."); } + if (conditionalAsset.headers.get("last-modified") !== assetLastModified) { + throw new Error( + `Smoke test failed: expected conditional asset last-modified ${assetLastModified}, got ${String( + conditionalAsset.headers.get("last-modified"), + )}.`, + ); + } const conditionalAssetContentLength = conditionalAsset.headers.get("content-length"); if (conditionalAssetContentLength !== null && conditionalAssetContentLength !== "0") { throw new Error( @@ -373,6 +380,13 @@ async function main() { if ((conditionalHeadAsset.headers.get("vary") ?? "").toLowerCase() !== "range") { throw new Error("Smoke test failed: expected vary=range on conditional HEAD asset response."); } + if (conditionalHeadAsset.headers.get("last-modified") !== assetLastModified) { + throw new Error( + `Smoke test failed: expected conditional HEAD asset last-modified ${assetLastModified}, got ${String( + conditionalHeadAsset.headers.get("last-modified"), + )}.`, + ); + } const conditionalHeadAssetContentLength = conditionalHeadAsset.headers.get("content-length"); if ( conditionalHeadAssetContentLength !== null &&