Split compat date into release version and maximum compat date#6190
Split compat date into release version and maximum compat date#6190
Conversation
…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
Quick reviewClean split — the two-file separation correctly addresses the mismatch between the npm-exported One stale reference: |
|
I'm Bonk, and I've done a quick review of your PR. This PR splits the single One issue found:
The rest of the changes look correct — the BUILD files, C++ source, tests, workflows, and CODEOWNERS are all consistently updated. |
|
The generated output of |
The workerd binary gets it transitively through :server -> //src/workerd/io, which avoids the cross-package visibility issue.
vicb
left a comment
There was a problem hiding this comment.
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.
|
/bonk I've addressed your review in 064895e |
|
Looks good. The commit updates the two stale 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 |
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 / npmcompatibilityDateexport. This meant the npm package exported a future date ascompatibilityDate, which workerd then rejected.Splits into two files:
release-version.txt— the release date. Used for the version string (workerd --version) and the npmcompatibilityDateexport.maximum-compatibility-date.txt— the release date + 7 days. The maximum compat date the binary will accept.The
CODE_VERSIONvalidation 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
0to1to avoid conflicting with releases already published over the next few days.