Skip to content

CACHE-13504: remove gate from request cf#6630

Merged
tewaro merged 1 commit intomainfrom
yawar/rm-exp-gate
Apr 22, 2026
Merged

CACHE-13504: remove gate from request cf#6630
tewaro merged 1 commit intomainfrom
yawar/rm-exp-gate

Conversation

@tewaro
Copy link
Copy Markdown
Contributor

@tewaro tewaro commented Apr 21, 2026

Supersedes #6623

@tewaro tewaro requested review from a team as code owners April 21, 2026 20:15
@tewaro tewaro enabled auto-merge April 21, 2026 20:18
Copy link
Copy Markdown
Contributor

@ask-bonk ask-bonk Bot left a comment

Choose a reason for hiding this comment

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

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

This PR removes the workerdExperimental gate from the cf.cacheControl feature, making cacheControl synthesis, mutual-exclusion validation, and cf-blob dual-writes unconditional for all workers.

Issues (ranked by severity)

  1. [High] Ungated backward-incompatible change -- new TypeError for previously-accepted inputs. The RequestInitializerDict::validate changes introduce TypeError throws for workers that pass cf.cacheControl together with cf.cacheTtl or the cache request option. Previously (without the --experimental flag), these combinations were silently accepted. Any existing worker that happens to set cf.cacheControl alongside cf.cacheTtl will now break at Request construction time. Per the project's own workerdExperimental documentation in compatibility-date.capnp (lines 266-269): "Don't use this for backwards-incompatible changes; give them their own flag." And per AGENTS.md: "Strong backwards compatibility commitment -- features cannot be removed or changed once deployed." This validation should be gated behind a dedicated compat flag (e.g., cf_cache_control_validation) with a future enable date, rather than being unconditionally enabled.

  2. [Medium] Ungated wire-format change -- new cacheControl field in serialized cf blob for all workers. Removing the gate means every worker using cacheTtl or the cache request option now gets an additional cacheControl field in the serialized cf JSON blob (the dual-write path). While the old fields are preserved, this changes the downstream wire format for existing workers that never opted into this behavior. If downstream infrastructure is already consuming cacheControl (as suggested by the superseded PR requiring a specific pingora-origin version), unconditionally enabling this for all workers without a staged rollout via compat flag could cause issues for workers on older infrastructure versions.

Both of these changes warrant their own compat flag per the project's conventions. The workerdExperimental flag was the correct development-time gate, but the path from experimental to GA should go through a dedicated compat flag, not straight to unconditional.

Comment thread src/workerd/api/http.c++
Comment thread src/workerd/api/http.c++
@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented Apr 21, 2026

Review posted successfully on PR #6630. Here's a summary of my findings:

Two issues flagged:

  1. [High] Ungated backward-incompatible change: The RequestInitializerDict::validate changes now throw TypeError for input combinations (cf.cacheControl + cf.cacheTtl, or cf.cacheControl + cache option) that previously succeeded silently. This violates the project's own backward compatibility guidelines and the workerdExperimental documentation which explicitly says "Don't use this for backwards-incompatible changes; give them their own flag."

  2. [Medium] Ungated wire-format change: Every worker using cacheTtl or the cache request option now gets an additional cacheControl field in the serialized cf JSON blob. While the old fields are preserved (dual-write), this changes downstream behavior for all existing workers without a staged rollout.

Both changes should go through a dedicated compat flag rather than being unconditionally enabled.

github run

@tewaro tewaro force-pushed the yawar/rm-exp-gate branch from 27f8751 to e726fe2 Compare April 22, 2026 20:26
@tewaro tewaro merged commit 4495fba into main Apr 22, 2026
22 of 23 checks passed
@tewaro tewaro deleted the yawar/rm-exp-gate branch April 22, 2026 21:14
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.

3 participants