runtime: Add "retired" features implementation for Document Schema#27288
runtime: Add "retired" features implementation for Document Schema#27288scottn12 wants to merge 1 commit into
Conversation
|
Hi! Thank you for opening this PR. Want me to review it? Based on the diff (56 lines, 1 files), I've queued these reviewers:
How this works
|
Fleet Review — CleanNo issues found across the reviewer fleet for this run. |
There was a problem hiding this comment.
Pull request overview
Adds infrastructure to support "retired" Document Schema features — features previously toggleable via IDocumentSchemaFeatures but now hardcoded by the runtime. Persisted documents may still carry these keys, so they must remain recognized during compatibility checks and merging, even though they're no longer part of the public surface. No features are retired yet; this PR only sets up the mechanism.
Changes:
- Introduces
retiredDocumentSchemaFeaturesmap (currently empty) with a compile-timesatisfiesguard ensuring keys cannot overlap withIDocumentSchemaFeatures. - Adds
getRuntimeConfigHandlerto resolve a property handler from either supported or retired configs, used incheckRuntimeCompatibility,and, andor. - Adds
retiredFeatureValueshelper, spread into the runtime portion of the desired schema inDocumentsSchemaController.
Description
Adds a "retired" feature mechanism to Document Schema. A retired feature is one that was previously toggleable via
IDocumentSchemaFeaturesbut is now hardcoded to a single value by the runtime.Why we need this: existing documents may still carry a retired feature's key in their persisted
schema, so Document Schema must continue to recognize it (otherwise
checkRuntimeCompatibilitywould fail the session on an "unknown" runtime property). At the same time, we no longer want
that feature to be part of the public
IDocumentSchemaFeaturessurface, because callers canno longer influence it.
Retired features are tracked in a separate
retiredDocumentSchemaFeaturesmap. Each entrybundles the property handler with the runtime's hardcoded value. They participate in the
normal validate / merge / schema-change-op flow exactly like non-retired features — the only
difference is that the value comes from the map instead of from the constructor's
featuresargument. A compile-time
satisfiesconstraint ensures a key cannot appear in bothIDocumentSchemaFeaturesandretiredDocumentSchemaFeatures.Note: No features are retired yet. This PR just sets up the infrastructure for when features are retired in the future.
Misc
AB#72041