From b220ba69348ffbe05892cba78956de570b676206 Mon Sep 17 00:00:00 2001 From: Jon Langevin Date: Sat, 16 May 2026 17:00:29 -0400 Subject: [PATCH 1/2] feat(v2): declare ComputePlanVersion=v2 + workflow v0.54.0 + minEngine 0.54.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Phase 2 cascade per workflow#640 + ADR 0040: opt this plugin into the v2 action lifecycle contract. wfctl v0.54.0+ expects plugins declaring ComputePlanVersion="v2" to populate ApplyResult.Actions with one ActionResult per planned action and to never emit ACTION_STATUS_UNSPECIFIED or unknown wire tags. Per ADR 0024 + ADR 0040, plugins NOT declaring v2 are permanently incompatible with workflow v0.54.0+; there is no compat shim. Surface changes (4 files; minimal): - go.mod: pin workflow v0.53.0 → v0.54.0; go.sum refreshed via tidy - plugin.json: minEngineVersion 0.53.0 → 0.54.0 - internal/iacserver.go: gcpIaCServer.Capabilities return-struct literal adds ComputePlanVersion: "v2" (no signature, receiver, or parameter change) Rollback: cut v1.2.1 re-pinning workflow → v0.53.0 + dropping ComputePlanVersion="v2". Verification: - go mod tidy clean - GOWORK=off go build ./... clean - GOWORK=off go test ./... -race -count=1 → all PASS Co-Authored-By: Claude Opus 4.7 --- go.mod | 2 +- go.sum | 8 ++++---- internal/iacserver.go | 2 +- plugin.json | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 33b9e0e..d22c6e3 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( cloud.google.com/go/redis v1.18.3 cloud.google.com/go/run v1.15.0 cloud.google.com/go/storage v1.61.3 - github.com/GoCodeAlone/workflow v0.53.0 + github.com/GoCodeAlone/workflow v0.54.0 google.golang.org/api v0.272.0 google.golang.org/grpc v1.80.0 google.golang.org/protobuf v1.36.11 diff --git a/go.sum b/go.sum index b41d2da..0b6ac71 100644 --- a/go.sum +++ b/go.sum @@ -56,8 +56,8 @@ github.com/GoCodeAlone/modular/modules/jsonschema v1.15.0 h1:xb1mI4NZkzvNKQ2F6nk github.com/GoCodeAlone/modular/modules/jsonschema v1.15.0/go.mod h1:hhGouwAVsonmJ4Lain4jINZ9nZCoc9l9eF3BHbmR8eE= github.com/GoCodeAlone/modular/modules/reverseproxy/v2 v2.8.0 h1:cvdLHbM/vzvygQTcAWSJsy+dAPzzwWyjzKMmTBFcFIo= github.com/GoCodeAlone/modular/modules/reverseproxy/v2 v2.8.0/go.mod h1:/9ipMG4qM2CHQ14BfXKdVlYRJelef6M8MFI5TbZv67M= -github.com/GoCodeAlone/workflow v0.53.0 h1:+UjoWNHRB1aPiQfWJUltsXnZfupsqbGmItv9xZto4kY= -github.com/GoCodeAlone/workflow v0.53.0/go.mod h1:L1kIOZqebO1WPriHXcqT7bg/uS7pExR8pOrWvurqhR4= +github.com/GoCodeAlone/workflow v0.54.0 h1:8x5iVQ8di2BAAyr/uAD/PllTa1Sw9OFElMkje0onKB8= +github.com/GoCodeAlone/workflow v0.54.0/go.mod h1:RrmHdww6gAIUfyjJ7stz0fegxRmVGZvQ1FsuJ2F0C+U= github.com/GoCodeAlone/yaegi v0.17.2 h1:WK6Y6e0t1a6U7r+S2dN3CGWW1PizYD3zO0zneToZPxM= github.com/GoCodeAlone/yaegi v0.17.2/go.mod h1:z5Pr6Wse6QJcQvpgxTxzMAevFarH0N37TG88Y9dprx0= github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.32.0 h1:rIkQfkCOVKc1OiRCNcSDD8ml5RJlZbH/Xsq7lbpynwc= @@ -689,8 +689,8 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0 h1:88Y4s2C8oTui1LGM6bT go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0/go.mod h1:Vl1/iaggsuRlrHf/hfPJPvVag77kKyvrLeD10kpMl+A= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.43.0 h1:3iZJKlCZufyRzPzlQhUIWVmfltrXuGyfjREgGP3UUjc= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.43.0/go.mod h1:/G+nUPfhq2e+qiXMGxMwumDrP5jtzU+mWN7/sjT2rak= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.43.0 h1:TC+BewnDpeiAmcscXbGMfxkO+mwYUwE/VySwvw88PfA= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.43.0/go.mod h1:J/ZyF4vfPwsSr9xJSPyQ4LqtcTPULFR64KwTikGLe+A= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.40.0 h1:ZrPRak/kS4xI3AVXy8F7pipuDXmDsrO8Lg+yQjBLjw0= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.40.0/go.mod h1:3y6kQCWztq6hyW8Z9YxQDDm0Je9AJoFar2G0yDcmhRk= go.opentelemetry.io/otel/metric v1.43.0 h1:d7638QeInOnuwOONPp4JAOGfbCEpYb+K6DVWvdxGzgM= go.opentelemetry.io/otel/metric v1.43.0/go.mod h1:RDnPtIxvqlgO8GRW18W6Z/4P462ldprJtfxHxyKd2PY= go.opentelemetry.io/otel/sdk v1.43.0 h1:pi5mE86i5rTeLXqoF/hhiBtUNcrAGHLKQdhg4h4V9Dg= diff --git a/internal/iacserver.go b/internal/iacserver.go index a7b508d..c522903 100644 --- a/internal/iacserver.go +++ b/internal/iacserver.go @@ -122,7 +122,7 @@ func (s *gcpIaCServer) Capabilities(_ context.Context, _ *pb.CapabilitiesRequest Operations: append([]string(nil), c.Operations...), }) } - return &pb.CapabilitiesResponse{Capabilities: out}, nil + return &pb.CapabilitiesResponse{Capabilities: out, ComputePlanVersion: "v2"}, nil } func (s *gcpIaCServer) Plan(ctx context.Context, req *pb.PlanRequest) (*pb.PlanResponse, error) { diff --git a/plugin.json b/plugin.json index 1f1ecc1..7fb66c9 100644 --- a/plugin.json +++ b/plugin.json @@ -6,7 +6,7 @@ "type": "external", "tier": "community", "license": "MIT", - "minEngineVersion": "0.53.0", + "minEngineVersion": "0.54.0", "repository": "https://github.com/GoCodeAlone/workflow-plugin-gcp", "keywords": ["gcp", "google-cloud", "iac", "provider", "infrastructure"], "capabilities": { From e184d2a19fb727f5ee0ecc5e09410023d3ae7a4c Mon Sep 17 00:00:00 2001 From: Jon Langevin Date: Sat, 16 May 2026 17:15:26 -0400 Subject: [PATCH 2/2] test: pin ComputePlanVersion="v2" in Capabilities response Copilot's flag on PR #10 inline iacserver.go:125: the v2 contract signal isn't asserted in the existing Capabilities test coverage. Add TestGCPIaCServer_Capabilities_ComputePlanVersionV2 so a typo or accidental drop in internal/iacserver.go's return literal fails the test rather than slipping through. Co-Authored-By: Claude Opus 4.7 --- internal/iacserver_test.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/internal/iacserver_test.go b/internal/iacserver_test.go index 6f1b325..13ab8d5 100644 --- a/internal/iacserver_test.go +++ b/internal/iacserver_test.go @@ -59,6 +59,22 @@ func TestGCPIaCServer_Capabilities_HasContainerService(t *testing.T) { } } +// TestGCPIaCServer_Capabilities_ComputePlanVersionV2 pins the Phase 2 +// contract signal: the plugin MUST declare ComputePlanVersion="v2" so +// wfctl v0.54.0+ knows to expect populated ApplyResult.Actions. Per +// workflow#640 Phase 2 + ADR 0040. A typo or accidental drop in +// internal/iacserver.go Capabilities() return literal fails this test. +func TestGCPIaCServer_Capabilities_ComputePlanVersionV2(t *testing.T) { + s := NewIaCServer() + resp, err := s.Capabilities(context.Background(), &pb.CapabilitiesRequest{}) + if err != nil { + t.Fatalf("Capabilities: %v", err) + } + if got, want := resp.GetComputePlanVersion(), "v2"; got != want { + t.Errorf("ComputePlanVersion: got %q, want %q", got, want) + } +} + func TestGCPIaCServer_Initialize_MissingProjectID(t *testing.T) { s := NewIaCServer() _, err := s.Initialize(context.Background(), &pb.InitializeRequest{ConfigJson: []byte(`{}`)})