Skip to content

Planner Stabilizations#10028

Open
michaelstaib wants to merge 4 commits into
mainfrom
mst/planner-040626-1
Open

Planner Stabilizations#10028
michaelstaib wants to merge 4 commits into
mainfrom
mst/planner-040626-1

Conversation

@michaelstaib

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings July 1, 2026 12:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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 Branches to an ordered immutable dictionary.
  • Refines direct-lookup candidate selection in PlanQueue via 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();

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