flux-pr-1184
graphql-go-tools (Go) · W2 · GPT-5.3 Codex
Tests passed. 1/1 commands passed. Strength: strong.
go test -C v2 ./... -count=1 -timeout=300sPartial score: 1/1
Trajectory
codex · partial order onlyprovider-native trajectory captured; validation and decision steps are appended with coarse ordering only
Quality
Equivalence Reasoning
behavioral
The patch partially implements nested union-fragment handling and fixes `entitiesImplementingInterface`, but it misses key intended behavior: top-level object-fragment cleanup is not updated to validate membership in parent valid types (it still relies on the old top-level checks), and `unionFragmentNeedCleanup` uses intersection/non-empty logic instead of requiring full parent-type coverage, which can skip required rewrites for union/interface selections.
Code Review
The patch is directionally correct and likely passes intended core tests, but it does not fully match the intended rewrite semantics for union-inclusive edge paths; specifically, union-only fragment flows can skip rewrite, and nested abstract structures inside copied object fragments remain under-handled.
In `unionFieldSelectionNeedsRewrite`, the early return `if !selectionSetInfo.hasInlineFragmentsOnInterfaces { return false }` still executes before union fragment cleanup for cases with unions but no interface fragments, so union-only nested abstract fragments may not be rewritten.
The initial no-fragment gate in `interfaceFieldSelectionNeedsRewrite` still checks only interface/object flags. With only union inline fragments present, it can follow the non-rewrite path before union cleanup logic is reached.
`flattenFragmentOnUnion` copies object fragment selections directly, which can preserve nested abstract fragments and miss normalization behavior expected for deeply nested union/interface-in-object structures.