Skip to content

[Fusion] Refactor canonical directive definition creation#9309

Merged
glen-84 merged 1 commit intomainfrom
gai/refactor-canonical-directive-creation
Mar 5, 2026
Merged

[Fusion] Refactor canonical directive definition creation#9309
glen-84 merged 1 commit intomainfrom
gai/refactor-canonical-directive-creation

Conversation

@glen-84
Copy link
Copy Markdown
Member

@glen-84 glen-84 commented Mar 5, 2026

Summary of the changes (Less than 80 chars)

  • [Fusion] Refactor canonical directive definition creation.

Copilot AI review requested due to automatic review settings March 5, 2026 10:42
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 5, 2026

Fusion Gateway Performance Results

Progress: 0/6 benchmarks completed — this report updates as each job finishes.

Simple Composite Query

Req/s Err%
Constant 1 (50 VUs) pending pending
Ramping 1 (0-500-0 VUs) pending pending
Response Times
Min Med Avg P90 P95 Max
Constant 1 pending pending pending pending pending pending
Ramping 1 pending pending pending pending pending pending

Deep Recursion Query

Req/s Err%
Constant 1 (50 VUs) pending pending
Ramping 1 (0-500-0 VUs) pending pending
Response Times
Min Med Avg P90 P95 Max
Constant 1 pending pending pending pending pending pending
Ramping 1 pending pending pending pending pending pending

Variable Batching Throughput

Req/s Err%
Constant 1 (50 VUs) pending pending
Ramping 1 (0-500-0 VUs) pending pending
Response Times
Min Med Avg P90 P95 Max
Constant 1 pending pending pending pending pending pending
Ramping 1 pending pending pending pending pending pending

Runner 1 = benchmarking-1

Run 22714139431 • Commit bd9ae7a • Thu, 05 Mar 2026 10:42:40 GMT

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 GetCanonicalDirectiveDefinition parameter from ISchemaDefinition to MutableSchemaDefinition in the interface, base class, and all 8 merger implementations.
  • Switched SpecifiedByDirectiveMerger and OneOfDirectiveMerger to use BuiltIns.SpecifiedBy.Create(schema) and BuiltIns.OneOf.Create() instead of the definition classes' own Create methods.
  • Removed the now-unused Create factory methods from SpecifiedByMutableDirectiveDefinition and OneOfMutableDirectiveDefinition.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants