Skip to content

Load plugin step schemas during validation#601

Merged
intel352 merged 1 commit into
mainfrom
codex/compute-wfctl-gaps
May 10, 2026
Merged

Load plugin step schemas during validation#601
intel352 merged 1 commit into
mainfrom
codex/compute-wfctl-gaps

Conversation

@intel352

@intel352 intel352 commented May 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • load plugin stepSchemas when wfctl validate --plugin-dir is used
  • add a regression test proving validate loads plugin step schema metadata, not only plugin type names

Verification

  • GOWORK=off go test ./cmd/wfctl -run 'TestRunValidatePluginDir|TestRunValidatePluginDirCapabilities|TestRunValidatePluginDirLoadsStepSchemas'\n- GOWORK=off go test ./cmd/wfctl\n\n## Review\n- Antagonistic/security pass: current main already contains the richer external trigger factory support and IaC helper fixes, so this PR intentionally keeps only the missing validation-path change. No credential, provider, deploy, or runtime execution behavior changes.

Copilot AI review requested due to automatic review settings May 10, 2026 06:22
@intel352 intel352 force-pushed the codex/compute-wfctl-gaps branch from a4a84e6 to a488c89 Compare May 10, 2026 06:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 closes several integration gaps between wfctl compute/infra workflows and the external plugin ecosystem by improving trigger lifecycle handling, enriching schema loading during validation, and adding IaC interface/sentinel helpers (including new sensitive-output routing utilities).

Changes:

  • Route external plugin trigger types through the plugin module lifecycle and delay remote trigger handle creation until Configure.
  • Expand IaC interfaces/sentinels to support optional provider capabilities and clearer error classification.
  • Load external plugin step schemas during wfctl validate --plugin-dir and add the iac/sensitive routing helpers.

Reviewed changes

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

Show a summary per file
File Description
plugin/external/sdk/grpc_server.go Treats trigger types as creatable “modules” and wires trigger callbacks to engine TriggerWorkflow.
plugin/external/sdk/grpc_server_test.go Adds coverage ensuring trigger types are created and started/stopped via module lifecycle RPCs.
plugin/external/remote_trigger.go Defers remote trigger handle creation to Configure; adds safeguards when starting before configured.
plugin/external/adapter.go Updates trigger factories to return unconfigured RemoteTrigger instances (no early CreateModule).
plugin/external/adapter_test.go Tests that remote trigger handle creation is delayed until Configure.
interfaces/iac_resource_driver.go Adds new IaC sentinel errors for image-not-found and optional-method unimplemented handling.
interfaces/iac_provider.go Adds optional EnumeratorAll interface for providers that can enumerate without tags.
iac/sensitive/route.go Introduces sensitive-output routing (placeholders, revocation, diff masking).
cmd/wfctl/validate.go Loads plugin step schemas from --plugin-dir to improve validation fidelity.

Comment thread plugin/external/remote_trigger.go Outdated
return fmt.Errorf("remote trigger %s config: %w", t.typeName, err)
}
if t.handleID != "" {
_ = t.Destroy()
Comment on lines +96 to +97
func (t *RemoteTrigger) Configure(_ modular.Application, triggerConfig any) error {
cfg, err := triggerConfigMap(triggerConfig)
Comment thread iac/sensitive/route.go Outdated
Comment on lines +36 to +41
// Route stores sensitive output values in provider and replaces them with
// placeholders in the returned sanitized output map. Out is not mutated.
func Route(ctx context.Context, provider secrets.Provider, resourceName string, out *interfaces.ResourceOutput) (map[string]any, map[string]string, error) {
if out == nil {
return nil, nil, fmt.Errorf("sensitive.Route: out is nil")
}
@intel352 intel352 changed the title Fix compute workflow integration gaps Load plugin step schemas during validation May 10, 2026
@github-actions

Copy link
Copy Markdown

⏱ Benchmark Results

No significant performance regressions detected.

benchstat comparison (baseline → PR)
## benchstat: baseline → PR
baseline-bench.txt:262: parsing iteration count: invalid syntax
baseline-bench.txt:350909: parsing iteration count: invalid syntax
baseline-bench.txt:656928: parsing iteration count: invalid syntax
baseline-bench.txt:997759: parsing iteration count: invalid syntax
baseline-bench.txt:1317026: parsing iteration count: invalid syntax
baseline-bench.txt:1570623: parsing iteration count: invalid syntax
benchmark-results.txt:262: parsing iteration count: invalid syntax
benchmark-results.txt:416525: parsing iteration count: invalid syntax
benchmark-results.txt:825591: parsing iteration count: invalid syntax
benchmark-results.txt:1491970: parsing iteration count: invalid syntax
benchmark-results.txt:1822916: parsing iteration count: invalid syntax
benchmark-results.txt:2156796: 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              3.121m ± 224%
ComponentLoad-4                    3.538m ±  11%
ComponentExecute-4                 1.941µ ±   0%
PoolContention/workers-1-4         1.071µ ±   3%
PoolContention/workers-2-4         1.078µ ±   1%
PoolContention/workers-4-4         1.077µ ±   4%
PoolContention/workers-8-4         1.081µ ±   1%
PoolContention/workers-16-4        1.086µ ±   3%
ComponentLifecycle-4               3.567m ±   0%
SourceValidation-4                 2.282µ ±   0%
RegistryConcurrent-4               786.0n ±   5%
LoaderLoadFromString-4             3.570m ±   0%
geomean                            17.29µ

                            │ 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.441m ± 93%
ComponentLoad-4                        3.164m ±  5%
ComponentExecute-4                     1.450µ ±  3%
PoolContention/workers-1-4             799.0n ±  1%
PoolContention/workers-2-4             801.3n ±  4%
PoolContention/workers-4-4             872.0n ± 23%
PoolContention/workers-8-4             841.5n ±  9%
PoolContention/workers-16-4            808.8n ±  2%
ComponentLifecycle-4                   2.835m ±  1%
SourceValidation-4                     1.705µ ±  5%
RegistryConcurrent-4                   660.7n ± 10%
LoaderLoadFromString-4                 2.948m ± 12%
geomean                                14.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                  285.2n ± 3%
CircuitBreakerExecution_Success-4          21.52n ± 2%
CircuitBreakerExecution_Failure-4          66.38n ± 0%
geomean                                    74.13n

                                  │ 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                     232.9n ± 6%
CircuitBreakerExecution_Success-4             17.57n ± 0%
CircuitBreakerExecution_Failure-4             55.20n ± 0%
geomean                                       60.90n

                                  │ 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       │
JQTransform_Simple-4                     970.2n ± 18%
JQTransform_ObjectConstruction-4         1.456µ ±  1%
JQTransform_ArraySelect-4                3.312µ ±  1%
JQTransform_Complex-4                    38.53µ ±  2%
JQTransform_Throughput-4                 1.775µ ±  1%
SSEPublishDelivery-4                     65.42n ±  1%
geomean                                  1.660µ

                                 │ baseline-bench.txt │
                                 │        B/op        │
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      │
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         │
JQTransform_Simple-4                        716.4n ± 28%
JQTransform_ObjectConstruction-4            1.124µ ±  1%
JQTransform_ArraySelect-4                   2.815µ ±  2%
JQTransform_Complex-4                       33.76µ ±  5%
JQTransform_Throughput-4                    1.583µ ± 10%
SSEPublishDelivery-4                        49.99n ±  0%
geomean                                     1.350µ

                                 │ benchmark-results.txt │
                                 │         B/op          │
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       │
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.102µ ± 19%
SchemaValidation_AllFields-4                1.666µ ±  6%
SchemaValidation_FormatValidation-4         1.579µ ±  2%
SchemaValidation_ManySchemas-4              1.804µ ±  2%
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                      827.8n ± 13%
SchemaValidation_AllFields-4                   1.256µ ±  1%
SchemaValidation_FormatValidation-4            1.232µ ±  3%
SchemaValidation_ManySchemas-4                 1.236µ ±  2%
geomean                                        1.122µ

                                    │ 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.100µ ± 18%
EventStoreAppend_SQLite-4                  1.298m ±  4%
GetTimeline_InMemory/events-10-4           13.66µ ±  2%
GetTimeline_InMemory/events-50-4           76.19µ ±  2%
GetTimeline_InMemory/events-100-4          121.5µ ± 19%
GetTimeline_InMemory/events-500-4          623.0µ ±  1%
GetTimeline_InMemory/events-1000-4         1.272m ±  1%
GetTimeline_SQLite/events-10-4             104.6µ ±  1%
GetTimeline_SQLite/events-50-4             245.5µ ±  0%
GetTimeline_SQLite/events-100-4            419.8µ ±  2%
GetTimeline_SQLite/events-500-4            1.791m ±  3%
GetTimeline_SQLite/events-1000-4           3.522m ±  4%
geomean                                    214.9µ

                                   │ baseline-bench.txt │
                                   │        B/op        │
EventStoreAppend_InMemory-4                 753.5 ± 14%
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.08Ki

                                   │ 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                   763.9n ± 16%
EventStoreAppend_SQLite-4                     1.674m ± 22%
GetTimeline_InMemory/events-10-4              10.75µ ±  3%
GetTimeline_InMemory/events-50-4              59.28µ ± 24%
GetTimeline_InMemory/events-100-4             90.15µ ±  1%
GetTimeline_InMemory/events-500-4             461.6µ ±  2%
GetTimeline_InMemory/events-1000-4            934.1µ ±  2%
GetTimeline_SQLite/events-10-4                67.49µ ±  1%
GetTimeline_SQLite/events-50-4                175.0µ ±  2%
GetTimeline_SQLite/events-100-4               306.4µ ±  1%
GetTimeline_SQLite/events-500-4               1.346m ±  1%
GetTimeline_SQLite/events-1000-4              2.612m ±  1%
geomean                                       164.9µ

                                   │ benchmark-results.txt │
                                   │         B/op          │
EventStoreAppend_InMemory-4                    755.0 ± 15%
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.09Ki

                                   │ 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 40e4469 into main May 10, 2026
18 checks passed
@intel352 intel352 deleted the codex/compute-wfctl-gaps branch May 10, 2026 06:42
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