Repository navigation
Add registration tests for the validator and composer rule lists - #10203
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR strengthens safety around schema validation/composition by adding tests that pin the registered rule lists (and their order), preventing rules from being silently dropped from the real execution pipelines.
Changes:
- Add assertion tests that verify the exact rule registration sets and order for
SchemaValidatordefaults andSchemaComposer’s source/pre-merge/post-merge rule lists. - Expose
SchemaComposerrule lists asinternal staticproperties so tests can assert the literal registered sequences. - Add an internal accessor for
SchemaValidator’s rules and grant test-assembly access viaInternalsVisibleTo.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/HotChocolate/Fusion/test/Fusion.Composition.Tests/SchemaComposerTests.cs | Adds tests asserting the registered composer rule lists and order. |
| src/HotChocolate/Fusion/src/Fusion.Composition/SchemaComposer.cs | Exposes composer rule lists as internal properties and uses them at call sites. |
| src/HotChocolate/Core/test/Types.Validation.Tests/SchemaValidatorTests.cs | Adds a test asserting the default schema validator rule registration/order. |
| src/HotChocolate/Core/src/Types.Validation/SchemaValidator.cs | Adds an internal accessor exposing the validator’s configured rules for tests. |
| src/HotChocolate/Core/src/Types.Validation/HotChocolate.Types.Validation.csproj | Adds InternalsVisibleTo for the Types.Validation test project. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Patch coverage100.0% of changed lines covered (7/7)
Project coverage: 54.4% (242433/445718 lines) |
This was referenced Aug 16, 2026
This was referenced Aug 25, 2026
Closed
Closed
Closed
Closed
This was referenced Sep 1, 2026
Closed
This was referenced Sep 15, 2026
Closed
[nuget][SUI_Matcher]- Bump the sui-package-updates group with 20 updates
DFE-Digital/SUI_Matcher#405
Closed
This was referenced Sep 22, 2026
Closed
Closed
[nuget][SUI_Matcher]- Bump the sui-package-updates group with 20 updates
DFE-Digital/SUI_Matcher#410
Merged
This was referenced Oct 5, 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
SchemaValidator.AddDefaultRules(20 rules), andSchemaComposer's source-schema (37), pre-merge (20), and post-merge (20) lists. Order is part of the assertion because handler dispatch follows registration order.internal staticproperties carrying the literal, so there is one member per list rather than a field plus an accessor, andSchemaValidatorgains aninternal Rulesaccessor with anInternalsVisibleToentry for its test project.Test plan
AddDefaultRules.Types.Validation(142) andFusion.Composition(743).