Skip to content

workflow#699: IaCProvider.Apply removal — design + plan + scope-lock (PR 1 of 10)#702

Merged
intel352 merged 22 commits into
mainfrom
feat/699-iac-provider-apply-removal-design
May 17, 2026
Merged

workflow#699: IaCProvider.Apply removal — design + plan + scope-lock (PR 1 of 10)#702
intel352 merged 22 commits into
mainfrom
feat/699-iac-provider-apply-removal-design

Conversation

@intel352
Copy link
Copy Markdown
Contributor

Summary

  • Design + implementation plan + locked manifest for workflow#699 (10-PR cascade across workflow + 4 IaC plugins + 4 registry manifests)
  • Per ADR 0024 compile-time-safety mandate — hard-delete IaCProvider.Apply from interface + proto
  • Pivots load-gate from parse-time plugin.json switch to load-time typed Capabilities RPC (eliminates need to backfill iacProvider.computePlanVersion in aws/gcp/azure plugin.jsons)

Pipeline gates passed

  • Brainstorming + design — 3 adversarial review cycles
  • writing-plans — 2 adversarial review cycles
  • alignment-check + scope-lock — PASS; manifest hash 237183aba334… recorded

Cascade overview (Scope Manifest)

PR Repo Scope
1 workflow rc1: proto + interface + load-gate + Makefile + iactest cleanup
2-5 plugin-{do,aws,gcp,azure} v2.0.0-rc1 (parallel)
6 workflow conformance matrix + v0.56.0 final
7-10 plugin-{do,aws,gcp,azure} + registry v2.0.0 + registry manifest

This PR commits the design + plan + scope-lock. Implementation commits (Tasks 1-9 per the plan) land on this branch in subsequent commits.

Design + plan

  • docs/plans/2026-05-17-iac-provider-apply-removal-design.md
  • docs/plans/2026-05-17-iac-provider-apply-removal.md
  • docs/plans/2026-05-17-iac-provider-apply-removal.md.scope-lock

Test plan

  • Tasks 1-9 execute per plan (TDD per task)
  • go build ./... && go vet ./... && go test ./... green at PR 1 task 9
  • CI lint guard fires on rpc Apply re-introduction
  • Tag v0.56.0-rc1 after merge

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings May 17, 2026 18:33
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

Adds the design document, detailed multi-PR implementation plan, and a scope-lock hash file for workflow#699’s cascade to hard-remove IaCProvider.Apply from the workflow engine and IaC plugin ecosystem (proto/interface removal + load-time Capabilities gate + follow-on plugin/registry changes).

Changes:

  • Introduces an implementation plan detailing a 10-PR cascade and task-by-task execution steps.
  • Adds an approved design writeup documenting the decision, assumptions, rollback, and sequencing.
  • Records a scope-lock hash intended to freeze the plan’s scope.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
docs/plans/2026-05-17-iac-provider-apply-removal.md.scope-lock Adds a scope-lock hash for the plan
docs/plans/2026-05-17-iac-provider-apply-removal.md Adds the detailed implementation plan for the 10-PR cascade
docs/plans/2026-05-17-iac-provider-apply-removal-design.md Adds the design/decision record for removing IaCProvider.Apply


**Architecture:** 10-PR coordinated cascade. PR 1 ships workflow `v0.56.0-rc1` (proto deletion + interface deletion + load-time Capabilities-RPC gate). PRs 2-5 ship plugin `v2.0.0-rc1` tags in parallel (drop Apply method + iacserver handler). PR 6 runs conformance matrix + tags `workflow v0.56.0`. PRs 7-10 ship plugin `v2.0.0` final tags + registry manifest bumps as fan-out from PR 6.

**Tech Stack:** Go 1.24, gRPC (buf for proto), GoReleaser v2, GoCodeAlone/modular framework. No new dependencies introduced.
Comment on lines +458 to +462
```bash
cd plugin/external/proto && buf generate && cd -
```

If `buf` is not installed: install per the existing project setup (see `CONTRIBUTING.md` or `Makefile` target `proto-gen`).

**Step 1: Add CI step**

Append to the test job in `.github/workflows/ci.yaml`:
@@ -0,0 +1 @@
237183aba33455a66d4c8d760096013c1ca31e14920b8f384ab3df654ad26083
@codecov
Copy link
Copy Markdown

codecov Bot commented May 17, 2026

Codecov Report

❌ Patch coverage is 84.84848% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/wfctl/deploy_providers.go 78.26% 5 Missing ⚠️

📢 Thoughts on this report? Let us know!

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 17, 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:272662: parsing iteration count: invalid syntax
baseline-bench.txt:730508: parsing iteration count: invalid syntax
baseline-bench.txt:1056039: parsing iteration count: invalid syntax
baseline-bench.txt:1371097: parsing iteration count: invalid syntax
baseline-bench.txt:1649999: parsing iteration count: invalid syntax
benchmark-results.txt:274: parsing iteration count: invalid syntax
benchmark-results.txt:345617: parsing iteration count: invalid syntax
benchmark-results.txt:674247: parsing iteration count: invalid syntax
benchmark-results.txt:971284: parsing iteration count: invalid syntax
benchmark-results.txt:1297172: parsing iteration count: invalid syntax
benchmark-results.txt:1622010: parsing iteration count: invalid syntax
goos: linux
goarch: amd64
pkg: github.com/GoCodeAlone/workflow/dynamic
cpu: AMD EPYC 7763 64-Core Processor                
                            │ baseline-bench.txt │
                            │       sec/op       │
InterpreterCreation-4               7.878m ± 61%
ComponentLoad-4                     3.576m ±  2%
ComponentExecute-4                  1.966µ ±  2%
PoolContention/workers-1-4          1.101µ ±  2%
PoolContention/workers-2-4          1.093µ ±  3%
PoolContention/workers-4-4          1.084µ ±  0%
PoolContention/workers-8-4          1.087µ ±  0%
PoolContention/workers-16-4         1.092µ ±  2%
ComponentLifecycle-4                3.585m ±  1%
SourceValidation-4                  2.333µ ±  1%
RegistryConcurrent-4                793.8n ±  3%
LoaderLoadFromString-4              3.694m ±  1%
geomean                             18.92µ

                            │ 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

cpu: AMD EPYC 9V74 80-Core Processor                
                            │ benchmark-results.txt │
                            │        sec/op         │
InterpreterCreation-4                  6.444m ± 57%
ComponentLoad-4                        3.485m ±  2%
ComponentExecute-4                     1.843µ ±  0%
PoolContention/workers-1-4             1.021µ ±  2%
PoolContention/workers-2-4             1.032µ ±  1%
PoolContention/workers-4-4             1.025µ ±  2%
PoolContention/workers-8-4             1.006µ ±  1%
PoolContention/workers-16-4            1.014µ ±  3%
ComponentLifecycle-4                   3.494m ±  1%
SourceValidation-4                     2.071µ ±  1%
RegistryConcurrent-4                   729.1n ±  7%
LoaderLoadFromString-4                 3.541m ±  0%
geomean                                17.54µ

                            │ 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

pkg: github.com/GoCodeAlone/workflow/middleware
cpu: AMD EPYC 7763 64-Core Processor                
                                  │ baseline-bench.txt │
                                  │       sec/op       │
CircuitBreakerDetection-4                  287.3n ± 0%
CircuitBreakerExecution_Success-4          21.53n ± 0%
CircuitBreakerExecution_Failure-4          66.39n ± 0%
geomean                                    74.33n

                                  │ 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

cpu: AMD EPYC 9V74 80-Core Processor                
                                  │ benchmark-results.txt │
                                  │        sec/op         │
CircuitBreakerDetection-4                     296.0n ± 4%
CircuitBreakerExecution_Success-4             22.66n ± 3%
CircuitBreakerExecution_Failure-4             70.94n ± 0%
geomean                                       78.06n

                                  │ 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

pkg: github.com/GoCodeAlone/workflow/module
cpu: AMD EPYC 7763 64-Core Processor                
                                 │ baseline-bench.txt │
                                 │       sec/op       │
IaCStateBackend_InProcess-4              312.8n ± 28%
IaCStateBackend_GRPC-4                   9.560m ±  3%
JQTransform_Simple-4                     691.7n ± 34%
JQTransform_ObjectConstruction-4         1.523µ ±  2%
JQTransform_ArraySelect-4                3.460µ ±  1%
JQTransform_Complex-4                    40.21µ ±  1%
JQTransform_Throughput-4                 1.857µ ±  1%
SSEPublishDelivery-4                     64.72n ±  1%
geomean                                  3.892µ

                                 │ baseline-bench.txt │
                                 │        B/op        │
IaCStateBackend_InProcess-4              416.0 ± 0%
IaCStateBackend_GRPC-4                 5.851Mi ± 9%
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.846k ± 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: AMD EPYC 9V74 80-Core Processor                
                                 │ benchmark-results.txt │
                                 │        sec/op         │
IaCStateBackend_InProcess-4                 303.4n ± 17%
IaCStateBackend_GRPC-4                      10.09m ±  1%
JQTransform_Simple-4                        617.0n ± 35%
JQTransform_ObjectConstruction-4            1.424µ ±  0%
JQTransform_ArraySelect-4                   3.437µ ±  0%
JQTransform_Complex-4                       41.22µ ±  1%
JQTransform_Throughput-4                    1.740µ ±  0%
SSEPublishDelivery-4                        64.14n ±  6%
geomean                                     3.789µ

                                 │ benchmark-results.txt │
                                 │         B/op          │
IaCStateBackend_InProcess-4                416.0 ±  0%
IaCStateBackend_GRPC-4                   5.760Mi ± 10%
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.857k ± 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                
                                    │ baseline-bench.txt │
                                    │       sec/op       │
SchemaValidation_Simple-4                   1.114µ ± 20%
SchemaValidation_AllFields-4                1.672µ ±  3%
SchemaValidation_FormatValidation-4         1.590µ ±  1%
SchemaValidation_ManySchemas-4              1.878µ ±  3%
geomean                                     1.536µ

                                    │ 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

cpu: AMD EPYC 9V74 80-Core Processor                
                                    │ benchmark-results.txt │
                                    │        sec/op         │
SchemaValidation_Simple-4                      1.078µ ± 28%
SchemaValidation_AllFields-4                   1.616µ ±  7%
SchemaValidation_FormatValidation-4            1.570µ ±  2%
SchemaValidation_ManySchemas-4                 1.593µ ±  2%
geomean                                        1.444µ

                                    │ 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

pkg: github.com/GoCodeAlone/workflow/store
cpu: AMD EPYC 7763 64-Core Processor                
                                   │ baseline-bench.txt │
                                   │       sec/op       │
EventStoreAppend_InMemory-4                1.167µ ± 13%
EventStoreAppend_SQLite-4                  1.364m ±  4%
GetTimeline_InMemory/events-10-4           13.90µ ±  4%
GetTimeline_InMemory/events-50-4           78.47µ ± 19%
GetTimeline_InMemory/events-100-4          128.4µ ±  1%
GetTimeline_InMemory/events-500-4          659.6µ ±  0%
GetTimeline_InMemory/events-1000-4         1.346m ±  1%
GetTimeline_SQLite/events-10-4             109.6µ ±  4%
GetTimeline_SQLite/events-50-4             255.1µ ±  1%
GetTimeline_SQLite/events-100-4            437.0µ ±  1%
GetTimeline_SQLite/events-500-4            1.863m ±  2%
GetTimeline_SQLite/events-1000-4           3.594m ±  0%
geomean                                    224.3µ

                                   │ baseline-bench.txt │
                                   │        B/op        │
EventStoreAppend_InMemory-4                  798.5 ± 7%
EventStoreAppend_SQLite-4                  1.985Ki ± 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.41Ki

                                   │ 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

cpu: AMD EPYC 9V74 80-Core Processor                
                                   │ benchmark-results.txt │
                                   │        sec/op         │
EventStoreAppend_InMemory-4                   1.151µ ± 17%
EventStoreAppend_SQLite-4                     1.021m ±  3%
GetTimeline_InMemory/events-10-4              12.62µ ±  4%
GetTimeline_InMemory/events-50-4              69.01µ ± 20%
GetTimeline_InMemory/events-100-4             110.2µ ±  0%
GetTimeline_InMemory/events-500-4             563.0µ ±  1%
GetTimeline_InMemory/events-1000-4            1.139m ±  1%
GetTimeline_SQLite/events-10-4                83.38µ ±  1%
GetTimeline_SQLite/events-50-4                217.9µ ±  0%
GetTimeline_SQLite/events-100-4               382.0µ ±  1%
GetTimeline_SQLite/events-500-4               1.654m ±  0%
GetTimeline_SQLite/events-1000-4              3.204m ±  0%
geomean                                       192.9µ

                                   │ benchmark-results.txt │
                                   │         B/op          │
EventStoreAppend_InMemory-4                     764.0 ± 2%
EventStoreAppend_SQLite-4                     1.985Ki ± 1%
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.16Ki

                                   │ 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

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

intel352 added 10 commits May 17, 2026 14:50
…orkflow#699 PR 1 task 1 fixup)

Addresses code-reviewer Important findings 1-5 on Task 1 (commit 1df2231):
1. printDriftReportIfAny godoc — was 'NOT yet by any production caller';
   now documents production drift-surfacing path on v2-only dispatch.
2. applyWithProviderAndStore godoc — was 'executes it via provider.Apply';
   now names wfctlhelpers.ApplyPlanWithHooks + hooks-based persistence.
3. applyFromPrecomputedPlan godoc — was 'calls provider.Apply for each
   group'; now points at applyPrecomputedPlanWithStore.
4. applyPrecomputedPlanWithStore godoc — was 'executes via provider.Apply';
   now names wfctlhelpers.ApplyPlanWithHooks + parity with sibling helper.
5. Twin inline comments at runInfraApply + applyPrecomputedPlanWithStore —
   was 'Provider.Apply can surface a top-level error'; now names
   applyV2ApplyPlanWithHooksFn and enumerates the failure sources.
…sult; CI lint guard (workflow#699 PR 1 task 5)
… load gate (workflow#699 PR 1 task 4 fixup)

Addresses code-reviewer Task-4 findings on commit a081d4a:

Critical: requiredOnlyServer in discover_typed_loader_test.go inherited
UnimplementedIaCProviderRequiredServer's Capabilities default. Post-Task-6
(when the missing-Apply cascade resolves and CI compiles this package),
TestDiscoverAndLoadIaCProvider_ReturnsTypedClient would have failed
because the new gate would receive code.Unimplemented from the stub.

Fix: add Capabilities method to requiredOnlyServer returning a configurable
ComputePlanVersion (default "v2" → accept). startInProcessTypedServer now
takes the cpv as a param so per-test variants can flip between accept/reject.

Important: TestDiscoverAndLoadIaCProvider_LoadGate_WiredIntoDiscovery exercised
the enforceCapabilitiesV2Gate var-seam directly — not the wiring through
buildTypedIaCAdapterFrom. A refactor that removed the gate call site would
have left the test green.

Fix: new TestBuildTypedIaCAdapterFrom_LoadGate_RejectsV1Plugin drives a v1
plugin through the full buildTypedIaCAdapterFrom chain (Conn / ContractRegistry
/ newTypedIaCAdapter / Initialize / gate) and asserts the operator-facing
workflow#699 error. Renamed the existing helper-only test to
TestEnforceCapabilitiesV2Gate_HelperBehavior with honest framing.
…task 6)

Resolves the intermediate "missing method Apply" cascade that Task 2
introduced when typedIaCAdapter.Apply was deleted. From task-2 commit
(625de5b) through task-5 commit (c231daf), `go build ./cmd/wfctl/` and
`go vet ./cmd/wfctl/...` failed at ~8 type-assertion / interface-
assignment sites because the IaCProvider interface still declared Apply
while no implementer (in-process stubs OR the typed adapter) carried
the method. This is by design — the plan sequences proto + adapter +
helper deletions BEFORE the interface trim so each layer's removal is
self-contained and reviewable. Bisecting commits 625de5b..c231daf
will encounter the cascade; the resolution lands here.

Plan reference: docs/plans/2026-05-17-iac-provider-apply-removal.md
Task 6 + Task 2 commit body ("compile may not be green yet — sequential
PR within single branch").
…1 task 8)

Multi-file v1-cleanup pass:

- iac/iactest/fakeprovider.go — delete DispatchVersion field + the now-orphaned
  ComputePlanVersion method (ComputePlanVersionDeclarer is gone with Task 3).
- plugin/sdk/manifest.go — delete EffectiveComputePlanVersion accessor (cycle-2
  N7: post-cutover "v1" is not a valid runtime value; authoritative gate is
  the typed CapabilitiesResponse check in deploy_providers.go).
- plugin/external/proto/iac_proto_test.go — delete TestApplyResultActionsRoundTrip
  (uses deleted pb.ApplyResult/ActionResult); update iacRequiredMethodsCheck
  interface to drop Apply method.
- cmd/wfctl/{infra_apply_allow_replace,plan,v2}_test.go +
  iac/conformance/scenarios_test.go — drop DispatchVersion: "v2" literals (the
  field is gone).
- cmd/wfctl/infra_apply_v2_loader_test.go + infra_apply_jit_loader_test.go —
  delete the now-undefined  assertions
  + the obsolete ComputePlanVersion+Apply methods on the loader-seam stubs.
- cmd/wfctl/infra_apply_v2_test.go — delete TestApplyWithProviderAndStore_V1FallsThroughToProviderApply
  + TestApplyWithProviderAndStore_V1Path_DeclarerReturnsEmpty + v1RecordingProvider
  + dead ComputePlanVersion method on v2DriverProvider.
- cmd/wfctl/infra_apply_plan_test.go — rewrite TestInfraApplyConsumesPlan to capture
  the plan via applyV2ApplyPlanWithHooksFn seam; delete TestInfraApplyPrecomputedPlan_PersistsState
  + TestInfraApplyPrecomputedPlan_FailedDeleteKeepsState + applyCaptureFull (v1-dispatch-
  specific; v2 equivalent covered by TestInfraApplyPrecomputedPlan_V2PersistsStateThroughHooks).
- cmd/wfctl/plugin_audit_iac_test.go — drop "IaCProvider.Apply" from classifier
  test data (no post-cutover plugin can advertise this).
- cmd/wfctl/deploy_providers.go — reword stale wfctlhelpers.DispatchVersion
  comments in findIaCPluginDir (deferred from Task 3 — comment-only).
- interfaces/iac_state.go + iac_state_test.go + iac/wfctlhelpers/apply.go +
  plugin/external/proto/iac_proto_test.go — reword stale godoc references to
  deleted pb.ActionResult / applyResultFromPB (per code-reviewer Task 5
  Minor advisories).

Test seam (installAsV2Dispatch) added to applyCapture / stateReturningProvider /
sizingCapture / applyFailProvider / plainFailProvider / recordingProvider /
readBackedFailingApplyProvider so v1-era tests can route through the v2
dispatch seam to the type's preserved .Apply method + synthesize the
OnResourceApplied/OnResourceDeleted/OnPlanComplete hook lifecycle for
state-persistence assertions.

Build + vet + full test suite green. The intentional nested go-test failure
(TestRunCIRunTestFallsBackToGoTestWhenNoConfiguredTests's inner TestFallbackRuns)
remains as designed — outer test asserts that fallback path errors.

Parallel cascade narrative (per code-reviewer Task 5 Minor advisory): commits
c231daf (Task 5) → 33f35da (Task 6) left plugin/external/proto/iac_proto_test.go
in a non-compiling state due to references to deleted pb.ApplyResult /
pb.ActionResult / pb.ApplyRequest. Same shape as the cmd/wfctl Task-2 cascade
(see commit 33f35da body); resolved by this commit.
…G (workflow#699 PR 1 task 9)

Final PR-1 task — closes the IaCProvider.Apply hard-removal sequence:

- cmd/iac-codemod/ — entire directory deleted (10 files: main.go, lint.go,
  refactor_apply.go, refactor_plan.go, add_validate_plan.go, main_test.go,
  lint_test.go, refactor_apply_test.go, refactor_plan_test.go,
  add_validate_plan_test.go). The codemod's reason-to-exist (migrate v1
  Apply impls to v2 wfctlhelpers.ApplyPlan delegation) evaporated when
  IaCProvider.Apply was removed from the interface + proto in Tasks 5+6.
- Makefile — deleted .PHONY entries build-iac-codemod + migrate-providers,
  the build-iac-codemod target, the migrate-providers target block, AWS/GCP/
  AZURE override variables, and the iac-codemod entry in the clean rule.
  grep -c iac-codemod Makefile = 0 after edit.
- CHANGELOG.md — Unreleased breaking-changes entry covering interface
  deletion, proto deletion, wfctlhelpers/dispatch deletion, codemod deletion,
  EffectiveComputePlanVersion deletion, load-time gate, CI lint guard, and
  minimum plugin versions (aws/gcp/azure/digitalocean v2.0.0+).
- docs/migrations/2026-05-16-v2-lifecycle-phase1-inventory.md — strike
  iac-codemod tool-references section as completed-and-removed; reference
  workflow#699 supersession.

Pre-merge gate GREEN:
- go build ./...  → clean
- go vet ./...    → clean (modernization hints only)
- go test ./...   → all suites pass (except the intentional nested
  go-test failure in TestRunCIRunTestFallsBackToGoTestWhenNoConfiguredTests
  which the outer test asserts must fail).

This completes the workflow#699 PR 1 cascade resolution. The branch is
ready for v0.56.0-rc1 tag after merge.
Copilot AI review requested due to automatic review settings May 17, 2026 20:15
@intel352
Copy link
Copy Markdown
Contributor Author

Implementation complete — all 9 PR-1 tasks shipped

Background team 699-pr1-rc1 executed all 9 tasks with two-stage review (spec compliance + code quality). 2 fixup cycles during review (Task 1 godoc drift, Task 4 wiring-test). All Critical findings closed.

Cascade summary

Task Commit Notes
1 1df2231b + 5f0466ec (fixup) Collapse v1/v2 apply dispatch + 5 godoc rewrites
2 625de5ba Delete typedIaCAdapter.Apply + ComputePlanVersion + applyResultFromPB (-335 LOC)
3 4c038421 Delete wfctlhelpers/dispatch.go (-59 LOC)
4 a081d4a2 + 75bcbd5b (fixup) Load-gate bounded ctx + cache-bypass + wiring test
5 c231daf1 Delete rpc Apply + 4 messages + Makefile guard (-1243 LOC)
6 33f35da8 Delete IaCProvider.Apply interface method
7 5e586c0f SDK type-assert docs (auto-tighten verified)
8 049a9202 Test cleanup + v2-seam refactor (19 files, -419 LOC net)
9 6c804e2f Delete cmd/iac-codemod + Makefile cleanup + CHANGELOG (-8125 LOC)

Pre-merge verification (per Task 9)

  • go build ./... — green
  • go vet ./... — green
  • go test ./... — green

Cross-cutting prereqs (completed during execution)

  • gcp sync-plugin-version followup filed: workflow-plugin-gcp#14
  • A1 re-verified: all 4 plugins declare ComputePlanVersion="v2" in iacserver.go
  • Worktree inventory: 22 orphan dirs under _worktrees/ (not git-managed); not blocking

Next steps

  1. Merge this PR → tag v0.56.0-rc1
  2. Open PRs 2-5 (plugin rc1 tags, parallel)
  3. Open PR 6 (workflow conformance + v0.56.0 final)
  4. Open PRs 7-10 (plugin final tags + registry manifests, parallel)

Plan lives at docs/plans/2026-05-17-iac-provider-apply-removal.md; scope locked (sha256=237183aba334…).

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

Copilot reviewed 46 out of 47 changed files in this pull request and generated 4 comments.

Comment thread Makefile Outdated
Comment on lines +48 to +53
@if grep -qE '^\s*rpc Apply\s*\(' plugin/external/proto/iac.proto; then \
echo "workflow#699: rpc Apply re-introduced in iac.proto; see decisions/0024-iac-typed-force-cutover.md"; \
exit 1; \
else \
echo "workflow#699 guard: rpc Apply correctly absent"; \
fi
Comment thread cmd/wfctl/infra_apply_v2_only_test.go Outdated
Comment on lines +10 to +26
// TestInfraApply_V2OnlyDispatch_NoV1Branch asserts runInfraApply collapses
// to a single v2-only dispatch after workflow#699 removes provider.Apply.
// The presence of any conditional branch on a v1-vs-v2 selector is a
// regression: per ADR 0024, v2 is the only supported dispatch.
func TestInfraApply_V2OnlyDispatch_NoV1Branch(t *testing.T) {
t.Run("collapses dispatch when typedIaCAdapter declares no ComputePlanVersion method", func(t *testing.T) {
// stub provider satisfies the trimmed interfaces.IaCProvider
// (no Apply method) and has no ComputePlanVersion declarer.
// runInfraApply MUST route through wfctlhelpers.ApplyPlanWithHooks
// and MUST NOT type-assert against a v1 dispatch.
var p interfaces.IaCProvider = &stubV2OnlyProvider{}
if _, ok := p.(interface {
Apply(context.Context, *interfaces.IaCPlan) (*interfaces.ApplyResult, error)
}); ok {
t.Fatalf("provider unexpectedly satisfies legacy Apply interface")
}
})
Comment thread cmd/wfctl/infra_apply_v2_test.go Outdated
Comment on lines 58 to 67
@@ -67,8 +67,7 @@ func TestApplyWithProviderAndStore_PassesLiveProviderToComputePlan(t *testing.T)
// surfaced via the optional ComputePlanVersionDeclarer interface).
Comment thread cmd/wfctl/deploy_providers.go Outdated
case "":
log.Printf("plugin %q: deprecation — manifest iacProvider.computePlanVersion is empty; declare \"v2\" explicitly (workflow#699)", pName)
case "v1":
log.Printf("plugin %q: deprecation — manifest iacProvider.computePlanVersion=\"v1\"; load-time gate will reject this (workflow#699)", pName)
golang.org/x/tools demoted to indirect after cmd/iac-codemod deletion
removed the direct dependency.
… clarity

4 material findings:
- Makefile lint guard: \s is non-portable in POSIX ERE (BSD/busybox grep
  treats it as literal s); switch to [[:space:]] so the workflow#699
  re-introduction guard fires correctly on every CI host.
- deploy_providers.go:230,232 deprecation logs: clarify that runtime
  enforcement reads typed CapabilitiesResponse, not the manifest field
  (out-of-date manifest with v2 in Capabilities will still load).
- infra_apply_v2_test.go:58-67: rewrite stale godoc that still described
  the deleted v1-vs-v2 manifest-driven dispatch decision; describe the
  current v2-only path + load-time enforcement.
- infra_apply_v2_only_test.go: clarify the test's role as structural
  tripwire vs the runtime apply-path coverage in
  TestApplyWithProviderAndStore_V2RoutesThroughWfctlhelpers.
Copilot AI review requested due to automatic review settings May 17, 2026 21:45
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

Copilot reviewed 47 out of 48 changed files in this pull request and generated 3 comments.

Comment on lines 126 to +130
// Until the follow-up: callers receive the value but discard it. The raw
// string is unconstrained — schema-validated values are {"", "v1", "v2"}
// per wfctlhelpers.DispatchVersionV2, but this loader path performs only
// minimal json.Unmarshal so MUST NOT assume.
// string is unconstrained — SDK schema-validated values are {"", "v1",
// "v2"}, but this loader path performs only minimal json.Unmarshal so
// MUST NOT assume. Per workflow#699, the authoritative gate is the
// typed CapabilitiesResponse check in discoverAndLoadIaCProvider.
Comment on lines +12 to +14
// declares Apply. If any implementation accidentally re-adds an Apply
// method that satisfies the legacy v1 dispatch signature, this test
// fires.
Comment on lines +56 to +76
// installAsV2Dispatch substitutes the global applyV2ApplyPlanWithHooksFn
// seam so the test's call to applyInfraModules / applyWithProviderAndStore /
// applyPrecomputedPlanWithStore routes through this stub's Apply method
// instead of the real wfctlhelpers.ApplyPlanWithHooks (which would
// dispatch per-action via ResourceDriver, a layer most v1-era tests don't
// stub). Also fires the appropriate OnResourceApplied / OnResourceDeleted
// hooks for each plan action so state-persistence assertions still pass
// without the per-action driver layer. Auto-restored on test cleanup.
// Per workflow#699 fixup.
func (f *applyCapture) installAsV2Dispatch(t testing.TB) {
t.Helper()
orig := applyV2ApplyPlanWithHooksFn
applyV2ApplyPlanWithHooksFn = func(ctx context.Context, p interfaces.IaCProvider, plan *interfaces.IaCPlan, hooks wfctlhelpers.ApplyPlanHooks) (*interfaces.ApplyResult, error) {
result, err := f.Apply(ctx, plan)
if hookErr := fireSyntheticHooks(ctx, p, plan, hooks, result); hookErr != nil && err == nil {
err = hookErr
}
return result, err
}
t.Cleanup(func() { applyV2ApplyPlanWithHooksFn = orig })
}
@intel352 intel352 merged commit 0ead9de into main May 17, 2026
29 of 32 checks passed
@intel352 intel352 deleted the feat/699-iac-provider-apply-removal-design branch May 17, 2026 21:57
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