[Fusion] Add pre-merge validation rule "SpecifiedByUrlMismatchRule"#9306
Merged
[Fusion] Add pre-merge validation rule "SpecifiedByUrlMismatchRule"#9306
Conversation
Contributor
Fusion Gateway Performance Results
Simple Composite Query
Response Times
Deep Recursion Query
Response Times
Variable Batching Throughput
Response Times
Runner 1 = benchmarking-1Run 22708752786 • Commit bab69fe • Thu, 05 Mar 2026 08:18:15 GMT |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Fusion pre-merge validation rule to detect inconsistent @specifiedBy(url: ...) values for scalar types across source schemas, surfacing the issue as composition warnings.
Changes:
- Introduce
SpecifiedByUrlMismatchRuleand wire it into the pre-merge rule pipeline. - Publish new
ScalarTypeGroupEventfromPreMergeValidatorto enable scalar-focused rules. - Add a new log entry code + localized message, and add coverage via dedicated rule tests.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/HotChocolate/Fusion-vnext/test/Fusion.Composition.Tests/PreMergeValidationRules/SpecifiedByUrlMismatchRuleTests.cs | Adds tests covering matching vs mismatching scalar specifiedBy URLs (warning snapshots). |
| src/HotChocolate/Fusion-vnext/src/Fusion.Composition/SchemaComposer.cs | Registers the new pre-merge validation rule in the composition pipeline. |
| src/HotChocolate/Fusion-vnext/src/Fusion.Composition/Properties/CompositionResources.resx | Adds localized message template for the new warning. |
| src/HotChocolate/Fusion-vnext/src/Fusion.Composition/Properties/CompositionResources.Designer.cs | Updates strongly-typed resource accessors for the new message. |
| src/HotChocolate/Fusion-vnext/src/Fusion.Composition/PreMergeValidator.cs | Publishes ScalarTypeGroupEvent by grouping scalar types per name across schemas. |
| src/HotChocolate/Fusion-vnext/src/Fusion.Composition/PreMergeValidationRules/SpecifiedByUrlMismatchRule.cs | Implements the new rule that logs warnings when scalar SpecifiedBy differs across schemas. |
| src/HotChocolate/Fusion-vnext/src/Fusion.Composition/Logging/LogEntryHelper.cs | Adds helper to build the SPECIFIED_BY_URL_MISMATCH warning log entry. |
| src/HotChocolate/Fusion-vnext/src/Fusion.Composition/Logging/LogEntryCodes.cs | Adds the SPECIFIED_BY_URL_MISMATCH log entry code constant. |
| src/HotChocolate/Fusion-vnext/src/Fusion.Composition/Info/ScalarTypeInfo.cs | Adds ScalarTypeInfo to carry scalar+schema information through events. |
| src/HotChocolate/Fusion-vnext/src/Fusion.Composition/Events/GroupEvents.cs | Adds ScalarTypeGroupEvent event contract for scalar-type grouping. |
Files not reviewed (1)
- src/HotChocolate/Fusion-vnext/src/Fusion.Composition/Properties/CompositionResources.Designer.cs: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced May 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the changes (Less than 80 chars)