From c36b450e9373cf67f87ff45545117f4f249d7a86 Mon Sep 17 00:00:00 2001 From: Brendan Kellam Date: Wed, 17 Jun 2026 17:43:54 -0700 Subject: [PATCH 1/2] fix(web): enable Next.js version skew protection during rolling deploys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Set `deploymentId` from the commit sha already baked in at build time (NEXT_PUBLIC_BUILD_COMMIT_SHA). Next.js stamps static asset URLs with ?dpl= and, on a deployment-id mismatch during navigation, does a full reload instead of fetching chunks from a build that's no longer serving — fixing the "Failed to load chunk" error users hit while the pod is updating. Co-Authored-By: Claude Opus 4.8 (1M context) --- packages/web/next.config.mjs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/web/next.config.mjs b/packages/web/next.config.mjs index c34c126d0..48e01b40c 100644 --- a/packages/web/next.config.mjs +++ b/packages/web/next.config.mjs @@ -5,6 +5,10 @@ import { withSentryConfig } from "@sentry/nextjs"; const nextConfig = { output: "standalone", + // Version skew protection for rolling deploys. + // @see: https://nextjs.org/docs/app/guides/self-hosting#version-skew + deploymentId: process.env.NEXT_PUBLIC_BUILD_COMMIT_SHA, + // This is required when using standalone builds. // @see: https://env.t3.gg/docs/nextjs#create-your-schema transpilePackages: ["@t3-oss/env-core"], From 6f24c6bb1e2e74e23fcfe6981171121503667d7c Mon Sep 17 00:00:00 2001 From: Brendan Kellam Date: Wed, 17 Jun 2026 17:44:28 -0700 Subject: [PATCH 2/2] docs: add CHANGELOG entry for version skew protection Co-Authored-By: Claude Opus 4.8 (1M context) --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ebefec2dc..c2dd6795c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Upgraded `protobufjs` to `^7.6.4`. [#1336](https://github.com/sourcebot-dev/sourcebot/pull/1336) - Upgraded `tar` to `^7.5.16`. [#1338](https://github.com/sourcebot-dev/sourcebot/pull/1338) - Upgraded `esbuild` to `^0.28.1`. [#1342](https://github.com/sourcebot-dev/sourcebot/pull/1342) +- Enabled Next.js version skew protection to fix "Failed to load chunk" errors during rolling deploys. [#1346](https://github.com/sourcebot-dev/sourcebot/pull/1346) ## [5.0.3] - 2026-06-17