Skip to content

Cloud-SDK extraction B/C/D — PR 9: gke cross-process wiring#681

Merged
intel352 merged 4 commits into
mainfrom
feat/cloud-sdk-bcd-p9-gke-wiring
May 15, 2026
Merged

Cloud-SDK extraction B/C/D — PR 9: gke cross-process wiring#681
intel352 merged 4 commits into
mainfrom
feat/cloud-sdk-bcd-p9-gke-wiring

Conversation

@intel352
Copy link
Copy Markdown
Contributor

@intel352 intel352 commented May 15, 2026

Summary

  • module/platform_kubernetes_grpc.gogrpcKubernetesBackend adapter implementing the in-core kubernetesBackend interface, delegating to pb.ResourceDriverClient per ADR 0037 Option 1 (ResourceDriver fold). plan→Read, apply→Create, status→Read, destroy→Delete (AlreadyExists resolves apply to success; NotFound resolves destroy to success and yields a clean not-found status — preserving the deleted in-core gkeBackend's swallow-behavior). JSON-bytes converters; no proto change.
  • module/platform_kubernetes_plugin_registry.gokubernetesBackendClientRegistry (gkepb.ResourceDriverClient); RegisterKubernetesBackendClient. Mirrors the Phase A iac_state_plugin_registry.go precedent.
  • engine.go loadPluginInternal seam populating the registry from plugin.KubernetesBackendProvider-implementing plugins. ExternalPluginAdapter.KubernetesBackendClients() checks the plugin advertises pb.ResourceDriver via the contract registry, calls Capabilities, and returns clients for gke only when the plugin lists infra.k8s_cluster.
  • module/platform_kubernetes.go Init()type: kind|k3s|eks|aks use the in-core factory map unchanged; any other type (gke) consults the new client registry. Clean "install workflow-plugin-gcp" error when no client.
  • config_json write-key contract pinned as k8sConfigKey* consts (project_id, service_account_json); read-side k8sOutputKey* consts; symmetric, snake_case, ADR-0037-faithful. Module-config-first precedence: explicit project_id / service_account_json in module config win; cloud-account creds only fill missing keys (mirrors the in-core gkeBackend).
  • buildResourceRef.ProviderId populated with the fully-qualified GKE path projects/<project>/locations/<location>/clusters/<name> (GKE cluster names are not globally unique; matches the in-core addressing).

Plan PR 9 of the cloud-SDK-extraction B/C/D plan. Gates PR 10 (Phase C core deletion).

Cross-process Read/Delete prerequisite

The cross-process gke flow's Read/Delete path requires the workflow-plugin-gcp plugin to handle the fully-qualified ResourceRef.ProviderId this PR writes. That fix lives on the feat/gcs-gke-storage branch of workflow-plugin-gcp (gkeResourceName chokepoint in realGKEClient — commits ce0059f0 and earlier) and ships via plan #2's PR 3, not a separate locked-plan PR. A workflow-core engine on this PR will require a workflow-plugin-gcp build that includes the FQN-aware client for cross-process gke Read/Delete to function.

Test plan

  • Registry register/resolve/reserved-name-rejection (mirrors Phase A precedent)
  • platform_kubernetes_test: type: gke with registered client → grpcKubernetesBackend; with no client → "install plugin" error (deterministic — mutex-guarded clear-and-restore, no t.Skip)
  • grpcKubernetesBackend lifecycle tests (plan/apply/status/destroy incl. KubernetesClusterState through JSON-bytes; idempotency on AlreadyExists / NotFound)
  • Snake-case key consts pinned, camelCase regression guard test
  • Module-config-first precedence test (project_id / service_account_json in module config win over cloud account)
  • Fully-qualified ProviderId test (3 resolution paths: module config, cloud-account fallback, unresolvable→empty)
  • state.Name = module name (not clusterName) test
  • No structpb/Any (iac.proto invariant)
  • spec + quality review passed (zero Critical/Important after fixes)
  • No regression in existing kind/k3s/eks/aks tests

🤖 Generated with Claude Code

intel352 and others added 3 commits May 14, 2026 19:12
Addresses the code-reviewer findings on the grpcKubernetesBackend adapter:

- Critical: injectCredentials wrote camelCase config_json keys
  (projectId/serviceAccountJSON) but the deleted in-core gkeBackend and
  buildResourceSpec's own doc-comment use snake_case. Resolved credentials
  now land under project_id/service_account_json — the keys
  workflow-plugin-gcp's GKEDriver (Task 22) actually reads.
- Important: pinned the config_json WRITE-key contract as
  k8sConfigKey* consts, symmetric with the already-pinned outputs_json
  READ-key consts (k8sOutputKey*). Per ADR 0037 the host adapter owns
  both halves of the key contract.
- Important: dropped the "1.29" GKE-version default from the host
  adapter — version defaulting is GKE-domain knowledge that belongs in
  the plugin's GKEDriver, not this generic adapter. The user-supplied
  version flows through verbatim.

Added a test asserting resolved credentials use the pinned snake_case
keys and guarding against a camelCase regression.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 15, 2026 03:48
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds cross-process wiring so platform.kubernetes can dispatch plugin-provided cluster backends (notably type: gke) via the existing ResourceDriver gRPC contract, enabling the ongoing cloud-SDK extraction work.

Changes:

  • Introduces a plugin.KubernetesBackendProvider optional interface and implements it in ExternalPluginAdapter to expose ResourceDriverClient instances for kubernetes backends.
  • Adds an engine-populated, module-side kubernetesBackendClientRegistry and updates PlatformKubernetes.Init() to route non-core cluster types (e.g. gke) to a new gRPC-backed backend.
  • Adds grpcKubernetesBackend (host-side adapter over pb.ResourceDriverClient) plus focused unit tests for registry behavior, dispatch, and CRUD/status round-trips.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
plugin/kubernetes_backend_provider.go Adds the optional plugin interface for exposing kubernetes backend gRPC clients.
plugin/external/adapter.go Implements KubernetesBackendClients() by checking the contract registry + Capabilities for infra.k8s_cluster.
module/platform_kubernetes.go Routes core types to in-process factories; routes non-core types to the plugin client registry and gRPC adapter.
module/platform_kubernetes_plugin_registry.go Adds the singleton registry to map cluster type → pb.ResourceDriverClient, with reserved-name protection.
module/platform_kubernetes_plugin_registry_test.go Tests registry behavior and PlatformKubernetes.Init() dispatch/errors for type: gke.
module/platform_kubernetes_grpc.go Adds the grpcKubernetesBackend adapter implementing the in-core kubernetesBackend interface over ResourceDriver.
module/platform_kubernetes_grpc_test.go Adds lifecycle/round-trip tests for plan/apply/status/destroy and JSON-bytes projection.
engine.go Registers plugin-provided kubernetes backend clients into the module registry during plugin load.

Comment on lines +238 to +241
cfg[k8sConfigKeyProjectID] = creds.ProjectID
}
if len(creds.ServiceAccountJSON) > 0 {
cfg[k8sConfigKeyServiceAccountJSON] = string(creds.ServiceAccountJSON)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in b94bea7. Verified by spec + code reviewers. The cross-PR FQN-double-wrap on Read/Delete (item #2's interaction with Task 22's realGKEClient.GetCluster) is a tracked follow-up on the gcp plugin branch — ships via the plugin-modules-on-iac plan.

Comment thread module/platform_kubernetes_grpc.go Outdated
Comment on lines +185 to +192
// cluster by — keyed on the cluster name and the infra.k8s_cluster type.
func (b *grpcKubernetesBackend) buildResourceRef(k *PlatformKubernetes) *pb.ResourceRef {
return &pb.ResourceRef{
Name: k.clusterName(),
Type: gkeResourceType,
}
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in b94bea7. Verified by spec + code reviewers. The cross-PR FQN-double-wrap on Read/Delete (item #2's interaction with Task 22's realGKEClient.GetCluster) is a tracked follow-up on the gcp plugin branch — ships via the plugin-modules-on-iac plan.

Comment thread module/platform_kubernetes_grpc.go Outdated
Comment on lines +249 to +252
// map→struct projection ADR 0037 assigns to Tasks 25/26. The adapter sets
// Provider="gke" itself and tolerates a missing/empty outputs_json.
func kubernetesClusterStateFromOutput(name string, out *pb.ResourceOutput) (*KubernetesClusterState, error) {
st := &KubernetesClusterState{Name: name, Provider: "gke", Status: "not-found"}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in b94bea7. Verified by spec + code reviewers. The cross-PR FQN-double-wrap on Read/Delete (item #2's interaction with Task 22's realGKEClient.GetCluster) is a tracked follow-up on the gcp plugin branch — ships via the plugin-modules-on-iac plan.

Comment on lines +101 to +103
if _, ok := kubernetesBackendClientRegistryInstance.resolve("gke"); ok {
t.Skip("a gke client is registered by a concurrent test; skipping the negative case")
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in b94bea7. Verified by spec + code reviewers. The cross-PR FQN-double-wrap on Read/Delete (item #2's interaction with Task 22's realGKEClient.GetCluster) is a tracked follow-up on the gcp plugin branch — ships via the plugin-modules-on-iac plan.

Comment on lines +9 to +13
// kubernetesBackend → ResourceDriver RPC
// plan → Read (probe existence, synthesize create|noop plan)
// apply → Create (AlreadyExists resolves to success)
// status → Read (project outputs_json onto KubernetesClusterState)
// destroy → Delete (NotFound resolves to success)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in b94bea7. Verified by spec + code reviewers. The cross-PR FQN-double-wrap on Read/Delete (item #2's interaction with Task 22's realGKEClient.GetCluster) is a tracked follow-up on the gcp plugin branch — ships via the plugin-modules-on-iac plan.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

❌ Patch coverage is 68.99563% with 71 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
module/platform_kubernetes_grpc.go 79.11% 20 Missing and 13 partials ⚠️
plugin/external/adapter.go 0.00% 27 Missing ⚠️
engine.go 0.00% 6 Missing and 1 partial ⚠️
module/platform_kubernetes.go 75.00% 2 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 15, 2026

⏱ Benchmark Results

No significant performance regressions detected.

benchstat comparison (baseline → PR)
## benchstat: baseline → PR
baseline-bench.txt:276: parsing iteration count: invalid syntax
baseline-bench.txt:396391: parsing iteration count: invalid syntax
baseline-bench.txt:711800: parsing iteration count: invalid syntax
baseline-bench.txt:1023330: parsing iteration count: invalid syntax
baseline-bench.txt:1395769: parsing iteration count: invalid syntax
baseline-bench.txt:1729349: parsing iteration count: invalid syntax
benchmark-results.txt:276: parsing iteration count: invalid syntax
benchmark-results.txt:250795: parsing iteration count: invalid syntax
benchmark-results.txt:503795: parsing iteration count: invalid syntax
benchmark-results.txt:719091: parsing iteration count: invalid syntax
benchmark-results.txt:1027357: parsing iteration count: invalid syntax
benchmark-results.txt:1296125: parsing iteration count: invalid syntax
goos: linux
goarch: amd64
pkg: github.com/GoCodeAlone/workflow/dynamic
cpu: AMD EPYC 7763 64-Core Processor                
                            │ benchmark-results.txt │
                            │        sec/op         │
InterpreterCreation-4                  9.591m ± 63%
ComponentLoad-4                        3.937m ±  4%
ComponentExecute-4                     2.135µ ±  1%
PoolContention/workers-1-4             1.162µ ±  1%
PoolContention/workers-2-4             1.162µ ±  3%
PoolContention/workers-4-4             1.161µ ±  2%
PoolContention/workers-8-4             1.156µ ±  1%
PoolContention/workers-16-4            1.165µ ±  2%
ComponentLifecycle-4                   3.976m ±  2%
SourceValidation-4                     2.568µ ±  1%
RegistryConcurrent-4                   837.8n ±  1%
LoaderLoadFromString-4                 4.139m ±  5%
geomean                                20.65µ

                            │ benchmark-results.txt │
                            │         B/op          │
InterpreterCreation-4                  2.027Mi ± 0%
ComponentLoad-4                        2.180Mi ± 0%
ComponentExecute-4                     1.203Ki ± 0%
PoolContention/workers-1-4             1.203Ki ± 0%
PoolContention/workers-2-4             1.203Ki ± 0%
PoolContention/workers-4-4             1.203Ki ± 0%
PoolContention/workers-8-4             1.203Ki ± 0%
PoolContention/workers-16-4            1.203Ki ± 0%
ComponentLifecycle-4                   2.183Mi ± 0%
SourceValidation-4                     1.984Ki ± 0%
RegistryConcurrent-4                   1.133Ki ± 0%
LoaderLoadFromString-4                 2.182Mi ± 0%
geomean                                15.25Ki

                            │ benchmark-results.txt │
                            │       allocs/op       │
InterpreterCreation-4                   15.68k ± 0%
ComponentLoad-4                         18.02k ± 0%
ComponentExecute-4                       25.00 ± 0%
PoolContention/workers-1-4               25.00 ± 0%
PoolContention/workers-2-4               25.00 ± 0%
PoolContention/workers-4-4               25.00 ± 0%
PoolContention/workers-8-4               25.00 ± 0%
PoolContention/workers-16-4              25.00 ± 0%
ComponentLifecycle-4                    18.07k ± 0%
SourceValidation-4                       32.00 ± 0%
RegistryConcurrent-4                     2.000 ± 0%
LoaderLoadFromString-4                  18.06k ± 0%
geomean                                  183.3

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                            │ baseline-bench.txt │
                            │       sec/op       │
InterpreterCreation-4               5.966m ± 55%
ComponentLoad-4                     3.401m ±  2%
ComponentExecute-4                  1.838µ ±  0%
PoolContention/workers-1-4          1.179µ ±  0%
PoolContention/workers-2-4          1.175µ ±  1%
PoolContention/workers-4-4          1.179µ ±  1%
PoolContention/workers-8-4          1.181µ ±  0%
PoolContention/workers-16-4         1.194µ ±  1%
ComponentLifecycle-4                3.473m ±  1%
SourceValidation-4                  2.322µ ±  1%
RegistryConcurrent-4                896.5n ±  3%
LoaderLoadFromString-4              3.489m ±  1%
geomean                             18.96µ

                            │ baseline-bench.txt │
                            │        B/op        │
InterpreterCreation-4               2.027Mi ± 0%
ComponentLoad-4                     2.180Mi ± 0%
ComponentExecute-4                  1.203Ki ± 0%
PoolContention/workers-1-4          1.203Ki ± 0%
PoolContention/workers-2-4          1.203Ki ± 0%
PoolContention/workers-4-4          1.203Ki ± 0%
PoolContention/workers-8-4          1.203Ki ± 0%
PoolContention/workers-16-4         1.203Ki ± 0%
ComponentLifecycle-4                2.183Mi ± 0%
SourceValidation-4                  1.984Ki ± 0%
RegistryConcurrent-4                1.133Ki ± 0%
LoaderLoadFromString-4              2.182Mi ± 0%
geomean                             15.25Ki

                            │ baseline-bench.txt │
                            │     allocs/op      │
InterpreterCreation-4                15.68k ± 0%
ComponentLoad-4                      18.02k ± 0%
ComponentExecute-4                    25.00 ± 0%
PoolContention/workers-1-4            25.00 ± 0%
PoolContention/workers-2-4            25.00 ± 0%
PoolContention/workers-4-4            25.00 ± 0%
PoolContention/workers-8-4            25.00 ± 0%
PoolContention/workers-16-4           25.00 ± 0%
ComponentLifecycle-4                 18.07k ± 0%
SourceValidation-4                    32.00 ± 0%
RegistryConcurrent-4                  2.000 ± 0%
LoaderLoadFromString-4               18.06k ± 0%
geomean                               183.3

pkg: github.com/GoCodeAlone/workflow/middleware
cpu: AMD EPYC 7763 64-Core Processor                
                                  │ benchmark-results.txt │
                                  │        sec/op         │
CircuitBreakerDetection-4                     321.6n ± 3%
CircuitBreakerExecution_Success-4             23.00n ± 1%
CircuitBreakerExecution_Failure-4             70.33n ± 0%
geomean                                       80.42n

                                  │ benchmark-results.txt │
                                  │         B/op          │
CircuitBreakerDetection-4                    144.0 ± 0%
CircuitBreakerExecution_Success-4            0.000 ± 0%
CircuitBreakerExecution_Failure-4            0.000 ± 0%
geomean                                                 ¹
¹ summaries must be >0 to compute geomean

                                  │ benchmark-results.txt │
                                  │       allocs/op       │
CircuitBreakerDetection-4                    1.000 ± 0%
CircuitBreakerExecution_Success-4            0.000 ± 0%
CircuitBreakerExecution_Failure-4            0.000 ± 0%
geomean                                                 ¹
¹ summaries must be >0 to compute geomean

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                  │ baseline-bench.txt │
                                  │       sec/op       │
CircuitBreakerDetection-4                  446.6n ± 0%
CircuitBreakerExecution_Success-4          59.64n ± 0%
CircuitBreakerExecution_Failure-4          64.72n ± 0%
geomean                                    119.9n

                                  │ baseline-bench.txt │
                                  │        B/op        │
CircuitBreakerDetection-4                 144.0 ± 0%
CircuitBreakerExecution_Success-4         0.000 ± 0%
CircuitBreakerExecution_Failure-4         0.000 ± 0%
geomean                                              ¹
¹ summaries must be >0 to compute geomean

                                  │ baseline-bench.txt │
                                  │     allocs/op      │
CircuitBreakerDetection-4                 1.000 ± 0%
CircuitBreakerExecution_Success-4         0.000 ± 0%
CircuitBreakerExecution_Failure-4         0.000 ± 0%
geomean                                              ¹
¹ summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/module
cpu: AMD EPYC 7763 64-Core Processor                
                                 │ benchmark-results.txt │
                                 │        sec/op         │
IaCStateBackend_InProcess-4                 334.7n ± 24%
IaCStateBackend_GRPC-4                      11.75m ±  4%
JQTransform_Simple-4                        861.6n ± 13%
JQTransform_ObjectConstruction-4            1.649µ ±  9%
JQTransform_ArraySelect-4                   4.544µ ± 20%
JQTransform_Complex-4                       47.11µ ±  8%
JQTransform_Throughput-4                    2.059µ ±  6%
SSEPublishDelivery-4                        71.09n ±  1%
geomean                                     4.522µ

                                 │ benchmark-results.txt │
                                 │         B/op          │
IaCStateBackend_InProcess-4                416.0 ±  0%
IaCStateBackend_GRPC-4                   5.668Mi ± 11%
JQTransform_Simple-4                     1.273Ki ±  0%
JQTransform_ObjectConstruction-4         1.773Ki ±  0%
JQTransform_ArraySelect-4                2.625Ki ±  0%
JQTransform_Complex-4                    16.22Ki ±  0%
JQTransform_Throughput-4                 1.984Ki ±  0%
SSEPublishDelivery-4                       0.000 ±  0%
geomean                                                ¹
¹ summaries must be >0 to compute geomean

                                 │ benchmark-results.txt │
                                 │       allocs/op       │
IaCStateBackend_InProcess-4                 2.000 ± 0%
IaCStateBackend_GRPC-4                     6.861k ± 0%
JQTransform_Simple-4                        10.00 ± 0%
JQTransform_ObjectConstruction-4            15.00 ± 0%
JQTransform_ArraySelect-4                   30.00 ± 0%
JQTransform_Complex-4                       324.0 ± 0%
JQTransform_Throughput-4                    17.00 ± 0%
SSEPublishDelivery-4                        0.000 ± 0%
geomean                                                ¹
¹ summaries must be >0 to compute geomean

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                 │ baseline-bench.txt │
                                 │       sec/op       │
IaCStateBackend_InProcess-4              344.2n ± 25%
IaCStateBackend_GRPC-4                   9.225m ±  2%
JQTransform_Simple-4                     701.2n ± 28%
JQTransform_ObjectConstruction-4         1.474µ ±  1%
JQTransform_ArraySelect-4                3.162µ ±  1%
JQTransform_Complex-4                    35.38µ ±  2%
JQTransform_Throughput-4                 1.798µ ±  1%
SSEPublishDelivery-4                     76.77n ±  2%
geomean                                  3.874µ

                                 │ baseline-bench.txt │
                                 │        B/op        │
IaCStateBackend_InProcess-4             416.0 ±  0%
IaCStateBackend_GRPC-4                5.629Mi ± 11%
JQTransform_Simple-4                  1.273Ki ±  0%
JQTransform_ObjectConstruction-4      1.773Ki ±  0%
JQTransform_ArraySelect-4             2.625Ki ±  0%
JQTransform_Complex-4                 16.22Ki ±  0%
JQTransform_Throughput-4              1.984Ki ±  0%
SSEPublishDelivery-4                    0.000 ±  0%
geomean                                             ¹
¹ summaries must be >0 to compute geomean

                                 │ baseline-bench.txt │
                                 │     allocs/op      │
IaCStateBackend_InProcess-4              2.000 ± 0%
IaCStateBackend_GRPC-4                  6.868k ± 0%
JQTransform_Simple-4                     10.00 ± 0%
JQTransform_ObjectConstruction-4         15.00 ± 0%
JQTransform_ArraySelect-4                30.00 ± 0%
JQTransform_Complex-4                    324.0 ± 0%
JQTransform_Throughput-4                 17.00 ± 0%
SSEPublishDelivery-4                     0.000 ± 0%
geomean                                             ¹
¹ summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/schema
cpu: AMD EPYC 7763 64-Core Processor                
                                    │ benchmark-results.txt │
                                    │        sec/op         │
SchemaValidation_Simple-4                      1.180µ ± 16%
SchemaValidation_AllFields-4                   1.748µ ±  9%
SchemaValidation_FormatValidation-4            1.694µ ±  1%
SchemaValidation_ManySchemas-4                 1.992µ ±  2%
geomean                                        1.624µ

                                    │ benchmark-results.txt │
                                    │         B/op          │
SchemaValidation_Simple-4                      0.000 ± 0%
SchemaValidation_AllFields-4                   0.000 ± 0%
SchemaValidation_FormatValidation-4            0.000 ± 0%
SchemaValidation_ManySchemas-4                 0.000 ± 0%
geomean                                                   ¹
¹ summaries must be >0 to compute geomean

                                    │ benchmark-results.txt │
                                    │       allocs/op       │
SchemaValidation_Simple-4                      0.000 ± 0%
SchemaValidation_AllFields-4                   0.000 ± 0%
SchemaValidation_FormatValidation-4            0.000 ± 0%
SchemaValidation_ManySchemas-4                 0.000 ± 0%
geomean                                                   ¹
¹ summaries must be >0 to compute geomean

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                    │ baseline-bench.txt │
                                    │       sec/op       │
SchemaValidation_Simple-4                   1.034µ ± 38%
SchemaValidation_AllFields-4                1.539µ ±  2%
SchemaValidation_FormatValidation-4         1.498µ ±  1%
SchemaValidation_ManySchemas-4              1.512µ ±  6%
geomean                                     1.378µ

                                    │ baseline-bench.txt │
                                    │        B/op        │
SchemaValidation_Simple-4                   0.000 ± 0%
SchemaValidation_AllFields-4                0.000 ± 0%
SchemaValidation_FormatValidation-4         0.000 ± 0%
SchemaValidation_ManySchemas-4              0.000 ± 0%
geomean                                                ¹
¹ summaries must be >0 to compute geomean

                                    │ baseline-bench.txt │
                                    │     allocs/op      │
SchemaValidation_Simple-4                   0.000 ± 0%
SchemaValidation_AllFields-4                0.000 ± 0%
SchemaValidation_FormatValidation-4         0.000 ± 0%
SchemaValidation_ManySchemas-4              0.000 ± 0%
geomean                                                ¹
¹ summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/store
cpu: AMD EPYC 7763 64-Core Processor                
                                   │ benchmark-results.txt │
                                   │        sec/op         │
EventStoreAppend_InMemory-4                   1.439µ ± 12%
EventStoreAppend_SQLite-4                     2.077m ±  8%
GetTimeline_InMemory/events-10-4              15.20µ ±  4%
GetTimeline_InMemory/events-50-4              69.57µ ± 18%
GetTimeline_InMemory/events-100-4             131.1µ ±  1%
GetTimeline_InMemory/events-500-4             687.7µ ±  2%
GetTimeline_InMemory/events-1000-4            1.396m ±  3%
GetTimeline_SQLite/events-10-4                116.7µ ±  3%
GetTimeline_SQLite/events-50-4                275.9µ ±  1%
GetTimeline_SQLite/events-100-4               486.1µ ±  4%
GetTimeline_SQLite/events-500-4               2.003m ±  7%
GetTimeline_SQLite/events-1000-4              3.947m ±  6%
geomean                                       246.0µ

                                   │ benchmark-results.txt │
                                   │         B/op          │
EventStoreAppend_InMemory-4                    783.0 ± 10%
EventStoreAppend_SQLite-4                    1.984Ki ±  3%
GetTimeline_InMemory/events-10-4             7.953Ki ±  0%
GetTimeline_InMemory/events-50-4             46.62Ki ±  0%
GetTimeline_InMemory/events-100-4            94.48Ki ±  0%
GetTimeline_InMemory/events-500-4            472.8Ki ±  0%
GetTimeline_InMemory/events-1000-4           944.3Ki ±  0%
GetTimeline_SQLite/events-10-4               16.74Ki ±  0%
GetTimeline_SQLite/events-50-4               87.14Ki ±  0%
GetTimeline_SQLite/events-100-4              175.4Ki ±  0%
GetTimeline_SQLite/events-500-4              846.1Ki ±  0%
GetTimeline_SQLite/events-1000-4             1.639Mi ±  0%
geomean                                      67.29Ki

                                   │ benchmark-results.txt │
                                   │       allocs/op       │
EventStoreAppend_InMemory-4                     7.000 ± 0%
EventStoreAppend_SQLite-4                       53.00 ± 0%
GetTimeline_InMemory/events-10-4                125.0 ± 0%
GetTimeline_InMemory/events-50-4                653.0 ± 0%
GetTimeline_InMemory/events-100-4              1.306k ± 0%
GetTimeline_InMemory/events-500-4              6.514k ± 0%
GetTimeline_InMemory/events-1000-4             13.02k ± 0%
GetTimeline_SQLite/events-10-4                  382.0 ± 0%
GetTimeline_SQLite/events-50-4                 1.852k ± 0%
GetTimeline_SQLite/events-100-4                3.681k ± 0%
GetTimeline_SQLite/events-500-4                18.54k ± 0%
GetTimeline_SQLite/events-1000-4               37.29k ± 0%
geomean                                        1.162k

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                   │ baseline-bench.txt │
                                   │       sec/op       │
EventStoreAppend_InMemory-4                1.137µ ±  4%
EventStoreAppend_SQLite-4                  914.5µ ±  3%
GetTimeline_InMemory/events-10-4           13.48µ ±  2%
GetTimeline_InMemory/events-50-4           75.18µ ±  2%
GetTimeline_InMemory/events-100-4          133.1µ ± 15%
GetTimeline_InMemory/events-500-4          601.5µ ±  2%
GetTimeline_InMemory/events-1000-4         1.233m ±  1%
GetTimeline_SQLite/events-10-4             81.73µ ±  1%
GetTimeline_SQLite/events-50-4             231.3µ ±  1%
GetTimeline_SQLite/events-100-4            417.9µ ±  1%
GetTimeline_SQLite/events-500-4            1.894m ±  0%
GetTimeline_SQLite/events-1000-4           3.716m ±  2%
geomean                                    205.8µ

                                   │ baseline-bench.txt │
                                   │        B/op        │
EventStoreAppend_InMemory-4                  834.5 ± 5%
EventStoreAppend_SQLite-4                  1.983Ki ± 2%
GetTimeline_InMemory/events-10-4           7.953Ki ± 0%
GetTimeline_InMemory/events-50-4           46.62Ki ± 0%
GetTimeline_InMemory/events-100-4          94.48Ki ± 0%
GetTimeline_InMemory/events-500-4          472.8Ki ± 0%
GetTimeline_InMemory/events-1000-4         944.3Ki ± 0%
GetTimeline_SQLite/events-10-4             16.74Ki ± 0%
GetTimeline_SQLite/events-50-4             87.14Ki ± 0%
GetTimeline_SQLite/events-100-4            175.4Ki ± 0%
GetTimeline_SQLite/events-500-4            846.1Ki ± 0%
GetTimeline_SQLite/events-1000-4           1.639Mi ± 0%
geomean                                    67.65Ki

                                   │ baseline-bench.txt │
                                   │     allocs/op      │
EventStoreAppend_InMemory-4                  7.000 ± 0%
EventStoreAppend_SQLite-4                    53.00 ± 0%
GetTimeline_InMemory/events-10-4             125.0 ± 0%
GetTimeline_InMemory/events-50-4             653.0 ± 0%
GetTimeline_InMemory/events-100-4           1.306k ± 0%
GetTimeline_InMemory/events-500-4           6.514k ± 0%
GetTimeline_InMemory/events-1000-4          13.02k ± 0%
GetTimeline_SQLite/events-10-4               382.0 ± 0%
GetTimeline_SQLite/events-50-4              1.852k ± 0%
GetTimeline_SQLite/events-100-4             3.681k ± 0%
GetTimeline_SQLite/events-500-4             18.54k ± 0%
GetTimeline_SQLite/events-1000-4            37.29k ± 0%
geomean                                     1.162k

Benchmarks run with go test -bench=. -benchmem -count=6.
Regressions ≥ 20% are flagged. Results compared via benchstat.

5 substantive Copilot comments on module/platform_kubernetes_grpc.go,
all addressed:

1. injectCredentials precedence — module config now wins; cloud-account
   creds only fill missing project_id / service_account_json keys.
   Mirrors the in-core gkeBackend's config-first precedence.
2. buildResourceRef.ProviderId — now populated with the fully-qualified
   GKE path projects/<project>/locations/<location>/clusters/<name>
   (GKE cluster names are not globally unique). gkeProject / gkeLocation
   helpers port the in-core resolution: config-first, cloud-account
   fallback.
3. kubernetesClusterStateFromOutput — call sites now pass k.name (the
   module name) instead of k.clusterName(); matches the in-core
   PlatformKubernetes.Init semantics where state.Name = m.name and is
   stable when clusterName differs.
4. TestPlatformKubernetes_GKEWithoutPluginErrors — replaced the
   nondeterministic t.Skip with deterministic mutex-guarded
   clear-and-restore of the registry entry.

Added tests locking each new behavior (module-config-first precedence,
fully-qualified ProviderId in all 3 resolution paths, state.Name=module
name when clusterName differs).

PR description (item 5) updated separately to match the implementation:
plan→Read / apply→Create-only per ADR 0037.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@intel352 intel352 merged commit 3cca363 into main May 15, 2026
25 checks passed
@intel352 intel352 deleted the feat/cloud-sdk-bcd-p9-gke-wiring branch May 15, 2026 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants