Skip to content

Split compat date into release version and maximum compat date#6190

Merged
penalosa merged 6 commits intomainfrom
penalosa/fix-compat-date-version
Feb 26, 2026
Merged

Split compat date into release version and maximum compat date#6190
penalosa merged 6 commits intomainfrom
penalosa/fix-compat-date-version

Conversation

@penalosa
Copy link
Contributor

@penalosa penalosa commented Feb 26, 2026

Fixes #6188

The daily release was writing a date 7 days into the future to supported-compatibility-date.txt, which was used for both the binary's maximum accepted compat date and the version string / npm compatibilityDate export. This meant the npm package exported a future date as compatibilityDate, which workerd then rejected.

Splits into two files:

  • release-version.txt — the release date. Used for the version string (workerd --version) and the npm compatibilityDate export.
  • maximum-compatibility-date.txt — the release date + 7 days. The maximum compat date the binary will accept.

The CODE_VERSION validation checks both the binary limit (MAXIMUM_COMPATIBILITY_DATE) and the clock time, preserving the original behaviour of rejecting future compat dates.

Also bumps the default npm patch version from 0 to 1 to avoid conflicting with releases already published over the next few days.

…aximum-compatibility-date.txt

The daily release was writing a date 7 days into the future to
supported-compatibility-date.txt, which was used for both the binary's
maximum accepted compat date AND the version string / npm
compatibilityDate export. This meant the npm package exported a future
date as compatibilityDate, which workerd then rejected.

Split into two files:
- release-version.txt: today's date, used for version string + npm export
- maximum-compatibility-date.txt: today + 7 days, the binary's hard limit

The CODE_VERSION validation checks both the binary limit and the clock
time, preserving the original behaviour of rejecting future compat dates.

Fixes #6188
@penalosa penalosa requested review from a team as code owners February 26, 2026 16:29
@ask-bonk
Copy link
Contributor

ask-bonk bot commented Feb 26, 2026

Quick review

Clean split — the two-file separation correctly addresses the mismatch between the npm-exported compatibilityDate and the binary's maximum accepted compat date.

One stale reference: RELEASE.md (lines 7 and 11) still links to supported-compatibility-date.txt, which no longer exists after this PR. Consider updating those references to point to release-version.txt and adjusting the wording accordingly.

@ask-bonk
Copy link
Contributor

ask-bonk bot commented Feb 26, 2026

I'm Bonk, and I've done a quick review of your PR.

This PR splits the single supported-compatibility-date.txt into two files — release-version.txt (for version strings and npm exports) and maximum-compatibility-date.txt (release date + 7 days, for the binary's compat date ceiling) — fixing the bug where the npm package exported a future date that workerd then rejected.

One issue found:

  1. Stale documentation reference (low severity): RELEASE.md lines 7 and 11 still link to supported-compatibility-date.txt, which this PR removes. These become broken links. I posted a comment on the PR with suggested replacement text since the file isn't in the diff.

The rest of the changes look correct — the BUILD files, C++ source, tests, workflows, and CODEOWNERS are all consistently updated.

github run

@github-actions
Copy link

github-actions bot commented Feb 26, 2026

The generated output of @cloudflare/workers-types matches the snapshot in types/generated-snapshot 🎉

Copy link
Contributor

@vicb vicb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look almost good to me :)

I would clarify the release version vs the date.

Was bonk comment addressed too?

I'll let other more familiar with the code base approve.

@penalosa
Copy link
Contributor Author

/bonk I've addressed your review in 064895e

@ask-bonk
Copy link
Contributor

ask-bonk bot commented Feb 26, 2026

Looks good. The commit updates the two stale RELEASE.md references from supported-compatibility-date.txt to release-version.txt and adjusts the surrounding wording to drop "compatibility date" in favor of just "date" — which is accurate since the file now holds the release date, not the maximum compat date.

This addresses the documentation issue I flagged in my earlier review. The wording is also slightly improved: line 7 no longer says "compatibility date" (which could be confused with the binary's max compat date), and line 11 matches.

One note for @vicb's open question about renaming to release-date.txt: that wasn't addressed in this commit, but it seems like @penalosa's reasoning (this is also the workerd --version output, so "version" is appropriate) is sound. The file serves double duty as the version identifier, not just a date.

github run

@penalosa penalosa merged commit 586925d into main Feb 26, 2026
52 of 53 checks passed
@penalosa penalosa deleted the penalosa/fix-compat-date-version branch February 26, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

breaking: provided compatibilityDate is in the future

3 participants