microsoft / microsoft/FluidFramework

validateConfigMapOverrides skips required checks for default minVersionForCollab

Open
#28,028 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
4.9k
Forks
586
Avg merge
1d 15h
Merged PRs (30d)
146

Description

Describe the bug

validateConfigMapOverrides() returns immediately when minVersionForCollab === defaultMinVersionForCollab. Consequently, it never consults ConfigValidationMap for any runtime option when the default is used—even when an enabled option requires a version newer than the current default.

This encourages feature-specific workarounds outside the validation map. A workaround that checks equality with defaultMinVersionForCollab is also incorrect over time: the default can advance, and such code would continue rejecting a feature after the default semantically satisfies its required version.

This was encountered while reviewing PR #27880, where inlineDetachedBlobsAsSummaryBlobs: true requires 2.115.0.

To Reproduce

Steps to reproduce the behavior:

  1. Add a ConfigValidationMap entry mapping an enabled option to a version newer than defaultMinVersionForCollab.
  2. Call validateConfigMapOverrides(defaultMinVersionForCollab, { option: true }, validationMap).
  3. Observe that validation returns without checking the entry.
Expected behavior

The shared validation mechanism should support map-driven semantic validation against the actual default version while preserving intentional backward-compatible exceptions for existing options. Feature implementations should not need bespoke default-version checks or duplicate their required version outside the validation map.

Logs

N/A

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search the TypeScript source for validateConfigMapOverrides, defaultMinVersionForCollab, and ConfigValidationMap, then read the surrounding validation logic and its existing tests or callers. Reproduce the described case with the default version and an enabled option requiring a newer version; done means map-driven validation runs while intentional backward-compatible exceptions remain intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.