From 4c2670aa89421e737fca26d5499240c794e4fd01 Mon Sep 17 00:00:00 2001 From: vreff <104409744+vreff@users.noreply.github.com> Date: Thu, 26 Mar 2026 14:24:37 -0400 Subject: [PATCH 1/4] feat(cre/sdk): add capability_id field to CapabilityResponse Add a top-level capability_id string field (field number 3) to the CapabilityResponse message in both v1alpha and v1beta protos. This is a backward-compatible addition that allows the host to tag error responses with the ID of the capability that failed, enabling downstream consumers to attribute workflow execution failures to specific capabilities in metrics and observability. --- cre/go/installer/pkg/embedded_gen.go | 6 ++++++ cre/go/sdk/sdk.pb.go | 21 ++++++++++++++++----- cre/go/tools/generator/cre_metadata.pb.go | 4 ++-- cre/go/values/pb/values.pb.go | 4 ++-- cre/sdk/v1alpha/sdk.proto | 3 +++ cre/sdk/v1beta/sdk.proto | 3 +++ 6 files changed, 32 insertions(+), 9 deletions(-) diff --git a/cre/go/installer/pkg/embedded_gen.go b/cre/go/installer/pkg/embedded_gen.go index c52246cd..23f2ff6c 100755 --- a/cre/go/installer/pkg/embedded_gen.go +++ b/cre/go/installer/pkg/embedded_gen.go @@ -910,6 +910,9 @@ message CapabilityResponse { google.protobuf.Any payload = 1; string error = 2; } + // capability_id identifies which capability produced this response. + // Populated by the host on error to allow callers to attribute failures. + string capability_id = 3; } enum Mode { @@ -1069,6 +1072,9 @@ message CapabilityResponse { google.protobuf.Any payload = 1; string error = 2; } + // capability_id identifies which capability produced this response. + // Populated by the host on error to allow callers to attribute failures. + string capability_id = 3; } enum Mode { diff --git a/cre/go/sdk/sdk.pb.go b/cre/go/sdk/sdk.pb.go index 3ab84306..601a4bb5 100644 --- a/cre/go/sdk/sdk.pb.go +++ b/cre/go/sdk/sdk.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc v5.29.3 +// protoc-gen-go v1.36.11 +// protoc v6.33.4 // source: sdk/v1alpha/sdk.proto package sdk @@ -622,7 +622,10 @@ type CapabilityResponse struct { // // *CapabilityResponse_Payload // *CapabilityResponse_Error - Response isCapabilityResponse_Response `protobuf_oneof:"response"` + Response isCapabilityResponse_Response `protobuf_oneof:"response"` + // capability_id identifies which capability produced this response. + // Populated by the host on error to allow callers to attribute failures. + CapabilityId string `protobuf:"bytes,3,opt,name=capability_id,json=capabilityId,proto3" json:"capability_id,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -682,6 +685,13 @@ func (x *CapabilityResponse) GetError() string { return "" } +func (x *CapabilityResponse) GetCapabilityId() string { + if x != nil { + return x.CapabilityId + } + return "" +} + type isCapabilityResponse_Response interface { isCapabilityResponse_Response() } @@ -1634,10 +1644,11 @@ const file_sdk_v1alpha_sdk_proto_rawDesc = "" + "\apayload\x18\x02 \x01(\v2\x14.google.protobuf.AnyR\apayload\x12\x16\n" + "\x06method\x18\x03 \x01(\tR\x06method\x12\x1f\n" + "\vcallback_id\x18\x04 \x01(\x05R\n" + - "callbackId\"j\n" + + "callbackId\"\x8f\x01\n" + "\x12CapabilityResponse\x120\n" + "\apayload\x18\x01 \x01(\v2\x14.google.protobuf.AnyH\x00R\apayload\x12\x16\n" + - "\x05error\x18\x02 \x01(\tH\x00R\x05errorB\n" + + "\x05error\x18\x02 \x01(\tH\x00R\x05error\x12#\n" + + "\rcapability_id\x18\x03 \x01(\tR\fcapabilityIdB\n" + "\n" + "\bresponse\"m\n" + "\x13TriggerSubscription\x12\x0e\n" + diff --git a/cre/go/tools/generator/cre_metadata.pb.go b/cre/go/tools/generator/cre_metadata.pb.go index 7026ea3f..79b14ceb 100644 --- a/cre/go/tools/generator/cre_metadata.pb.go +++ b/cre/go/tools/generator/cre_metadata.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc v5.29.3 +// protoc-gen-go v1.36.11 +// protoc v6.33.4 // source: tools/generator/v1alpha/cre_metadata.proto package generator diff --git a/cre/go/values/pb/values.pb.go b/cre/go/values/pb/values.pb.go index 743cba4c..4dba28c0 100644 --- a/cre/go/values/pb/values.pb.go +++ b/cre/go/values/pb/values.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc v5.29.3 +// protoc-gen-go v1.36.11 +// protoc v6.33.4 // source: values/v1/values.proto package pb diff --git a/cre/sdk/v1alpha/sdk.proto b/cre/sdk/v1alpha/sdk.proto index 4be81f5e..e5d1bd28 100644 --- a/cre/sdk/v1alpha/sdk.proto +++ b/cre/sdk/v1alpha/sdk.proto @@ -66,6 +66,9 @@ message CapabilityResponse { google.protobuf.Any payload = 1; string error = 2; } + // capability_id identifies which capability produced this response. + // Populated by the host on error to allow callers to attribute failures. + string capability_id = 3; } enum Mode { diff --git a/cre/sdk/v1beta/sdk.proto b/cre/sdk/v1beta/sdk.proto index 39d73ae0..dbf6f40f 100644 --- a/cre/sdk/v1beta/sdk.proto +++ b/cre/sdk/v1beta/sdk.proto @@ -66,6 +66,9 @@ message CapabilityResponse { google.protobuf.Any payload = 1; string error = 2; } + // capability_id identifies which capability produced this response. + // Populated by the host on error to allow callers to attribute failures. + string capability_id = 3; } enum Mode { From 1906d256904919a5f40b468d976d5ecc099416f2 Mon Sep 17 00:00:00 2001 From: "app-token-issuer-engops[bot]" <144731339+app-token-issuer-engops[bot]@users.noreply.github.com> Date: Thu, 26 Mar 2026 18:28:02 +0000 Subject: [PATCH 2/4] Auto-fix: buf format, gofmt, go generate, go mod tidy --- cre/go/sdk/sdk.pb.go | 4 ++-- cre/go/tools/generator/cre_metadata.pb.go | 4 ++-- cre/go/values/pb/values.pb.go | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cre/go/sdk/sdk.pb.go b/cre/go/sdk/sdk.pb.go index 601a4bb5..8858d679 100644 --- a/cre/go/sdk/sdk.pb.go +++ b/cre/go/sdk/sdk.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.11 -// protoc v6.33.4 +// protoc-gen-go v1.36.6 +// protoc v5.29.3 // source: sdk/v1alpha/sdk.proto package sdk diff --git a/cre/go/tools/generator/cre_metadata.pb.go b/cre/go/tools/generator/cre_metadata.pb.go index 79b14ceb..7026ea3f 100644 --- a/cre/go/tools/generator/cre_metadata.pb.go +++ b/cre/go/tools/generator/cre_metadata.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.11 -// protoc v6.33.4 +// protoc-gen-go v1.36.6 +// protoc v5.29.3 // source: tools/generator/v1alpha/cre_metadata.proto package generator diff --git a/cre/go/values/pb/values.pb.go b/cre/go/values/pb/values.pb.go index 4dba28c0..743cba4c 100644 --- a/cre/go/values/pb/values.pb.go +++ b/cre/go/values/pb/values.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.11 -// protoc v6.33.4 +// protoc-gen-go v1.36.6 +// protoc v5.29.3 // source: values/v1/values.proto package pb From b9a9ef2b4839ada8e73265868b64d07bd3a12fd3 Mon Sep 17 00:00:00 2001 From: vreff <104409744+vreff@users.noreply.github.com> Date: Thu, 26 Mar 2026 14:37:58 -0400 Subject: [PATCH 3/4] feat(cre/sdk): add failed_capability_id to ExecutionResult Add an optional failed_capability_id field (field 4) to ExecutionResult in both v1alpha and v1beta. This allows the SDK to propagate the ID of the capability that caused an execution failure, so the engine can read it directly from the result without side-channel state tracking. --- cre/go/installer/pkg/embedded_gen.go | 6 +++++ cre/go/sdk/sdk.pb.go | 28 ++++++++++++++++------- cre/go/tools/generator/cre_metadata.pb.go | 4 ++-- cre/go/values/pb/values.pb.go | 4 ++-- cre/sdk/v1alpha/sdk.proto | 3 +++ cre/sdk/v1beta/sdk.proto | 3 +++ 6 files changed, 36 insertions(+), 12 deletions(-) diff --git a/cre/go/installer/pkg/embedded_gen.go b/cre/go/installer/pkg/embedded_gen.go index 23f2ff6c..e07e66d5 100755 --- a/cre/go/installer/pkg/embedded_gen.go +++ b/cre/go/installer/pkg/embedded_gen.go @@ -958,6 +958,9 @@ message ExecutionResult { string error = 2; TriggerSubscriptionRequest trigger_subscriptions = 3; } + // failed_capability_id identifies the capability whose error caused this execution to fail. + // Only set when the result is an error originating from a capability call. + optional string failed_capability_id = 4; } message GetSecretsRequest { @@ -1120,6 +1123,9 @@ message ExecutionResult { string error = 2; TriggerSubscriptionRequest trigger_subscriptions = 3; } + // failed_capability_id identifies the capability whose error caused this execution to fail. + // Only set when the result is an error originating from a capability call. + optional string failed_capability_id = 4; } message GetSecretsRequest { diff --git a/cre/go/sdk/sdk.pb.go b/cre/go/sdk/sdk.pb.go index 8858d679..e82935b5 100644 --- a/cre/go/sdk/sdk.pb.go +++ b/cre/go/sdk/sdk.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc v5.29.3 +// protoc-gen-go v1.36.11 +// protoc v6.33.4 // source: sdk/v1alpha/sdk.proto package sdk @@ -1057,9 +1057,12 @@ type ExecutionResult struct { // *ExecutionResult_Value // *ExecutionResult_Error // *ExecutionResult_TriggerSubscriptions - Result isExecutionResult_Result `protobuf_oneof:"result"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + Result isExecutionResult_Result `protobuf_oneof:"result"` + // failed_capability_id identifies the capability whose error caused this execution to fail. + // Only set when the result is an error originating from a capability call. + FailedCapabilityId *string `protobuf:"bytes,4,opt,name=failed_capability_id,json=failedCapabilityId,proto3,oneof" json:"failed_capability_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ExecutionResult) Reset() { @@ -1126,6 +1129,13 @@ func (x *ExecutionResult) GetTriggerSubscriptions() *TriggerSubscriptionRequest return nil } +func (x *ExecutionResult) GetFailedCapabilityId() string { + if x != nil && x.FailedCapabilityId != nil { + return *x.FailedCapabilityId + } + return "" +} + type isExecutionResult_Result interface { isExecutionResult_Result() } @@ -1672,12 +1682,14 @@ const file_sdk_v1alpha_sdk_proto_rawDesc = "" + "\tsubscribe\x18\x02 \x01(\v2\x16.google.protobuf.EmptyH\x00R\tsubscribe\x120\n" + "\atrigger\x18\x03 \x01(\v2\x14.sdk.v1alpha.TriggerH\x00R\atrigger\x12*\n" + "\x11max_response_size\x18\x04 \x01(\x04R\x0fmaxResponseSizeB\t\n" + - "\arequest\"\xbd\x01\n" + + "\arequest\"\x8d\x02\n" + "\x0fExecutionResult\x12(\n" + "\x05value\x18\x01 \x01(\v2\x10.values.v1.ValueH\x00R\x05value\x12\x16\n" + "\x05error\x18\x02 \x01(\tH\x00R\x05error\x12^\n" + - "\x15trigger_subscriptions\x18\x03 \x01(\v2'.sdk.v1alpha.TriggerSubscriptionRequestH\x00R\x14triggerSubscriptionsB\b\n" + - "\x06result\"l\n" + + "\x15trigger_subscriptions\x18\x03 \x01(\v2'.sdk.v1alpha.TriggerSubscriptionRequestH\x00R\x14triggerSubscriptions\x125\n" + + "\x14failed_capability_id\x18\x04 \x01(\tH\x01R\x12failedCapabilityId\x88\x01\x01B\b\n" + + "\x06resultB\x17\n" + + "\x15_failed_capability_id\"l\n" + "\x11GetSecretsRequest\x126\n" + "\brequests\x18\x01 \x03(\v2\x1a.sdk.v1alpha.SecretRequestR\brequests\x12\x1f\n" + "\vcallback_id\x18\x02 \x01(\x05R\n" + diff --git a/cre/go/tools/generator/cre_metadata.pb.go b/cre/go/tools/generator/cre_metadata.pb.go index 7026ea3f..79b14ceb 100644 --- a/cre/go/tools/generator/cre_metadata.pb.go +++ b/cre/go/tools/generator/cre_metadata.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc v5.29.3 +// protoc-gen-go v1.36.11 +// protoc v6.33.4 // source: tools/generator/v1alpha/cre_metadata.proto package generator diff --git a/cre/go/values/pb/values.pb.go b/cre/go/values/pb/values.pb.go index 743cba4c..4dba28c0 100644 --- a/cre/go/values/pb/values.pb.go +++ b/cre/go/values/pb/values.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.6 -// protoc v5.29.3 +// protoc-gen-go v1.36.11 +// protoc v6.33.4 // source: values/v1/values.proto package pb diff --git a/cre/sdk/v1alpha/sdk.proto b/cre/sdk/v1alpha/sdk.proto index e5d1bd28..26a8dc32 100644 --- a/cre/sdk/v1alpha/sdk.proto +++ b/cre/sdk/v1alpha/sdk.proto @@ -114,6 +114,9 @@ message ExecutionResult { string error = 2; TriggerSubscriptionRequest trigger_subscriptions = 3; } + // failed_capability_id identifies the capability whose error caused this execution to fail. + // Only set when the result is an error originating from a capability call. + optional string failed_capability_id = 4; } message GetSecretsRequest { diff --git a/cre/sdk/v1beta/sdk.proto b/cre/sdk/v1beta/sdk.proto index dbf6f40f..7f4e191c 100644 --- a/cre/sdk/v1beta/sdk.proto +++ b/cre/sdk/v1beta/sdk.proto @@ -114,6 +114,9 @@ message ExecutionResult { string error = 2; TriggerSubscriptionRequest trigger_subscriptions = 3; } + // failed_capability_id identifies the capability whose error caused this execution to fail. + // Only set when the result is an error originating from a capability call. + optional string failed_capability_id = 4; } message GetSecretsRequest { From 611d38bc6c3030b334fdd3d06354a1ac86dde358 Mon Sep 17 00:00:00 2001 From: "app-token-issuer-engops[bot]" <144731339+app-token-issuer-engops[bot]@users.noreply.github.com> Date: Thu, 26 Mar 2026 18:39:17 +0000 Subject: [PATCH 4/4] Auto-fix: buf format, gofmt, go generate, go mod tidy --- cre/go/sdk/sdk.pb.go | 4 ++-- cre/go/tools/generator/cre_metadata.pb.go | 4 ++-- cre/go/values/pb/values.pb.go | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cre/go/sdk/sdk.pb.go b/cre/go/sdk/sdk.pb.go index e82935b5..e1ae4ee4 100644 --- a/cre/go/sdk/sdk.pb.go +++ b/cre/go/sdk/sdk.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.11 -// protoc v6.33.4 +// protoc-gen-go v1.36.6 +// protoc v5.29.3 // source: sdk/v1alpha/sdk.proto package sdk diff --git a/cre/go/tools/generator/cre_metadata.pb.go b/cre/go/tools/generator/cre_metadata.pb.go index 79b14ceb..7026ea3f 100644 --- a/cre/go/tools/generator/cre_metadata.pb.go +++ b/cre/go/tools/generator/cre_metadata.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.11 -// protoc v6.33.4 +// protoc-gen-go v1.36.6 +// protoc v5.29.3 // source: tools/generator/v1alpha/cre_metadata.proto package generator diff --git a/cre/go/values/pb/values.pb.go b/cre/go/values/pb/values.pb.go index 4dba28c0..743cba4c 100644 --- a/cre/go/values/pb/values.pb.go +++ b/cre/go/values/pb/values.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.11 -// protoc v6.33.4 +// protoc-gen-go v1.36.6 +// protoc v5.29.3 // source: values/v1/values.proto package pb