Skip to content

Make precedence source ordered - #623

Merged
linglingye001 merged 4 commits into
mainfrom
linglingye/precedence-source-ordered
Sep 22, 2026
Merged

linglingye001 merged 4 commits into
mainfrom
linglingye/precedence-source-ordered

Conversation

@linglingye001

@linglingye001 linglingye001 commented Sep 10, 2026

Copy link
Copy Markdown
Member

Why this PR?

Fix #621

ConfigurationFeatureDefinitionProvider always evaluates the Microsoft schema first, source order is never consulted when the same flag is split across schemas. A Microsoft-schema definition from the first provider beats a .NET-schema definition from every later provider.

Visible Changes

  • Lookup visits sources from highest to lowest precedence, checking Microsoft schema before .NET within each source.
  • Custom merging now selects the whole definition from one source for both schemas.
  • Preserved default behavior, case handling, deduplication, chaining, and root fallback.
  • Deduplicates cross-schema entries during feature enumeration.

Example

When custom merging is enabled:

Provider` 1: Microsoft schema → MyFlag = false
Provider 2: .NET schema → MyFlag = targeting filter

Winning schema map:
MyFlag → .NET

Result: Provider 2 wins and the targeting filter is parsed.

@linglingye001
linglingye001 merged commit 0c8a327 into main Sep 22, 2026
5 checks passed
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.

Microsoft-schema flag in appsettings.json silently shadows the same flag from Azure App Configuration (.NET schema)

2 participants