[Fusion] Refactor canonical directive definition creation#9309
Merged
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 22714139431 • Commit bd9ae7a • Thu, 05 Mar 2026 10:42:40 GMT |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the canonical directive definition creation in the Fusion composition pipeline. It narrows the parameter type of GetCanonicalDirectiveDefinition from ISchemaDefinition to MutableSchemaDefinition across the IDirectiveMerger interface and all its implementations, and redirects spec directive creation to use the centralized BuiltIns factory methods.
Changes:
- Changed
GetCanonicalDirectiveDefinitionparameter fromISchemaDefinitiontoMutableSchemaDefinitionin the interface, base class, and all 8 merger implementations. - Switched
SpecifiedByDirectiveMergerandOneOfDirectiveMergerto useBuiltIns.SpecifiedBy.Create(schema)andBuiltIns.OneOf.Create()instead of the definition classes' ownCreatemethods. - Removed the now-unused
Createfactory methods fromSpecifiedByMutableDirectiveDefinitionandOneOfMutableDirectiveDefinition.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
IDirectiveMerger.cs |
Changed interface method parameter from ISchemaDefinition to MutableSchemaDefinition |
DirectiveMergerBase.cs |
Updated abstract method signature to match interface |
SpecifiedByDirectiveMerger.cs |
Updated parameter type and switched to BuiltIns.SpecifiedBy.Create(schema) |
OneOfDirectiveMerger.cs |
Updated parameter type and switched to BuiltIns.OneOf.Create() |
TagDirectiveMerger.cs |
Updated parameter type |
CostDirectiveMerger.cs |
Updated parameter type |
ListSizeDirectiveMerger.cs |
Updated parameter type |
CacheControlDirectiveMerger.cs |
Updated parameter type |
McpToolAnnotationsDirectiveMerger.cs |
Updated parameter type |
SerializeAsDirectiveMerger.cs |
Updated parameter type |
SpecifiedByMutableDirectiveDefinition.cs |
Removed unused Create factory method |
OneOfMutableDirectiveDefinition.cs |
Removed unused Create factory method |
💡 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)