flux-pr-1184
graphql-go-tools (Go) · W1 · GPT-5.1 Codex Mini
Tests: unknown. 0/1 commands passed. Strength: missing.
go test -C v2 ./... -count=1 -timeout=300sPartial score: 0/0
Trajectory
codex · partial order onlyprovider-native trajectory captured; validation and decision steps are appended with coarse ordering only
Quality
Equivalence Reasoning
behavioral
The patch only partially addresses the intent. It adds some union-fragment flattening and fixes `entitiesImplementingInterface` plus parent-type checks in `objectFragmentNeedCleanup`, but it does not update rewrite-decision logic to account for union inline fragments (e.g., `unionFieldSelectionNeedsRewrite` / interface-side union cleanup paths). As a result, queries with nested union fragments can still skip required rewriting and produce incorrect plans. It also lacks the fuller recursive cleanup/flatten behavior from the intended change (notably union cleanup checks and robust nested object/union handling).
Code Review
Patch addresses two requested pieces (entity filtering bug and parent-type check for object fragments) and adds union flattening, but it likely does not fully satisfy the intended nested abstract-fragment behavior and carries notable edge-case risk.
The new `flattenFragmentOnUnion` returns immediately if both `unionMemberEntityNames` and `unionMemberTypeNames` are empty. That can drop a valid inline union fragment selection instead of rewriting it using parent-allowed types.
Inside `flattenFragmentOnUnion`, object inline fragments are appended via `CopySelection` rather than being normalized recursively. Nested abstract fragments under those object branches may remain unrewritten in federated plans.
The helper now validates parent-type membership, but the cleanup change is narrow and does not add corresponding union-fragment cleanup pathways, so nested union-in-object scenarios are still under-protected.