From dbff0f96d394234a41e8c85b3414625ad9835e81 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 10 Feb 2026 01:31:38 +0000 Subject: [PATCH] Assert static asset max-age cache policy in smoke Co-authored-by: Theo Browne --- apps/t3/scripts/smoke-test.mjs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/t3/scripts/smoke-test.mjs b/apps/t3/scripts/smoke-test.mjs index 25e3d20a2e..4936871003 100644 --- a/apps/t3/scripts/smoke-test.mjs +++ b/apps/t3/scripts/smoke-test.mjs @@ -195,6 +195,13 @@ async function main() { )}.`, ); } + if (!assetCacheControl.includes("max-age=31536000")) { + throw new Error( + `Smoke test failed: expected max-age=31536000 on built asset, got ${String( + assetResponse.headers.get("cache-control"), + )}.`, + ); + } const missingAssetUrl = new URL("/assets/missing-bundle.js", parsedAppUrl); const missingAsset = await fetch(missingAssetUrl); if (missingAsset.status !== 404) {