Planner Stabilizations#10028
Open
michaelstaib wants to merge 4 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR focuses on stabilizing Fusion operation planning/serialization to prevent nondeterministic corruption of numeric literals (e.g., first: 100 turning into a non-digit) and adds targeted repro tests to guard against regressions.
Changes:
- Adds multiple repro test suites (Language + Fusion) that round-trip/unescape/parse planned subgraph operations and validate they remain valid GraphQL.
- Makes planning/execution-tree construction more deterministic by ordering dependency/merge iteration and by switching node fan-out
Branchesto an ordered immutable dictionary. - Refines direct-lookup candidate selection in
PlanQueuevia a shared helper for “transition source schemas”.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/HotChocolate/Language/test/Language.Tests/Parser/UnescapeNumberReproTests.cs | Adds unescape round-trip repro coverage across boundary-sensitive layouts. |
| src/HotChocolate/Language/test/Language.Tests/Parser/MultiSegmentNumberReproTests.cs | Adds multi-segment reader repro ensuring integer literals aren’t corrupted across chunk boundaries. |
| src/HotChocolate/Fusion/test/Fusion.Execution.Tests/Planning/OperationPlannerNumberLiteralReproTests.cs | Adds planner repro validating planned subgraph SourceText always re-parses. |
| src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/OrganizationsNodeFanoutReproTests.cs | Adds end-to-end repro for node/nodes fan-out path with re-parse validation of captured subgraph requests. |
| src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/OrganizationsConnectionReproTests.cs | Adds a snapshot-based repro for the customer connection query case. |
| src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/OrganizationsConnectionMergeReproTests.cs | Adds end-to-end repro for merge/batch path by splitting entity across subgraphs and re-parsing all captured subgraph requests. |
| src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/snapshots/OrganizationsConnectionReproTests.Organizations_Connection_With_Fragment_And_Typename.yaml | New snapshot capturing the expected gateway/subgraph interaction for the repro query. |
| src/HotChocolate/Fusion/src/Fusion.Execution/Planning/Steps/NodeFieldPlanStep.cs | Switches Branches to ImmutableOrderedDictionary to ensure deterministic branch iteration. |
| src/HotChocolate/Fusion/src/Fusion.Execution/Planning/PlanQueue.cs | Introduces GetTransitionSourceSchemas helper and uses it for consistent direct-lookup candidate selection. |
| src/HotChocolate/Fusion/src/Fusion.Execution/Planning/OperationPlanner.Defer.cs | Orders dependent step IDs to stabilize downstream processing. |
| src/HotChocolate/Fusion/src/Fusion.Execution/Planning/OperationPlanner.BuildExecutionTree.cs | Orders execution-node/dependency iteration and merge/batch processing to stabilize plan building. |
| src/HotChocolate/Fusion/src/Fusion.Execution.Types/PlannerTopologyCache.cs | Makes collected schema-name enumeration deterministic by returning an ordered immutable array. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+172
to
+176
| using var response = await client.PostAsync( | ||
| request, | ||
| new Uri("http://localhost:5000/graphql")); | ||
|
|
||
| using var result = await response.ReadAsResultAsync(); |
Comment on lines
+209
to
+214
| using var response = await client.PostAsync( | ||
| request, | ||
| new Uri("http://localhost:5000/graphql")); | ||
|
|
||
| using var result = await response.ReadAsResultAsync(); | ||
|
|
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.
No description provided.