microsoft / microsoft/FluidFramework
validateConfigMapOverrides skips required checks for default minVersionForCollab
Nobody has claimed this yet.
- 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:
- Add a
ConfigValidationMapentry mapping an enabled option to a version newer thandefaultMinVersionForCollab. - Call
validateConfigMapOverrides(defaultMinVersionForCollab, { option: true }, validationMap). - 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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