Skip to content

[Fusion] Fix deferred plans rejecting nested lookups below the defer anchor - #10647

Merged
tobias-tengler merged 2 commits into
mainfrom
tte/fusion-defer-nested-apollo-repro
Oct 20, 2026
Merged

tobias-tengler merged 2 commits into
mainfrom
tte/fusion-defer-nested-apollo-repro

Conversation

@tobias-tengler

@tobias-tengler tobias-tengler commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

No description provided.

…anchor

A deferred selection such as `... @defer { related { name } }` on `products`
plans an incremental step that fetches `related { id }` and a second lookup
that reads that `id` at `$.products.related`. The step was classified as a
pure requirement producer because its only leaf field was consumed by a
dependent, so the planner tried to lift the nested requirement to the parent
scope and threw "requirement path lies outside the defer's anchor".

A dependent's requirement now only counts as consuming a producer field when
it sits at or above the defer anchor, so the step stays in the incremental
plan and chains the nested lookup there.

The descriptor also recorded every remaining step's requirements as
parent-scope requirements. It now records only the requirements of steps
that depend on the parent scope, matching what the executor collects.

Bumps OperationPlanner.Version to 2.3.0.
@tobias-tengler tobias-tengler changed the title [Fusion] Reproduce deferred Apollo lookup requirement planning failure [Fusion] Fix deferred plans rejecting nested lookups below the defer anchor Oct 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Patch coverage

100.0% of changed lines covered (6/6)

File Covered Changed Patch %
…/src/Fusion.Execution/Planning/OperationPlanner.Defer.cs 5 5 100.0% 🟢
…/Fusion/src/Fusion.Execution/Planning/OperationPlanner.cs 1 1 100.0% 🟢

Project coverage: 59.1% (312899/529178 lines)

@tobias-tengler
tobias-tengler marked this pull request as ready for review October 20, 2026 16:21
Copilot AI balanced review requested due to automatic review settings October 20, 2026 16:21
@tobias-tengler
tobias-tengler merged commit ffdbe76 into main Oct 20, 2026
158 checks passed

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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