Skip to content

runtime: Add "retired" features implementation for Document Schema#27288

Open
scottn12 wants to merge 1 commit into
microsoft:mainfrom
scottn12:retiredDocumentSchemaFeatures
Open

runtime: Add "retired" features implementation for Document Schema#27288
scottn12 wants to merge 1 commit into
microsoft:mainfrom
scottn12:retiredDocumentSchemaFeatures

Conversation

@scottn12
Copy link
Copy Markdown
Contributor

@scottn12 scottn12 commented May 12, 2026

Description

Adds a "retired" feature mechanism to Document Schema. A retired feature is one that was previously toggleable via IDocumentSchemaFeatures but 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 checkRuntimeCompatibility
would fail the session on an "unknown" runtime property). At the same time, we no longer want
that feature to be part of the public IDocumentSchemaFeatures surface, because callers can
no longer influence it.

Retired features are tracked in a separate retiredDocumentSchemaFeatures map. Each entry
bundles 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 features
argument. A compile-time satisfies constraint ensures a key cannot appear in both
IDocumentSchemaFeatures and retiredDocumentSchemaFeatures.

Note: No features are retired yet. This PR just sets up the infrastructure for when features are retired in the future.

Misc

AB#72041

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

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:

  • Correctness — logic errors, race conditions, lifecycle issues
  • Security — vulnerabilities, secret exposure, injection
  • API Compatibility — breaking changes, release tags, type design
  • Performance — algorithmic regressions, memory leaks
  • Testing — coverage gaps, hollow tests

How this works

  • Adjust the reviewer set by ticking/unticking boxes above. Reviewer toggles alone don't trigger anything.

  • Tick Start review below to dispatch the review fleet.

  • After review finishes, tick Start review again to request another run — it auto-resets after each dispatch.

  • This comment updates as new commits land; your reviewer selections are preserved.

  • Start review

@scottn12 scottn12 marked this pull request as ready for review May 15, 2026 17:27
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 15, 2026

Fleet Review — Clean

No issues found across the reviewer fleet for this run.

View run

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 retiredDocumentSchemaFeatures map (currently empty) with a compile-time satisfies guard ensuring keys cannot overlap with IDocumentSchemaFeatures.
  • Adds getRuntimeConfigHandler to resolve a property handler from either supported or retired configs, used in checkRuntimeCompatibility, and, and or.
  • Adds retiredFeatureValues helper, spread into the runtime portion of the desired schema in DocumentsSchemaController.

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.

2 participants