fix(plugin/external): empty ConfigMessage for input-only STRICT_PROTO step contracts#644
Merged
Merged
Conversation
…T_PROTO step contracts Steps that declare STRICT_PROTO mode + InputMessage + OutputMessage but no ConfigMessage (e.g., step.eventbus.ack, step.eventbus.publish) failed engine initialization with: STRICT_PROTO contract for config message "" cannot use legacy Struct fallback: missing protobuf message name The step has no per-instance config schema — data flows through the input message. Engine now treats empty ConfigMessage as "no typed config", encodes cfg as legacy *structpb.Struct, returns nil typed payload. Plugin's typed factory reads from InputMessage as designed. Caught by BMW PR #278 image-launch smoke against v0.51.3 + eventbus v0.3.0 (steps.eventbus.{ack,publish,consume} have empty ConfigMessage). Test: TestCreateTypedConfigRequestEmptyConfigMessageStrictProto.
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes engine-side STRICT_PROTO config encoding for “input-only” step contracts that omit ConfigMessage, preventing initialization failures when a plugin declares typed input/output but no typed config schema.
Changes:
- Treat empty
ContractDescriptor.ConfigMessageas “no typed config”: encode only legacyStructand returnniltyped payload. - Add unit test covering STRICT_PROTO + empty
ConfigMessagebehavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| plugin/external/adapter.go | Adds an early return in createTypedConfigRequest for empty ConfigMessage to avoid typed-encode errors. |
| plugin/external/adapter_test.go | Adds regression test for STRICT_PROTO step contracts with empty ConfigMessage. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
⏱ Benchmark Results✅ No significant performance regressions detected. benchstat comparison (baseline → PR)
|
… non-nil cfg paths
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Steps that declare STRICT_PROTO mode + InputMessage + OutputMessage but no ConfigMessage (input-only steps where data flows through the input proto, not a config schema) failed engine initialization with:
Engine now treats empty
ConfigMessageas "no typed config" → encodes cfg as legacy*structpb.Structonly, returns nil typed payload. Plugin's typed step factory reads from the InputMessage proto as designed.Caught by
BMW PR #278 image-launch smoke against v0.51.3 + workflow-plugin-eventbus v0.3.0:
Eventbus declares 3 input-only steps (ack/publish/consume); same shape applies to any plugin whose steps carry data via the input proto.
Diff
3 lines + 1 comment in
createTypedConfigRequest+ 1 unit test.Test
TestCreateTypedConfigRequestEmptyConfigMessageStrictProto— asserts:Test plan
GOWORK=off go test ./plugin/external/ -run TestCreateTypedConfigRequest -v— all 4 PASSRelease
Tag v0.51.4 post-merge.
🤖 Generated with Claude Code