LTRAC-873: fix(cli) - Derive Wrangler compatibility_date dynamically#3045
Merged
Conversation
The build pinned compatibility_date to 2025-09-15 while the deployment service stamps a current date at deploy time, so workers ran under newer Cloudflare runtime semantics than they were built against. Compute the date as current UTC date minus one month, matching the same offset the deployment service applies, so build and deploy semantics stay aligned. Refs LTRAC-873 Co-Authored-By: Claude <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 0a9b1af The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Bundle Size ReportComparing against baseline from No bundle size changes detected. |
chanceaclark
approved these changes
Jun 11, 2026
Contributor
Unlighthouse Performance Comparison — VercelComparing PR preview deployment Unlighthouse scores vs production Unlighthouse scores. Summary ScoreAggregate score across all categories as reported by Unlighthouse.
Category Scores
Core Web Vitals
|
Contributor
Author
|
Tested locally and build and deployment works as expected: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linear: LTRAC-873
What/Why?
The CLI pinned
compatibility_date: '2025-09-15'in the generatedwrangler.jsonc, while Ignition stamps a dynamic current date at deploy time (made dynamic deliberately in ignition#245 per Cloudflare guidance). The result: worker bundles were built against ~9-month-old Cloudflare runtime semantics but deployed under today's — compat-date-gated runtime changes could alter behavior the bundle was never built for.Per agreement with @chanceaclark, both sides now derive the date as current UTC date minus one month — recent enough to track Cloudflare runtime behavior, buffered enough to avoid brand-new date-gated changes. Since the CLI build always precedes the Ignition deploy, the bundle is never built against newer semantics than it runs under.
Companion Ignition PR applies the same offset on the deploy side: ignition#288. The compat flags, Durable Object classes, and migration tag remain manually synced by convention — this PR adds cross-referencing comments for them.
Refs LTRAC-873
Testing
getCompatibilityDate()cover the one-month offset and month-end normalization (pnpm exec vitest run src/cli/lib/wrangler-config.spec.ts).Migration
None — no public API changes. Generated
.bigcommerce/wrangler.jsoncwill show a rolling date instead of2025-09-15.