Skip to content

fix(wfctl): validate plugin IaC resource types#752

Merged
intel352 merged 1 commit into
mainfrom
fix/plugin-infra-resource-validation
May 21, 2026
Merged

fix(wfctl): validate plugin IaC resource types#752
intel352 merged 1 commit into
mainfrom
fix/plugin-infra-resource-validation

Conversation

@intel352
Copy link
Copy Markdown
Contributor

Summary

  • register plugin-declared resourceTypes during wfctl validate --plugin-dir
  • include both flat resourceTypes and capabilities.iacProvider.resourceTypes
  • add schema tests covering plugin-backed infra resource modules

Verification

  • GOWORK=off go test ./schema ./cmd/wfctl
  • GOWORK=off go run ./cmd/wfctl validate --plugin-dir /Users/jon/workspace/gocodealone-multisite/data/plugins /Users/jon/workspace/gocodealone-multisite/config/dns.wfctl.yaml --allow-no-entry-points

@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions
Copy link
Copy Markdown

⏱ 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:306085: parsing iteration count: invalid syntax
baseline-bench.txt:626306: parsing iteration count: invalid syntax
baseline-bench.txt:885249: parsing iteration count: invalid syntax
baseline-bench.txt:1433440: parsing iteration count: invalid syntax
baseline-bench.txt:1724930: parsing iteration count: invalid syntax
benchmark-results.txt:276: parsing iteration count: invalid syntax
benchmark-results.txt:321280: parsing iteration count: invalid syntax
benchmark-results.txt:649208: parsing iteration count: invalid syntax
benchmark-results.txt:972741: parsing iteration count: invalid syntax
benchmark-results.txt:1253341: parsing iteration count: invalid syntax
benchmark-results.txt:1588691: 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.220m ± 57%
ComponentLoad-4                     3.647m ±  9%
ComponentExecute-4                  1.910µ ±  0%
PoolContention/workers-1-4          1.076µ ±  1%
PoolContention/workers-2-4          1.074µ ±  1%
PoolContention/workers-4-4          1.077µ ±  2%
PoolContention/workers-8-4          1.080µ ±  0%
PoolContention/workers-16-4         1.086µ ±  1%
ComponentLifecycle-4                3.613m ±  1%
SourceValidation-4                  2.304µ ±  1%
RegistryConcurrent-4                800.7n ±  3%
LoaderLoadFromString-4              3.639m ±  1%
geomean                             18.66µ

                            │ 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                  5.785m ± 87%
ComponentLoad-4                        3.599m ±  2%
ComponentExecute-4                     1.820µ ±  1%
PoolContention/workers-1-4             1.027µ ±  2%
PoolContention/workers-2-4             1.027µ ±  1%
PoolContention/workers-4-4             1.023µ ±  1%
PoolContention/workers-8-4             1.018µ ±  1%
PoolContention/workers-16-4            1.023µ ±  1%
ComponentLifecycle-4                   3.590m ±  3%
SourceValidation-4                     2.086µ ±  0%
RegistryConcurrent-4                   732.4n ±  1%
LoaderLoadFromString-4                 3.640m ±  1%
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                  286.4n ± 4%
CircuitBreakerExecution_Success-4          21.53n ± 0%
CircuitBreakerExecution_Failure-4          66.19n ± 0%
geomean                                    74.17n

                                  │ 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                     298.8n ± 3%
CircuitBreakerExecution_Success-4             22.66n ± 0%
CircuitBreakerExecution_Failure-4             70.89n ± 0%
geomean                                       78.30n

                                  │ 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              316.2n ±  2%
IaCStateBackend_GRPC-4                   9.510m ± 10%
JQTransform_Simple-4                     670.2n ± 42%
JQTransform_ObjectConstruction-4         1.561µ ±  4%
JQTransform_ArraySelect-4                3.455µ ±  0%
JQTransform_Complex-4                    39.22µ ±  1%
JQTransform_Throughput-4                 1.846µ ±  2%
SSEPublishDelivery-4                     64.59n ±  2%
geomean                                  3.875µ

                                 │ baseline-bench.txt │
                                 │        B/op        │
IaCStateBackend_InProcess-4             416.0 ±  0%
IaCStateBackend_GRPC-4                5.888Mi ± 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.835k ± 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                 297.6n ± 28%
IaCStateBackend_GRPC-4                      10.27m ±  9%
JQTransform_Simple-4                        658.7n ± 42%
JQTransform_ObjectConstruction-4            1.557µ ±  2%
JQTransform_ArraySelect-4                   3.622µ ±  1%
JQTransform_Complex-4                       43.20µ ±  4%
JQTransform_Throughput-4                    1.899µ ±  1%
SSEPublishDelivery-4                        64.78n ±  0%
geomean                                     3.959µ

                                 │ benchmark-results.txt │
                                 │         B/op          │
IaCStateBackend_InProcess-4                416.0 ±  0%
IaCStateBackend_GRPC-4                   5.799Mi ± 17%
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.864k ± 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.100µ ± 20%
SchemaValidation_AllFields-4                1.651µ ±  1%
SchemaValidation_FormatValidation-4         1.577µ ±  2%
SchemaValidation_ManySchemas-4              1.828µ ±  3%
geomean                                     1.512µ

                                    │ 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.083µ ± 2%
SchemaValidation_AllFields-4                    1.628µ ± 1%
SchemaValidation_FormatValidation-4             1.560µ ± 4%
SchemaValidation_ManySchemas-4                  1.585µ ± 1%
geomean                                         1.445µ

                                    │ 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.284µ ± 15%
EventStoreAppend_SQLite-4                  1.314m ±  1%
GetTimeline_InMemory/events-10-4           13.42µ ±  2%
GetTimeline_InMemory/events-50-4           76.01µ ±  2%
GetTimeline_InMemory/events-100-4          152.3µ ±  3%
GetTimeline_InMemory/events-500-4          695.8µ ± 10%
GetTimeline_InMemory/events-1000-4         1.276m ±  1%
GetTimeline_SQLite/events-10-4             107.5µ ±  2%
GetTimeline_SQLite/events-50-4             246.8µ ±  1%
GetTimeline_SQLite/events-100-4            415.3µ ±  2%
GetTimeline_SQLite/events-500-4            1.768m ±  0%
GetTimeline_SQLite/events-1000-4           3.451m ±  0%
geomean                                    223.7µ

                                   │ baseline-bench.txt │
                                   │        B/op        │
EventStoreAppend_InMemory-4                  796.0 ± 6%
EventStoreAppend_SQLite-4                  1.982Ki ± 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.38Ki

                                   │ 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.235µ ± 22%
EventStoreAppend_SQLite-4                     1.091m ±  4%
GetTimeline_InMemory/events-10-4              13.01µ ±  3%
GetTimeline_InMemory/events-50-4              70.45µ ± 21%
GetTimeline_InMemory/events-100-4             112.4µ ±  1%
GetTimeline_InMemory/events-500-4             570.5µ ±  1%
GetTimeline_InMemory/events-1000-4            1.152m ±  1%
GetTimeline_SQLite/events-10-4                86.35µ ±  1%
GetTimeline_SQLite/events-50-4                224.2µ ±  1%
GetTimeline_SQLite/events-100-4               390.7µ ±  1%
GetTimeline_SQLite/events-500-4               1.678m ±  1%
GetTimeline_SQLite/events-1000-4              3.273m ±  2%
geomean                                       198.7µ

                                   │ benchmark-results.txt │
                                   │         B/op          │
EventStoreAppend_InMemory-4                    774.5 ± 12%
EventStoreAppend_SQLite-4                    1.984Ki ±  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.23Ki

                                   │ 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 intel352 merged commit 644200a into main May 21, 2026
22 checks passed
@intel352 intel352 deleted the fix/plugin-infra-resource-validation branch May 21, 2026 11:55
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