Skip to content

Remove experimental gate from snapshots API#6464

Merged
gpanders merged 1 commit intomainfrom
ganders/ylpxqtksvurn
Mar 31, 2026
Merged

Remove experimental gate from snapshots API#6464
gpanders merged 1 commit intomainfrom
ganders/ylpxqtksvurn

Conversation

@gpanders
Copy link
Copy Markdown
Member

Remove the experimental gate from the snapshots API so that it's ready to use by external users before Agents week.

cc @mikenomitch

@gpanders gpanders requested review from a team as code owners March 31, 2026 14:39
@gpanders gpanders requested a review from jamesopstad March 31, 2026 14:39
@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk bot commented Mar 31, 2026

The flags variable is still used for hardTimeout and req.setCompatibilityFlags(flags) so it's still needed. Good.

Now let me verify the overall picture is clean. The changes are:

  1. C++ (container.c++): Removed the getWorkerdExperimental() gate around directorySnapshots and containerSnapshot handling in start(). The code is otherwise identical, just de-indented.

  2. C++ (container.h):

    • Removed JSG_STRUCT_TS_OVERRIDE_DYNAMIC from DirectorySnapshot, DirectorySnapshotOptions, DirectorySnapshotRestoreParams, Snapshot, and SnapshotOptions structs (these were setting them to never when not experimental).
    • Updated StartupOptions TS override to show real types instead of never for directorySnapshots and containerSnapshot.
    • Moved snapshotDirectory and snapshotContainer out of the if (flags.getWorkerdExperimental()) block in JSG_RESOURCE_TYPE.
  3. Types: Generated type snapshots updated to reflect the above (snapshot types now appear in latest/, method order adjusted in experimental/).

This all looks correct and straightforward. The change is self-consistent: the snapshot API methods and types are un-gated from experimental, while interceptOutboundHttps and hardTimeout remain experimental-only.

One thing I notice: this is a behavioral change (new API surface for non-experimental users), but since this is removing an experimental gate (making previously-experimental-only features generally available), it doesn't need a compat flag. Experimental features are explicitly not covered by backward compatibility guarantees.

LGTM

github run

@gpanders gpanders merged commit ad4693a into main Mar 31, 2026
29 of 30 checks passed
@gpanders gpanders deleted the ganders/ylpxqtksvurn branch March 31, 2026 21:57
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.

4 participants