STET

agent_patch

runs/2026-02-28__13-38-10__gpt-5-3-codex/flux-pr-1293/flux-pr-1293.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/agent-logs/agent.patch

32332 bytes

Back to adjudication
diff --git a/tmp/agent-patch-flux-pr-1293.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/execution/engine/execution_engine.go b/app/execution/engine/execution_engine.go
index 51b2742..d4d7be2 100644
--- a/tmp/agent-patch-flux-pr-1293.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/execution/engine/execution_engine.go
+++ b/app/execution/engine/execution_engine.go
@@ -136,6 +136,10 @@ func NewExecutionEngine(ctx context.Context, logger abstractlogger.Logger, engin
 		dsIDs[ds.Id()] = struct{}{}
 	}
 
+	if resolverOptions.PropagateFetchReasons {
+		engineConfig.plannerConfig.BuildFetchReasons = true
+	}
+
 	return &ExecutionEngine{
 		logger:             logger,
 		config:             engineConfig,
diff --git a/tmp/agent-patch-flux-pr-1293.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/engine/datasource/graphql_datasource/graphql_datasource_federation_test.go b/app/v2/pkg/engine/datasource/graphql_datasource/graphql_datasource_federation_test.go
index 2e881ca..b6ff84c 100644
--- a/tmp/agent-patch-flux-pr-1293.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/engine/datasource/graphql_datasource/graphql_datasource_federation_test.go
+++ b/app/v2/pkg/engine/datasource/graphql_datasource/graphql_datasource_federation_test.go
@@ -3096,7 +3096,9 @@ func TestGraphQLDataSourceFederation(t *testing.T) {
 										Input:          `{"method":"POST","url":"http://user.service","body":{"query":"{user {account {address {line1 line2 __typename id}}}}"}}`,
 										DataSource:     &Source{},
 										PostProcessing: DefaultPostProcessingConfiguration,
-										FieldFetchReasons: []resolve.FetchReason{
+									},
+									Info: &resolve.FetchInfo{
+										PropagatedFetchReasons: []resolve.FetchReason{
 											{
 												TypeName:  "Address",
 												FieldName: "id",
@@ -3129,8 +3131,36 @@ func TestGraphQLDataSourceFederation(t *testing.T) {
 									},
 									DataSourceIdentifier: []byte("graphql_datasource.Source"),
 									FetchConfiguration: resolve.FetchConfiguration{
-										Input:      `{"method":"POST","url":"http://address-enricher.service","body":{"query":"query($representations: [_Any!]!){_entities(representations: $representations){... on Address {__typename country city}}}","variables":{"representations":[$$0$$]}}}`,
-										DataSource: &Source{},
+										Input:               `{"method":"POST","url":"http://address-enricher.service","body":{"query":"query($representations: [_Any!]!){_entities(representations: $representations){... on Address {__typename country city}}}","variables":{"representations":[$$0$$]}}}`,
+										DataSource:          &Source{},
+										PostProcessing:      SingleEntityPostProcessingConfiguration,
+										RequiresEntityFetch: true,
+										Variables: []resolve.Variable{
+											&resolve.ResolvableObjectVariable{
+												Renderer: resolve.NewGraphQLVariableResolveRenderer(&resolve.Object{
+													Nullable: true,
+													Fields: []*resolve.Field{
+														{
+															Name: []byte("__typename"),
+															Value: &resolve.String{
+																Path: []string{"__typename"},
+															},
+															OnTypeNames: [][]byte{[]byte("Address")},
+														},
+														{
+															Name: []byte("id"),
+															Value: &resolve.Scalar{
+																Path: []string{"id"},
+															},
+															OnTypeNames: [][]byte{[]byte("Address")},
+														},
+													},
+												}),
+											},
+										},
+										SetTemplateOutputToNullOnVariableNull: true,
+									},
+									Info: &resolve.FetchInfo{
 										CoordinateDependencies: []resolve.FetchDependency{
 											{
 												Coordinate: resolve.GraphCoordinate{
@@ -3167,6 +3197,17 @@ func TestGraphQLDataSourceFederation(t *testing.T) {
 												},
 											},
 										},
+									},
+								}, "user.account.address", resolve.ObjectPath("user"), resolve.ObjectPath("account"), resolve.ObjectPath("address")),
+								resolve.SingleWithPath(&resolve.SingleFetch{
+									FetchDependencies: resolve.FetchDependencies{
+										FetchID:           2,
+										DependsOnFetchIDs: []int{0, 1},
+									},
+									DataSourceIdentifier: []byte("graphql_datasource.Source"),
+									FetchConfiguration: resolve.FetchConfiguration{
+										Input:               `{"method":"POST","url":"http://address.service","body":{"query":"query($representations: [_Any!]!, $a: String!){_entities(representations: $representations){... on Address {__typename line3(test: $a) zip}}}","variables":{"a":"BOOM","representations":[$$0$$]}}}`,
+										DataSource:          &Source{},
 										PostProcessing:      SingleEntityPostProcessingConfiguration,
 										RequiresEntityFetch: true,
 										Variables: []resolve.Variable{
@@ -3188,24 +3229,27 @@ func TestGraphQLDataSourceFederation(t *testing.T) {
 															},
 															OnTypeNames: [][]byte{[]byte("Address")},
 														},
+														{
+															Name: []byte("country"),
+															Value: &resolve.String{
+																Path: []string{"country"},
+															},
+															OnTypeNames: [][]byte{[]byte("Address")},
+														},
+														{
+															Name: []byte("city"),
+															Value: &resolve.String{
+																Path: []string{"city"},
+															},
+															OnTypeNames: [][]byte{[]byte("Address")},
+														},
 													},
 												}),
 											},
 										},
 										SetTemplateOutputToNullOnVariableNull: true,
 									},
-								}, "user.account.address", resolve.ObjectPath("user"), resolve.ObjectPath("account"), resolve.ObjectPath("address")),
-								resolve.SingleWithPath(&resolve.SingleFetch{
-									FetchDependencies: resolve.FetchDependencies{
-										FetchID:           2,
-										DependsOnFetchIDs: []int{0, 1},
-									},
-									DataSourceIdentifier: []byte("graphql_datasource.Source"),
-									FetchConfiguration: resolve.FetchConfiguration{
-										Input:               `{"method":"POST","url":"http://address.service","body":{"query":"query($representations: [_Any!]!, $a: String!){_entities(representations: $representations){... on Address {__typename line3(test: $a) zip}}}","variables":{"a":"BOOM","representations":[$$0$$]}}}`,
-										DataSource:          &Source{},
-										PostProcessing:      SingleEntityPostProcessingConfiguration,
-										RequiresEntityFetch: true,
+									Info: &resolve.FetchInfo{
 										CoordinateDependencies: []resolve.FetchDependency{
 											{
 												Coordinate: resolve.GraphCoordinate{
@@ -3260,7 +3304,7 @@ func TestGraphQLDataSourceFederation(t *testing.T) {
 												},
 											},
 										},
-										FieldFetchReasons: []resolve.FetchReason{
+										PropagatedFetchReasons: []resolve.FetchReason{
 											{
 												TypeName:    "Address",
 												FieldName:   "line3",
@@ -3274,6 +3318,19 @@ func TestGraphQLDataSourceFederation(t *testing.T) {
 												IsRequires:  true,
 											},
 										},
+									},
+								}, "user.account.address", resolve.ObjectPath("user"), resolve.ObjectPath("account"), resolve.ObjectPath("address")),
+								resolve.SingleWithPath(&resolve.SingleFetch{
+									FetchDependencies: resolve.FetchDependencies{
+										FetchID:           3,
+										DependsOnFetchIDs: []int{0, 2},
+									},
+									DataSourceIdentifier: []byte("graphql_datasource.Source"),
+									FetchConfiguration: resolve.FetchConfiguration{
+										Input:               `{"method":"POST","url":"http://account.service","body":{"query":"query($representations: [_Any!]!){_entities(representations: $representations){... on Address {__typename fullAddress}}}","variables":{"representations":[$$0$$]}}}`,
+										DataSource:          &Source{},
+										PostProcessing:      SingleEntityPostProcessingConfiguration,
+										RequiresEntityFetch: true,
 										Variables: []resolve.Variable{
 											&resolve.ResolvableObjectVariable{
 												Renderer: resolve.NewGraphQLVariableResolveRenderer(&resolve.Object{
@@ -3287,23 +3344,37 @@ func TestGraphQLDataSourceFederation(t *testing.T) {
 															OnTypeNames: [][]byte{[]byte("Address")},
 														},
 														{
-															Name: []byte("id"),
-															Value: &resolve.Scalar{
-																Path: []string{"id"},
+															Name: []byte("line1"),
+															Value: &resolve.String{
+																Path: []string{"line1"},
 															},
 															OnTypeNames: [][]byte{[]byte("Address")},
 														},
 														{
-															Name: []byte("country"),
+															Name: []byte("line2"),
 															Value: &resolve.String{
-																Path: []string{"country"},
+																Path: []string{"line2"},
 															},
 															OnTypeNames: [][]byte{[]byte("Address")},
 														},
 														{
-															Name: []byte("city"),
+															Name: []byte("line3"),
 															Value: &resolve.String{
-																Path: []string{"city"},
+																Path: []string{"line3"},
+															},
+															OnTypeNames: [][]byte{[]byte("Address")},
+														},
+														{
+															Name: []byte("zip"),
+															Value: &resolve.String{
+																Path: []string{"zip"},
+															},
+															OnTypeNames: [][]byte{[]byte("Address")},
+														},
+														{
+															Name: []byte("id"),
+															Value: &resolve.Scalar{
+																Path: []string{"id"},
 															},
 															OnTypeNames: [][]byte{[]byte("Address")},
 														},
@@ -3313,17 +3384,7 @@ func TestGraphQLDataSourceFederation(t *testing.T) {
 										},
 										SetTemplateOutputToNullOnVariableNull: true,
 									},
-								}, "user.account.address", resolve.ObjectPath("user"), resolve.ObjectPath("account"), resolve.ObjectPath("address")),
-								resolve.SingleWithPath(&resolve.SingleFetch{
-									FetchDependencies: resolve.FetchDependencies{
-										FetchID:           3,
-										DependsOnFetchIDs: []int{0, 2},
-									},
-									DataSourceIdentifier: []byte("graphql_datasource.Source"),
-									FetchConfiguration: resolve.FetchConfiguration{
-										Input:          `{"method":"POST","url":"http://account.service","body":{"query":"query($representations: [_Any!]!){_entities(representations: $representations){... on Address {__typename fullAddress}}}","variables":{"representations":[$$0$$]}}}`,
-										DataSource:     &Source{},
-										PostProcessing: SingleEntityPostProcessingConfiguration,
+									Info: &resolve.FetchInfo{
 										CoordinateDependencies: []resolve.FetchDependency{
 											{
 												Coordinate: resolve.GraphCoordinate{
@@ -3380,59 +3441,6 @@ func TestGraphQLDataSourceFederation(t *testing.T) {
 												},
 											},
 										},
-										RequiresEntityFetch: true,
-										Variables: []resolve.Variable{
-											&resolve.ResolvableObjectVariable{
-												Renderer: resolve.NewGraphQLVariableResolveRenderer(&resolve.Object{
-													Nullable: true,
-													Fields: []*resolve.Field{
-														{
-															Name: []byte("__typename"),
-															Value: &resolve.String{
-																Path: []string{"__typename"},
-															},
-															OnTypeNames: [][]byte{[]byte("Address")},
-														},
-														{
-															Name: []byte("line1"),
-															Value: &resolve.String{
-																Path: []string{"line1"},
-															},
-															OnTypeNames: [][]byte{[]byte("Address")},
-														},
-														{
-															Name: []byte("line2"),
-															Value: &resolve.String{
-																Path: []string{"line2"},
-															},
-															OnTypeNames: [][]byte{[]byte("Address")},
-														},
-														{
-															Name: []byte("line3"),
-															Value: &resolve.String{
-																Path: []string{"line3"},
-															},
-															OnTypeNames: [][]byte{[]byte("Address")},
-														},
-														{
-															Name: []byte("zip"),
-															Value: &resolve.String{
-																Path: []string{"zip"},
-															},
-															OnTypeNames: [][]byte{[]byte("Address")},
-														},
-														{
-															Name: []byte("id"),
-															Value: &resolve.Scalar{
-																Path: []string{"id"},
-															},
-															OnTypeNames: [][]byte{[]byte("Address")},
-														},
-													},
-												}),
-											},
-										},
-										SetTemplateOutputToNullOnVariableNull: true,
 									},
 								}, "user.account.address", resolve.ObjectPath("user"), resolve.ObjectPath("account"), resolve.ObjectPath("address")),
 							),
@@ -16067,7 +16075,7 @@ func TestGraphQLDataSourceFederation(t *testing.T) {
 								SelectionSet: "id",
 								Conditions: []plan.KeyCondition{
 									{
-										Coordinates: []plan.KeyConditionCoordinate{
+										Coordinates: []plan.FieldCoordinate{
 											{
 												TypeName:  "User",
 												FieldName: "hostedImageWithProvides",
@@ -17008,7 +17016,7 @@ func TestGraphQLDataSourceFederation(t *testing.T) {
 								SelectionSet: "id",
 								Conditions: []plan.KeyCondition{
 									{
-										Coordinates: []plan.KeyConditionCoordinate{
+										Coordinates: []plan.FieldCoordinate{
 											{
 												TypeName:  "Host",
 												FieldName: "image",
diff --git a/tmp/agent-patch-flux-pr-1293.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/engine/plan/configuration.go b/app/v2/pkg/engine/plan/configuration.go
index a5216da..721eac5 100644
--- a/tmp/agent-patch-flux-pr-1293.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/engine/plan/configuration.go
+++ b/app/v2/pkg/engine/plan/configuration.go
@@ -33,6 +33,10 @@ type Configuration struct {
 	// DisableIncludeFieldDependencies controls whether the planner generates
 	// field dependency structures (useful in tests).
 	DisableIncludeFieldDependencies bool
+
+	// BuildFetchReasons controls whether the planner computes fetch reasons metadata.
+	// This metadata is used for optional propagation to subgraph request extensions.
+	BuildFetchReasons bool
 }
 
 type DebugConfiguration struct {
diff --git a/tmp/agent-patch-flux-pr-1293.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/engine/plan/federation_metadata.go b/app/v2/pkg/engine/plan/federation_metadata.go
index b4479a4..994ea95 100644
--- a/tmp/agent-patch-flux-pr-1293.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/engine/plan/federation_metadata.go
+++ b/app/v2/pkg/engine/plan/federation_metadata.go
@@ -82,11 +82,11 @@ type FederationFieldConfiguration struct {
 }
 
 type KeyCondition struct {
-	Coordinates []KeyConditionCoordinate `json:"coordinates"`
-	FieldPath   []string                 `json:"field_path"`
+	Coordinates []FieldCoordinate `json:"coordinates"`
+	FieldPath   []string          `json:"field_path"`
 }
 
-type KeyConditionCoordinate struct {
+type FieldCoordinate struct {
 	TypeName  string `json:"type_name"`
 	FieldName string `json:"field_name"`
 }
diff --git a/tmp/agent-patch-flux-pr-1293.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/engine/plan/node_selection_visitor.go b/app/v2/pkg/engine/plan/node_selection_visitor.go
index 6a1259a..2273710 100644
--- a/tmp/agent-patch-flux-pr-1293.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/engine/plan/node_selection_visitor.go
+++ b/app/v2/pkg/engine/plan/node_selection_visitor.go
@@ -45,7 +45,7 @@ type nodeSelectionVisitor struct {
 	hasNewFields        bool // hasNewFields is used to determine if we need to run the planner again. It will be true in case required fields were added
 	hasUnresolvedFields bool // hasUnresolvedFields is used to determine if we need to run the planner again. We should set it to true in case we have unresolved fields
 
-	fieldPathCoordinates []KeyConditionCoordinate // currentFieldPathCoordinates is a stack of field path coordinates // TODO: remove me
+	fieldPathCoordinates []FieldCoordinate // currentFieldPathCoordinates is a stack of field path coordinates // TODO: remove me
 	rewrittenFieldRefs   []int
 }
 
@@ -128,7 +128,7 @@ func (c *nodeSelectionVisitor) EnterDocument(operation, definition *ast.Document
 	}
 
 	if c.fieldPathCoordinates == nil {
-		c.fieldPathCoordinates = make([]KeyConditionCoordinate, 0, 8)
+		c.fieldPathCoordinates = make([]FieldCoordinate, 0, 8)
 	} else {
 		c.fieldPathCoordinates = c.fieldPathCoordinates[:0]
 	}
@@ -219,7 +219,7 @@ func (c *nodeSelectionVisitor) EnterField(fieldRef int) {
 		c.rewriteSelectionSetHavingAbstractFragments(fieldRef, ds)
 	}
 
-	c.fieldPathCoordinates = append(c.fieldPathCoordinates, KeyConditionCoordinate{
+	c.fieldPathCoordinates = append(c.fieldPathCoordinates, FieldCoordinate{
 		FieldName: fieldName,
 		TypeName:  typeName,
 	})
diff --git a/tmp/agent-patch-flux-pr-1293.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/engine/plan/visitor.go b/app/v2/pkg/engine/plan/visitor.go
index 382be28..effa126 100644
--- a/tmp/agent-patch-flux-pr-1293.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/engine/plan/visitor.go
+++ b/app/v2/pkg/engine/plan/visitor.go
@@ -1336,8 +1336,17 @@ func (v *Visitor) configureFetch(internal *objectFetchConfiguration, external re
 	}
 
 	if !v.Config.DisableIncludeFieldDependencies {
-		singleFetch.CoordinateDependencies = v.resolveFetchDependencies(internal.fetchID)
-		singleFetch.FieldFetchReasons = v.buildFetchReasons(internal.fetchID)
+		if singleFetch.Info == nil {
+			singleFetch.Info = &resolve.FetchInfo{}
+		}
+
+		singleFetch.Info.CoordinateDependencies = v.resolveFetchDependencies(internal.fetchID)
+
+		if v.Config.BuildFetchReasons {
+			allReasons, propagatedReasons := v.buildFetchReasons(internal.fetchID)
+			singleFetch.Info.FetchReasons = allReasons
+			singleFetch.Info.PropagatedFetchReasons = propagatedReasons
+		}
 	}
 
 	return singleFetch
@@ -1398,10 +1407,10 @@ func (v *Visitor) resolveFetchDependencies(fetchID int) []resolve.FetchDependenc
 	return dependencies
 }
 
-func (v *Visitor) buildFetchReasons(fetchID int) []resolve.FetchReason {
+func (v *Visitor) buildFetchReasons(fetchID int) (all []resolve.FetchReason, propagated []resolve.FetchReason) {
 	fields, ok := v.plannerFields[fetchID]
 	if !ok {
-		return nil
+		return nil, nil
 	}
 	dsConfig := v.planners[fetchID].DataSourceConfiguration()
 
@@ -1418,9 +1427,6 @@ func (v *Visitor) buildFetchReasons(fetchID int) []resolve.FetchReason {
 			continue
 		}
 		typeName := v.fieldEnclosingTypeNames[fieldRef]
-		if !dsConfig.RequiresFetchReason(typeName, fieldName) {
-			continue
-		}
 
 		byUser := !v.skipField(fieldRef)
 		dependants, ok := v.fieldRefDependants[fieldRef]
@@ -1495,5 +1501,21 @@ func (v *Visitor) buildFetchReasons(fetchID int) []resolve.FetchReason {
 			cmp.Compare(a.FieldName, b.FieldName),
 		)
 	})
-	return reasons
+	if len(reasons) == 0 {
+		return nil, nil
+	}
+
+	propagated = make([]resolve.FetchReason, 0, len(reasons))
+	for i := range reasons {
+		reason := reasons[i]
+		if dsConfig.RequiresFetchReason(reason.TypeName, reason.FieldName) {
+			propagated = append(propagated, reason)
+		}
+	}
+
+	if len(propagated) == 0 {
+		propagated = nil
+	}
+
+	return reasons, propagated
 }
diff --git a/tmp/agent-patch-flux-pr-1293.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/engine/postprocess/create_concrete_single_fetch_types.go b/app/v2/pkg/engine/postprocess/create_concrete_single_fetch_types.go
index 3d6a00b..f5d0b2a 100644
--- a/tmp/agent-patch-flux-pr-1293.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/engine/postprocess/create_concrete_single_fetch_types.go
+++ b/app/v2/pkg/engine/postprocess/create_concrete_single_fetch_types.go
@@ -75,10 +75,8 @@ func (d *createConcreteSingleFetchTypes) createEntityBatchFetch(fetch *resolve.S
 	}
 
 	return &resolve.BatchEntityFetch{
-		FetchDependencies:      fetch.FetchDependencies,
-		CoordinateDependencies: fetch.CoordinateDependencies,
-		FieldFetchReasons:      fetch.FieldFetchReasons,
-		Info:                   fetch.Info,
+		FetchDependencies: fetch.FetchDependencies,
+		Info:              fetch.Info,
 		Input: resolve.BatchInput{
 			Header: resolve.InputTemplate{
 				Segments:                              fetch.InputTemplate.Segments[:representationsVariableIndex],
@@ -122,10 +120,8 @@ func (d *createConcreteSingleFetchTypes) createEntityFetch(fetch *resolve.Single
 	}
 
 	return &resolve.EntityFetch{
-		FetchDependencies:      fetch.FetchDependencies,
-		CoordinateDependencies: fetch.CoordinateDependencies,
-		FieldFetchReasons:      fetch.FieldFetchReasons,
-		Info:                   fetch.Info,
+		FetchDependencies: fetch.FetchDependencies,
+		Info:              fetch.Info,
 		Input: resolve.EntityInput{
 			Header: resolve.InputTemplate{
 				Segments:                              fetch.InputTemplate.Segments[:representationsVariableIndex],
diff --git a/tmp/agent-patch-flux-pr-1293.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/engine/postprocess/deduplicate_single_fetches_test.go b/app/v2/pkg/engine/postprocess/deduplicate_single_fetches_test.go
index 9a0121b..d3da371 100644
--- a/tmp/agent-patch-flux-pr-1293.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/engine/postprocess/deduplicate_single_fetches_test.go
+++ b/app/v2/pkg/engine/postprocess/deduplicate_single_fetches_test.go
@@ -99,6 +99,8 @@ func TestDeduplicateSingleFetches_ProcessFetchTree(t *testing.T) {
 							},
 							FetchConfiguration: resolve.FetchConfiguration{
 								Input: "a",
+							},
+							Info: &resolve.FetchInfo{
 								CoordinateDependencies: []resolve.FetchDependency{
 									{
 										DependsOn: []resolve.FetchDependencyOrigin{
@@ -123,6 +125,8 @@ func TestDeduplicateSingleFetches_ProcessFetchTree(t *testing.T) {
 							},
 							FetchConfiguration: resolve.FetchConfiguration{
 								Input: "a",
+							},
+							Info: &resolve.FetchInfo{
 								CoordinateDependencies: []resolve.FetchDependency{
 									{
 										DependsOn: []resolve.FetchDependencyOrigin{
@@ -147,6 +151,8 @@ func TestDeduplicateSingleFetches_ProcessFetchTree(t *testing.T) {
 							},
 							FetchConfiguration: resolve.FetchConfiguration{
 								Input: "b",
+							},
+							Info: &resolve.FetchInfo{
 								CoordinateDependencies: []resolve.FetchDependency{
 									{
 										DependsOn: []resolve.FetchDependencyOrigin{
@@ -174,6 +180,8 @@ func TestDeduplicateSingleFetches_ProcessFetchTree(t *testing.T) {
 							},
 							FetchConfiguration: resolve.FetchConfiguration{
 								Input: "b",
+							},
+							Info: &resolve.FetchInfo{
 								CoordinateDependencies: []resolve.FetchDependency{
 									{
 										DependsOn: []resolve.FetchDependencyOrigin{
@@ -219,6 +227,8 @@ func TestDeduplicateSingleFetches_ProcessFetchTree(t *testing.T) {
 							},
 							FetchConfiguration: resolve.FetchConfiguration{
 								Input: "a",
+							},
+							Info: &resolve.FetchInfo{
 								CoordinateDependencies: []resolve.FetchDependency{
 									{
 										DependsOn: []resolve.FetchDependencyOrigin{
@@ -243,6 +253,8 @@ func TestDeduplicateSingleFetches_ProcessFetchTree(t *testing.T) {
 							},
 							FetchConfiguration: resolve.FetchConfiguration{
 								Input: "b",
+							},
+							Info: &resolve.FetchInfo{
 								CoordinateDependencies: []resolve.FetchDependency{
 									{
 										DependsOn: []resolve.FetchDependencyOrigin{
diff --git a/tmp/agent-patch-flux-pr-1293.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/engine/resolve/fetch.go b/app/v2/pkg/engine/resolve/fetch.go
index 137670b..9165598 100644
--- a/tmp/agent-patch-flux-pr-1293.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/engine/resolve/fetch.go
+++ b/app/v2/pkg/engine/resolve/fetch.go
@@ -102,11 +102,17 @@ func (s *SingleFetch) Dependencies() *FetchDependencies {
 }
 
 func (s *SingleFetch) DependenciesCoordinates() []FetchDependency {
-	return s.CoordinateDependencies
+	if s.Info == nil {
+		return nil
+	}
+	return s.Info.CoordinateDependencies
 }
 
 func (s *SingleFetch) FetchReasons() []FetchReason {
-	return s.FieldFetchReasons
+	if s.Info == nil {
+		return nil
+	}
+	return s.Info.PropagatedFetchReasons
 }
 
 func (s *SingleFetch) DataSourceInfo() DataSourceInfo {
@@ -170,14 +176,12 @@ func (*SingleFetch) FetchKind() FetchKind {
 type BatchEntityFetch struct {
 	FetchDependencies
 
-	Input                  BatchInput
-	DataSource             DataSource
-	PostProcessing         PostProcessingConfiguration
-	DataSourceIdentifier   []byte
-	Trace                  *DataSourceLoadTrace
-	Info                   *FetchInfo
-	CoordinateDependencies []FetchDependency
-	FieldFetchReasons      []FetchReason
+	Input                BatchInput
+	DataSource           DataSource
+	PostProcessing       PostProcessingConfiguration
+	DataSourceIdentifier []byte
+	Trace                *DataSourceLoadTrace
+	Info                 *FetchInfo
 }
 
 func (b *BatchEntityFetch) Dependencies() *FetchDependencies {
@@ -185,11 +189,17 @@ func (b *BatchEntityFetch) Dependencies() *FetchDependencies {
 }
 
 func (b *BatchEntityFetch) DependenciesCoordinates() []FetchDependency {
-	return b.CoordinateDependencies
+	if b.Info == nil {
+		return nil
+	}
+	return b.Info.CoordinateDependencies
 }
 
 func (b *BatchEntityFetch) FetchReasons() []FetchReason {
-	return b.FieldFetchReasons
+	if b.Info == nil {
+		return nil
+	}
+	return b.Info.PropagatedFetchReasons
 }
 
 func (b *BatchEntityFetch) DataSourceInfo() DataSourceInfo {
@@ -223,14 +233,12 @@ func (*BatchEntityFetch) FetchKind() FetchKind {
 type EntityFetch struct {
 	FetchDependencies
 
-	Input                  EntityInput
-	DataSource             DataSource
-	PostProcessing         PostProcessingConfiguration
-	DataSourceIdentifier   []byte
-	Trace                  *DataSourceLoadTrace
-	Info                   *FetchInfo
-	CoordinateDependencies []FetchDependency
-	FieldFetchReasons      []FetchReason
+	Input                EntityInput
+	DataSource           DataSource
+	PostProcessing       PostProcessingConfiguration
+	DataSourceIdentifier []byte
+	Trace                *DataSourceLoadTrace
+	Info                 *FetchInfo
 }
 
 func (e *EntityFetch) Dependencies() *FetchDependencies {
@@ -238,11 +246,17 @@ func (e *EntityFetch) Dependencies() *FetchDependencies {
 }
 
 func (e *EntityFetch) DependenciesCoordinates() []FetchDependency {
-	return e.CoordinateDependencies
+	if e.Info == nil {
+		return nil
+	}
+	return e.Info.CoordinateDependencies
 }
 
 func (e *EntityFetch) FetchReasons() []FetchReason {
-	return e.FieldFetchReasons
+	if e.Info == nil {
+		return nil
+	}
+	return e.Info.PropagatedFetchReasons
 }
 
 func (e *EntityFetch) DataSourceInfo() DataSourceInfo {
@@ -277,11 +291,17 @@ func (p *ParallelListItemFetch) Dependencies() *FetchDependencies {
 }
 
 func (p *ParallelListItemFetch) DependenciesCoordinates() []FetchDependency {
-	return p.Fetch.CoordinateDependencies
+	if p.Fetch == nil {
+		return nil
+	}
+	return p.Fetch.DependenciesCoordinates()
 }
 
 func (p *ParallelListItemFetch) FetchReasons() []FetchReason {
-	return p.Fetch.FieldFetchReasons
+	if p.Fetch == nil {
+		return nil
+	}
+	return p.Fetch.FetchReasons()
 }
 
 func (*ParallelListItemFetch) FetchKind() FetchKind {
@@ -341,17 +361,6 @@ type FetchConfiguration struct {
 
 	QueryPlan *QueryPlan
 
-	// CoordinateDependencies contain a list of GraphCoordinates (typeName+fieldName)
-	// and which fields from other fetches they depend on.
-	// This information is useful to understand why a fetch depends on other fetches,
-	// and how multiple dependencies lead to a chain of fetches
-	CoordinateDependencies []FetchDependency
-
-	// FieldFetchReasons contains provenance for fields that require fetch reason to be propagated
-	// to their subgraph. It is optional propagation via request extensions;
-	// it does not affect execution.
-	FieldFetchReasons []FetchReason
-
 	// OperationName is non-empty when the operation name is propagated to the upstream subgraph fetch.
 	OperationName string
 }
@@ -367,11 +376,6 @@ func (fc *FetchConfiguration) Equals(other *FetchConfiguration) bool {
 	}
 
 	// Note: we do not compare datasources, as they will always be a different instance.
-	// Note: we do not compare CoordinateDependencies, as they contain more detailed
-	// dependencies information that is already present in the FetchDependencies on the fetch itself.
-	// Note: we do not compare FieldFetchReasons, as it is derived data for an extension
-	// and does not affect fetch execution semantics.
-
 	if fc.RequiresParallelListItemFetch != other.RequiresParallelListItemFetch {
 		return false
 	}
@@ -435,6 +439,17 @@ type FetchInfo struct {
 	RootFields     []GraphCoordinate
 	OperationType  ast.OperationType
 	QueryPlan      *QueryPlan
+
+	// CoordinateDependencies contains a list of GraphCoordinates (typeName+fieldName)
+	// and which fields from other fetches they depend on.
+	CoordinateDependencies []FetchDependency
+
+	// FetchReasons contains all computed reasons for fields on this fetch.
+	FetchReasons []FetchReason
+
+	// PropagatedFetchReasons is the subset of FetchReasons that should be propagated
+	// to downstream subgraph requests.
+	PropagatedFetchReasons []FetchReason
 }
 
 type GraphCoordinate struct {
diff --git a/tmp/agent-patch-flux-pr-1293.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/engine/resolve/fetchtree.go b/app/v2/pkg/engine/resolve/fetchtree.go
index ad1eb2f..f4fd987 100644
--- a/tmp/agent-patch-flux-pr-1293.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/engine/resolve/fetchtree.go
+++ b/app/v2/pkg/engine/resolve/fetchtree.go
@@ -216,7 +216,7 @@ func (n *FetchTreeNode) queryPlan() *FetchTreeQueryPlanNode {
 				SubgraphName:      f.Info.DataSourceName,
 				SubgraphID:        f.Info.DataSourceID,
 				Path:              n.Item.ResponsePath,
-				Dependencies:      f.FetchConfiguration.CoordinateDependencies,
+				Dependencies:      f.Info.CoordinateDependencies,
 			}
 
 			if f.Info.QueryPlan != nil {
@@ -231,7 +231,7 @@ func (n *FetchTreeNode) queryPlan() *FetchTreeQueryPlanNode {
 				SubgraphName:      f.Info.DataSourceName,
 				SubgraphID:        f.Info.DataSourceID,
 				Path:              n.Item.ResponsePath,
-				Dependencies:      f.CoordinateDependencies,
+				Dependencies:      f.Info.CoordinateDependencies,
 			}
 
 			if f.Info.QueryPlan != nil {
@@ -246,7 +246,7 @@ func (n *FetchTreeNode) queryPlan() *FetchTreeQueryPlanNode {
 				SubgraphName:      f.Info.DataSourceName,
 				SubgraphID:        f.Info.DataSourceID,
 				Path:              n.Item.ResponsePath,
-				Dependencies:      f.CoordinateDependencies,
+				Dependencies:      f.Info.CoordinateDependencies,
 			}
 
 			if f.Info.QueryPlan != nil {
diff --git a/tmp/agent-patch-flux-pr-1293.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/engine/resolve/loader.go b/app/v2/pkg/engine/resolve/loader.go
index 685383c..308da94 100644
--- a/tmp/agent-patch-flux-pr-1293.1-of-1.2026-02-28__13-38-10__gpt-5-3-codex/app/v2/pkg/engine/resolve/loader.go
+++ b/app/v2/pkg/engine/resolve/loader.go
@@ -1599,7 +1599,25 @@ func (l *Loader) executeSourceLoad(ctx context.Context, fetchItem *FetchItem, so
 		}
 	}
 	if l.propagateFetchReasons && !IsIntrospectionDataSource(res.ds.ID) {
-		fetchReasons := fetchItem.Fetch.FetchReasons()
+		var fetchReasons []FetchReason
+		switch fetch := fetchItem.Fetch.(type) {
+		case *SingleFetch:
+			if fetch.Info != nil {
+				fetchReasons = fetch.Info.PropagatedFetchReasons
+			}
+		case *EntityFetch:
+			if fetch.Info != nil {
+				fetchReasons = fetch.Info.PropagatedFetchReasons
+			}
+		case *BatchEntityFetch:
+			if fetch.Info != nil {
+				fetchReasons = fetch.Info.PropagatedFetchReasons
+			}
+		case *ParallelListItemFetch:
+			if fetch.Fetch != nil && fetch.Fetch.Info != nil {
+				fetchReasons = fetch.Fetch.Info.PropagatedFetchReasons
+			}
+		}
 		if len(fetchReasons) > 0 {
 			var encoded []byte
 			encoded, res.err = json.Marshal(fetchReasons)