Skip to content

feat: add typed IaC requirement protocol#777

Merged
intel352 merged 15 commits into
mainfrom
feat/iac-requirement-proto
May 25, 2026
Merged

feat: add typed IaC requirement protocol#777
intel352 merged 15 commits into
mainfrom
feat/iac-requirement-proto

Conversation

@intel352
Copy link
Copy Markdown
Contributor

Summary

  • add strict-proto IaC requirement discovery and provider requirement mapper services
  • add typed Workflow requirement model plus module satisfies metadata and manifest v2 parsing
  • add requirement discovery from config shape, manifest v2, in-process providers, and generated external discovery clients

Verification

  • GOWORK=off go test ./config ./iac/requirements ./plugin/external/proto ./plugin/external/sdk ./plugin/external ./cmd/wfctl -count=1
  • GOWORK=off go vet ./config ./iac/requirements ./plugin/external/... ./cmd/wfctl

Strict proto compatibility

  • IaC requirement protocol uses concrete typed messages and enums.
  • Tests guard against loose payload types like google.protobuf.Struct and google.protobuf.Any.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 25, 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:340219: parsing iteration count: invalid syntax
baseline-bench.txt:610181: parsing iteration count: invalid syntax
baseline-bench.txt:886359: parsing iteration count: invalid syntax
baseline-bench.txt:1161706: parsing iteration count: invalid syntax
baseline-bench.txt:1448876: parsing iteration count: invalid syntax
benchmark-results.txt:278: parsing iteration count: invalid syntax
benchmark-results.txt:437091: parsing iteration count: invalid syntax
benchmark-results.txt:782128: parsing iteration count: invalid syntax
benchmark-results.txt:1153361: parsing iteration count: invalid syntax
benchmark-results.txt:1592517: parsing iteration count: invalid syntax
benchmark-results.txt:1974985: parsing iteration count: invalid syntax
goos: linux
goarch: amd64
pkg: github.com/GoCodeAlone/workflow/dynamic
cpu: AMD EPYC 9V74 80-Core Processor                
                            │ baseline-bench.txt │        benchmark-results.txt         │
                            │       sec/op       │    sec/op      vs base               │
InterpreterCreation-4               9.096m ± 67%   3.953m ± 109%        ~ (p=0.132 n=6)
ComponentLoad-4                     3.537m ±  1%   2.717m ±   5%  -23.20% (p=0.002 n=6)
ComponentExecute-4                  1.829µ ±  2%   1.405µ ±   2%  -23.16% (p=0.002 n=6)
PoolContention/workers-1-4         1037.0n ±  3%   777.7n ±   2%  -25.01% (p=0.002 n=6)
PoolContention/workers-2-4         1019.0n ±  1%   777.1n ±   1%  -23.74% (p=0.002 n=6)
PoolContention/workers-4-4         1020.5n ±  2%   777.9n ±   3%  -23.77% (p=0.002 n=6)
PoolContention/workers-8-4         1033.0n ±  1%   793.1n ±   2%  -23.22% (p=0.002 n=6)
PoolContention/workers-16-4        1044.0n ±  3%   778.0n ±   1%  -25.48% (p=0.002 n=6)
ComponentLifecycle-4                3.667m ±  1%   2.704m ±   1%  -26.24% (p=0.002 n=6)
SourceValidation-4                  2.119µ ±  1%   1.618µ ±   2%  -23.65% (p=0.002 n=6)
RegistryConcurrent-4                755.6n ±  5%   577.3n ±   4%  -23.60% (p=0.002 n=6)
LoaderLoadFromString-4              3.960m ±  2%   2.811m ±   4%  -29.01% (p=0.002 n=6)
geomean                             18.48µ         13.32µ         -27.96%

                            │ baseline-bench.txt │        benchmark-results.txt         │
                            │        B/op        │     B/op      vs base                │
InterpreterCreation-4               2.027Mi ± 0%   2.027Mi ± 0%       ~ (p=0.195 n=6)
ComponentLoad-4                     2.180Mi ± 0%   2.180Mi ± 0%       ~ (p=0.848 n=6)
ComponentExecute-4                  1.203Ki ± 0%   1.203Ki ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-1-4          1.203Ki ± 0%   1.203Ki ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-2-4          1.203Ki ± 0%   1.203Ki ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-4-4          1.203Ki ± 0%   1.203Ki ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-8-4          1.203Ki ± 0%   1.203Ki ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-16-4         1.203Ki ± 0%   1.203Ki ± 0%       ~ (p=1.000 n=6) ¹
ComponentLifecycle-4                2.183Mi ± 0%   2.183Mi ± 0%       ~ (p=0.288 n=6)
SourceValidation-4                  1.984Ki ± 0%   1.984Ki ± 0%       ~ (p=1.000 n=6) ¹
RegistryConcurrent-4                1.133Ki ± 0%   1.133Ki ± 0%       ~ (p=1.000 n=6) ¹
LoaderLoadFromString-4              2.182Mi ± 0%   2.182Mi ± 0%  -0.00% (p=0.032 n=6)
geomean                             15.25Ki        15.25Ki       -0.00%
¹ all samples are equal

                            │ baseline-bench.txt │        benchmark-results.txt        │
                            │     allocs/op      │  allocs/op   vs base                │
InterpreterCreation-4                15.68k ± 0%   15.68k ± 0%       ~ (p=1.000 n=6)
ComponentLoad-4                      18.02k ± 0%   18.02k ± 0%       ~ (p=1.000 n=6)
ComponentExecute-4                    25.00 ± 0%    25.00 ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-1-4            25.00 ± 0%    25.00 ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-2-4            25.00 ± 0%    25.00 ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-4-4            25.00 ± 0%    25.00 ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-8-4            25.00 ± 0%    25.00 ± 0%       ~ (p=1.000 n=6) ¹
PoolContention/workers-16-4           25.00 ± 0%    25.00 ± 0%       ~ (p=1.000 n=6) ¹
ComponentLifecycle-4                 18.07k ± 0%   18.07k ± 0%       ~ (p=1.000 n=6) ¹
SourceValidation-4                    32.00 ± 0%    32.00 ± 0%       ~ (p=1.000 n=6) ¹
RegistryConcurrent-4                  2.000 ± 0%    2.000 ± 0%       ~ (p=1.000 n=6) ¹
LoaderLoadFromString-4               18.06k ± 0%   18.06k ± 0%       ~ (p=1.000 n=6) ¹
geomean                               183.3         183.3       +0.00%
¹ all samples are equal

pkg: github.com/GoCodeAlone/workflow/middleware
                                  │ baseline-bench.txt │       benchmark-results.txt        │
                                  │       sec/op       │   sec/op     vs base               │
CircuitBreakerDetection-4                 309.4n ± 14%   230.0n ± 6%  -25.67% (p=0.002 n=6)
CircuitBreakerExecution_Success-4         22.67n ±  0%   17.59n ± 0%  -22.41% (p=0.002 n=6)
CircuitBreakerExecution_Failure-4         71.00n ±  0%   55.15n ± 0%  -22.32% (p=0.002 n=6)
geomean                                   79.26n         60.65n       -23.48%

                                  │ baseline-bench.txt │       benchmark-results.txt        │
                                  │        B/op        │    B/op     vs base                │
CircuitBreakerDetection-4                 144.0 ± 0%     144.0 ± 0%       ~ (p=1.000 n=6) ¹
CircuitBreakerExecution_Success-4         0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
CircuitBreakerExecution_Failure-4         0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                              ²               +0.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                                  │ baseline-bench.txt │       benchmark-results.txt        │
                                  │     allocs/op      │ allocs/op   vs base                │
CircuitBreakerDetection-4                 1.000 ± 0%     1.000 ± 0%       ~ (p=1.000 n=6) ¹
CircuitBreakerExecution_Success-4         0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
CircuitBreakerExecution_Failure-4         0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                              ²               +0.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/module
                                 │ baseline-bench.txt │        benchmark-results.txt        │
                                 │       sec/op       │    sec/op     vs base               │
IaCStateBackend_InProcess-4              306.5n ± 19%   225.4n ± 28%  -26.43% (p=0.002 n=6)
IaCStateBackend_GRPC-4                  10.598m ± 20%   7.926m ±  1%  -25.21% (p=0.002 n=6)
JQTransform_Simple-4                     677.5n ± 34%   513.1n ± 17%  -24.27% (p=0.002 n=6)
JQTransform_ObjectConstruction-4         1.550µ ±  3%   1.137µ ±  1%  -26.65% (p=0.002 n=6)
JQTransform_ArraySelect-4                3.994µ ±  7%   2.685µ ±  1%  -32.79% (p=0.002 n=6)
JQTransform_Complex-4                    43.76µ ±  1%   31.97µ ±  2%  -26.94% (p=0.002 n=6)
JQTransform_Throughput-4                 1.847µ ±  3%   1.381µ ±  1%  -25.24% (p=0.002 n=6)
SSEPublishDelivery-4                     63.78n ±  1%   49.83n ±  1%  -21.88% (p=0.002 n=6)
geomean                                  4.035µ         2.976µ        -26.23%

                                 │ baseline-bench.txt │        benchmark-results.txt         │
                                 │        B/op        │     B/op      vs base                │
IaCStateBackend_InProcess-4             416.0 ±  0%       416.0 ± 0%       ~ (p=1.000 n=6) ¹
IaCStateBackend_GRPC-4                5.820Mi ± 12%     5.717Mi ± 6%       ~ (p=0.485 n=6)
JQTransform_Simple-4                  1.273Ki ±  0%     1.273Ki ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_ObjectConstruction-4      1.773Ki ±  0%     1.773Ki ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_ArraySelect-4             2.625Ki ±  0%     2.625Ki ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_Complex-4                 16.22Ki ±  0%     16.22Ki ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_Throughput-4              1.984Ki ±  0%     1.984Ki ± 0%       ~ (p=1.000 n=6) ¹
SSEPublishDelivery-4                    0.000 ±  0%       0.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                             ²                 -0.22%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                                 │ baseline-bench.txt │        benchmark-results.txt        │
                                 │     allocs/op      │  allocs/op   vs base                │
IaCStateBackend_InProcess-4              2.000 ± 0%      2.000 ± 0%       ~ (p=1.000 n=6) ¹
IaCStateBackend_GRPC-4                  6.868k ± 0%     6.864k ± 0%       ~ (p=0.485 n=6)
JQTransform_Simple-4                     10.00 ± 0%      10.00 ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_ObjectConstruction-4         15.00 ± 0%      15.00 ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_ArraySelect-4                30.00 ± 0%      30.00 ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_Complex-4                    324.0 ± 0%      324.0 ± 0%       ~ (p=1.000 n=6) ¹
JQTransform_Throughput-4                 17.00 ± 0%      17.00 ± 0%       ~ (p=1.000 n=6) ¹
SSEPublishDelivery-4                     0.000 ± 0%      0.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                             ²                -0.01%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/schema
                                    │ baseline-bench.txt │        benchmark-results.txt        │
                                    │       sec/op       │    sec/op     vs base               │
SchemaValidation_Simple-4                   1110.5n ± 4%   846.7n ± 11%  -23.75% (p=0.002 n=6)
SchemaValidation_AllFields-4                 1.637µ ± 2%   1.268µ ±  1%  -22.52% (p=0.002 n=6)
SchemaValidation_FormatValidation-4          1.567µ ± 3%   1.227µ ±  1%  -21.70% (p=0.002 n=6)
SchemaValidation_ManySchemas-4               1.616µ ± 3%   1.239µ ±  6%  -23.33% (p=0.002 n=6)
geomean                                      1.465µ        1.130µ        -22.83%

                                    │ baseline-bench.txt │       benchmark-results.txt        │
                                    │        B/op        │    B/op     vs base                │
SchemaValidation_Simple-4                   0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
SchemaValidation_AllFields-4                0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
SchemaValidation_FormatValidation-4         0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
SchemaValidation_ManySchemas-4              0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                                ²               +0.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                                    │ baseline-bench.txt │       benchmark-results.txt        │
                                    │     allocs/op      │ allocs/op   vs base                │
SchemaValidation_Simple-4                   0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
SchemaValidation_AllFields-4                0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
SchemaValidation_FormatValidation-4         0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
SchemaValidation_ManySchemas-4              0.000 ± 0%     0.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                                                ²               +0.00%               ²
¹ all samples are equal
² summaries must be >0 to compute geomean

pkg: github.com/GoCodeAlone/workflow/store
                                   │ baseline-bench.txt │         benchmark-results.txt         │
                                   │       sec/op       │    sec/op      vs base                │
EventStoreAppend_InMemory-4               1179.0n ± 11%   744.1n ±   5%   -36.89% (p=0.002 n=6)
EventStoreAppend_SQLite-4                  1.165m ± 13%   4.124m ± 434%  +254.10% (p=0.002 n=6)
GetTimeline_InMemory/events-10-4          12.885µ ±  2%   9.648µ ±  20%   -25.12% (p=0.002 n=6)
GetTimeline_InMemory/events-50-4           63.88µ ± 14%   42.56µ ±   1%   -33.38% (p=0.002 n=6)
GetTimeline_InMemory/events-100-4         113.64µ ±  1%   85.10µ ±   0%   -25.11% (p=0.002 n=6)
GetTimeline_InMemory/events-500-4          572.8µ ±  4%   433.9µ ±   2%   -24.24% (p=0.002 n=6)
GetTimeline_InMemory/events-1000-4        1175.4µ ±  1%   882.2µ ±   0%   -24.94% (p=0.002 n=6)
GetTimeline_SQLite/events-10-4             92.10µ ±  2%   65.59µ ±   3%   -28.79% (p=0.002 n=6)
GetTimeline_SQLite/events-50-4             239.9µ ±  4%   171.2µ ±   6%   -28.62% (p=0.002 n=6)
GetTimeline_SQLite/events-100-4            410.4µ ±  3%   295.6µ ±   1%   -27.97% (p=0.002 n=6)
GetTimeline_SQLite/events-500-4            1.755m ±  6%   1.283m ±   1%   -26.92% (p=0.002 n=6)
GetTimeline_SQLite/events-1000-4           3.490m ±  3%   2.499m ±   1%   -28.38% (p=0.002 n=6)
geomean                                    202.7µ         166.0µ          -18.11%

                                   │ baseline-bench.txt │        benchmark-results.txt         │
                                   │        B/op        │     B/op      vs base                │
EventStoreAppend_InMemory-4                  784.0 ± 8%     813.0 ± 9%       ~ (p=0.485 n=6)
EventStoreAppend_SQLite-4                  1.983Ki ± 2%   1.987Ki ± 2%       ~ (p=0.193 n=6)
GetTimeline_InMemory/events-10-4           7.953Ki ± 0%   7.953Ki ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-50-4           46.62Ki ± 0%   46.62Ki ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-100-4          94.48Ki ± 0%   94.48Ki ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-500-4          472.8Ki ± 0%   472.8Ki ± 0%       ~ (p=1.000 n=6)
GetTimeline_InMemory/events-1000-4         944.3Ki ± 0%   944.3Ki ± 0%       ~ (p=0.545 n=6)
GetTimeline_SQLite/events-10-4             16.74Ki ± 0%   16.74Ki ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-50-4             87.14Ki ± 0%   87.14Ki ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-100-4            175.4Ki ± 0%   175.4Ki ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-500-4            846.1Ki ± 0%   846.1Ki ± 0%       ~ (p=0.058 n=6)
GetTimeline_SQLite/events-1000-4           1.639Mi ± 0%   1.639Mi ± 0%       ~ (p=0.643 n=6)
geomean                                    67.30Ki        67.51Ki       +0.32%
¹ all samples are equal

                                   │ baseline-bench.txt │        benchmark-results.txt        │
                                   │     allocs/op      │  allocs/op   vs base                │
EventStoreAppend_InMemory-4                  7.000 ± 0%    7.000 ± 0%       ~ (p=1.000 n=6) ¹
EventStoreAppend_SQLite-4                    53.00 ± 0%    52.50 ± 1%       ~ (p=0.182 n=6)
GetTimeline_InMemory/events-10-4             125.0 ± 0%    125.0 ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-50-4             653.0 ± 0%    653.0 ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-100-4           1.306k ± 0%   1.306k ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-500-4           6.514k ± 0%   6.514k ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_InMemory/events-1000-4          13.02k ± 0%   13.02k ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-10-4               382.0 ± 0%    382.0 ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-50-4              1.852k ± 0%   1.852k ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-100-4             3.681k ± 0%   3.681k ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-500-4             18.54k ± 0%   18.54k ± 0%       ~ (p=1.000 n=6) ¹
GetTimeline_SQLite/events-1000-4            37.29k ± 0%   37.29k ± 0%       ~ (p=1.000 n=6) ¹
geomean                                     1.162k        1.161k       -0.08%
¹ all samples are equal

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

@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

❌ Patch coverage is 57.55814% with 146 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
plugin/external/proto/iac_grpc.pb.go 0.00% 58 Missing ⚠️
iac/requirements/discovery.go 69.04% 40 Missing and 12 partials ⚠️
iac/requirements/external.go 47.05% 15 Missing and 3 partials ⚠️
iac/requirements/types.go 74.28% 10 Missing and 8 partials ⚠️

📢 Thoughts on this report? Let us know!

@intel352 intel352 merged commit 9420ca1 into main May 25, 2026
28 checks passed
@intel352 intel352 deleted the feat/iac-requirement-proto branch May 25, 2026 05:18
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.

1 participant