Skip to content

feat: support descriptor-only message contracts#790

Merged
intel352 merged 2 commits into
mainfrom
feat/message-contracts
May 27, 2026
Merged

feat: support descriptor-only message contracts#790
intel352 merged 2 commits into
mainfrom
feat/message-contracts

Conversation

@intel352
Copy link
Copy Markdown
Contributor

Summary

  • add MESSAGE contract kind/fields to plugin proto and SDK helpers
  • teach wfctl validate-contract/audit/editor bundle to preserve descriptor-only message contracts
  • add release metadata artifact and exact-run resolver for the create-release workflow

Verification

  • GOWORK=off go test ./plugin/sdk ./plugin/external ./plugin/external/sdk ./cmd/wfctl ./schema -count=1
  • GOWORK=off go run ./cmd/wfctl plugin validate-contract --require-contract-kind message ./cmd/wfctl/testdata/plugins/message-contract
  • GOWORK=off go run ./cmd/wfctl plugin validate-contract --require-contract-kind message ./cmd/wfctl/testdata/plugins/message-runtime-contract
  • GOWORK=off go run ./cmd/wfctl plugin audit ./cmd/wfctl/testdata/plugins/message-contract
  • negative: unknown contract fixture fails validate-contract and strict audit
  • bash -n scripts/resolve-gh-run-for-ref.sh; create-release.yml parses

Adversarial review

Subagent review found a strict audit false-green plus runtime-surface and message descriptor-ref gaps. Fixed before PR: strict audit now treats unknown/missing required contract kinds as contract findings, descriptor-only skipping excludes runtime surfaces such as GoReleaser/go.mod, and editor bundle per-contract descriptor refs include message contracts. Raw-value leakage is not applicable to this metadata-only prerequisite.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 27, 2026

⏱ Benchmark Results

No significant performance regressions detected.

benchstat comparison (baseline → PR)
## benchstat: baseline → PR
baseline-bench.txt:288: parsing iteration count: invalid syntax
baseline-bench.txt:329140: parsing iteration count: invalid syntax
baseline-bench.txt:635369: parsing iteration count: invalid syntax
baseline-bench.txt:944025: parsing iteration count: invalid syntax
baseline-bench.txt:1221151: parsing iteration count: invalid syntax
baseline-bench.txt:1531466: parsing iteration count: invalid syntax
benchmark-results.txt:288: parsing iteration count: invalid syntax
benchmark-results.txt:594352: parsing iteration count: invalid syntax
benchmark-results.txt:899069: parsing iteration count: invalid syntax
benchmark-results.txt:1314939: parsing iteration count: invalid syntax
benchmark-results.txt:1635577: parsing iteration count: invalid syntax
benchmark-results.txt:1944020: 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               6.432m ± 85%
ComponentLoad-4                     3.592m ±  9%
ComponentExecute-4                  1.941µ ±  0%
PoolContention/workers-1-4          1.086µ ±  1%
PoolContention/workers-2-4          1.078µ ±  2%
PoolContention/workers-4-4          1.083µ ±  1%
PoolContention/workers-8-4          1.089µ ±  1%
PoolContention/workers-16-4         1.090µ ±  1%
ComponentLifecycle-4                3.604m ±  1%
SourceValidation-4                  2.338µ ±  1%
RegistryConcurrent-4                770.5n ±  4%
LoaderLoadFromString-4              3.645m ±  1%
geomean                             18.49µ

                            │ 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: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                            │ benchmark-results.txt │
                            │        sec/op         │
InterpreterCreation-4                  8.476m ± 64%
ComponentLoad-4                        3.437m ±  1%
ComponentExecute-4                     1.888µ ±  1%
PoolContention/workers-1-4             1.189µ ±  2%
PoolContention/workers-2-4             1.189µ ±  1%
PoolContention/workers-4-4             1.178µ ±  1%
PoolContention/workers-8-4             1.173µ ±  1%
PoolContention/workers-16-4            1.181µ ±  2%
ComponentLifecycle-4                   3.476m ±  1%
SourceValidation-4                     2.244µ ±  1%
RegistryConcurrent-4                   888.8n ±  1%
LoaderLoadFromString-4                 3.488m ±  1%
geomean                                19.52µ

                            │ 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.8n ± 0%
CircuitBreakerExecution_Success-4          21.54n ± 0%
CircuitBreakerExecution_Failure-4          66.09n ± 0%
geomean                                    74.18n

                                  │ 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: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                  │ benchmark-results.txt │
                                  │        sec/op         │
CircuitBreakerDetection-4                     462.6n ± 1%
CircuitBreakerExecution_Success-4             59.74n ± 0%
CircuitBreakerExecution_Failure-4             65.44n ± 0%
geomean                                       121.8n

                                  │ 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              309.9n ± 26%
IaCStateBackend_GRPC-4                   9.449m ±  4%
JQTransform_Simple-4                     671.8n ± 34%
JQTransform_ObjectConstruction-4         1.495µ ±  1%
JQTransform_ArraySelect-4                3.450µ ±  1%
JQTransform_Complex-4                    39.80µ ±  1%
JQTransform_Throughput-4                 1.850µ ±  1%
SSEPublishDelivery-4                     69.31n ±  0%
geomean                                  3.884µ

                                 │ baseline-bench.txt │
                                 │        B/op        │
IaCStateBackend_InProcess-4             416.0 ±  0%
IaCStateBackend_GRPC-4                5.806Mi ± 11%
JQTransform_Simple-4                  1.273Ki ±  0%
JQTransform_ObjectConstruction-4      1.773Ki ±  0%
JQTransform_ArraySelect-4             2.625Ki ±  0%
JQTransform_Complex-4                 16.31Ki ±  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                    328.0 ± 0%
JQTransform_Throughput-4                 17.00 ± 0%
SSEPublishDelivery-4                     0.000 ± 0%
geomean                                             ¹
¹ summaries must be >0 to compute geomean

cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                 │ benchmark-results.txt │
                                 │        sec/op         │
IaCStateBackend_InProcess-4                 343.2n ± 33%
IaCStateBackend_GRPC-4                      10.02m ±  1%
JQTransform_Simple-4                        706.4n ± 29%
JQTransform_ObjectConstruction-4            1.518µ ±  1%
JQTransform_ArraySelect-4                   3.340µ ±  0%
JQTransform_Complex-4                       37.02µ ±  2%
JQTransform_Throughput-4                    1.842µ ±  1%
SSEPublishDelivery-4                        76.33n ±  1%
geomean                                     3.989µ

                                 │ benchmark-results.txt │
                                 │         B/op          │
IaCStateBackend_InProcess-4                416.0 ±  0%
IaCStateBackend_GRPC-4                   5.772Mi ± 10%
JQTransform_Simple-4                     1.273Ki ±  0%
JQTransform_ObjectConstruction-4         1.773Ki ±  0%
JQTransform_ArraySelect-4                2.625Ki ±  0%
JQTransform_Complex-4                    16.31Ki ±  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.872k ± 0%
JQTransform_Simple-4                        10.00 ± 0%
JQTransform_ObjectConstruction-4            15.00 ± 0%
JQTransform_ArraySelect-4                   30.00 ± 0%
JQTransform_Complex-4                       328.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.126µ ± 18%
SchemaValidation_AllFields-4                1.654µ ±  5%
SchemaValidation_FormatValidation-4         1.592µ ±  1%
SchemaValidation_ManySchemas-4              1.835µ ±  4%
geomean                                     1.527µ

                                    │ 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: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                    │ benchmark-results.txt │
                                    │        sec/op         │
SchemaValidation_Simple-4                      1.014µ ± 42%
SchemaValidation_AllFields-4                   1.514µ ±  1%
SchemaValidation_FormatValidation-4            1.484µ ±  1%
SchemaValidation_ManySchemas-4                 1.496µ ±  4%
geomean                                        1.358µ

                                    │ 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.258µ ± 25%
EventStoreAppend_SQLite-4                  1.424m ±  6%
GetTimeline_InMemory/events-10-4           13.86µ ±  2%
GetTimeline_InMemory/events-50-4           77.23µ ±  2%
GetTimeline_InMemory/events-100-4          123.6µ ± 27%
GetTimeline_InMemory/events-500-4          631.3µ ±  1%
GetTimeline_InMemory/events-1000-4         1.292m ±  2%
GetTimeline_SQLite/events-10-4             105.8µ ±  1%
GetTimeline_SQLite/events-50-4             248.6µ ±  2%
GetTimeline_SQLite/events-100-4            425.1µ ±  1%
GetTimeline_SQLite/events-500-4            1.803m ±  0%
GetTimeline_SQLite/events-1000-4           3.523m ±  1%
geomean                                    221.2µ

                                   │ baseline-bench.txt │
                                   │        B/op        │
EventStoreAppend_InMemory-4                  790.0 ± 8%
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.34Ki

                                   │ 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: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                                   │ benchmark-results.txt │
                                   │        sec/op         │
EventStoreAppend_InMemory-4                   1.146µ ± 14%
EventStoreAppend_SQLite-4                     1.348m ±  4%
GetTimeline_InMemory/events-10-4              13.77µ ±  3%
GetTimeline_InMemory/events-50-4              75.67µ ±  4%
GetTimeline_InMemory/events-100-4             152.5µ ±  5%
GetTimeline_InMemory/events-500-4             762.1µ ± 21%
GetTimeline_InMemory/events-1000-4            1.229m ±  1%
GetTimeline_SQLite/events-10-4                81.35µ ±  1%
GetTimeline_SQLite/events-50-4                235.8µ ±  4%
GetTimeline_SQLite/events-100-4               423.0µ ±  1%
GetTimeline_SQLite/events-500-4               1.910m ±  1%
GetTimeline_SQLite/events-1000-4              3.748m ±  1%
geomean                                       220.7µ

                                   │ benchmark-results.txt │
                                   │         B/op          │
EventStoreAppend_InMemory-4                    835.5 ± 11%
EventStoreAppend_SQLite-4                    1.982Ki ±  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.65Ki

                                   │ 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 833ef61 into main May 27, 2026
26 checks passed
@intel352 intel352 deleted the feat/message-contracts branch May 27, 2026 06:27
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