Repository navigation
fix: include google/protobuf/duration.proto in FileDescriptorSet (v0.3.4) - #12
Merged
Merged
Conversation
…escriptorSet (v0.3.4) eventbus.proto imports google/protobuf/duration.proto for StreamConfig.max_age and ConsumerConfig.ack_wait. The v0.3.3 fix shipped the FileDescriptorSet with [struct, empty, eventbus] but omitted duration — protodesc.NewFiles requires every imported file to be present in the set, so v0.3.3 silently produced an empty type resolver and the engine still hit "generated codec for protobuf message X not found" (BMW PR #279 image-launch v0.3.3 attempt #2). v0.3.4: - Add durationpb.File_google_protobuf_duration_proto to the FileDescriptorSet, before the eventbus_proto file. - Add TestContractRegistry_FileDescriptorSetResolvesEveryContractMessage regression test that exercises the engine code path: builds a resolver from the published FileDescriptorSet and asserts every Config/Input/Output name in Contracts is resolvable. This would have caught the v0.3.3 missing-import gap before release. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR fixes strict-proto contract resolution by ensuring the plugin’s ContractRegistry.FileDescriptorSet includes all transitive protobuf dependencies required by eventbus.proto (specifically google/protobuf/duration.proto), and adds a regression test to validate that all contract message types are resolvable from the descriptor set.
Changes:
- Bump plugin version to
v0.3.4. - Add
google/protobuf/duration.prototo theFileDescriptorSetused for contract type resolution. - Add a regression test that rebuilds a type registry from the
FileDescriptorSetand asserts every contract message name is resolvable.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| plugin.json | Version bump to 0.3.4 (manifest metadata). |
| cmd/workflow-plugin-eventbus/plugin.go | Include duration.proto in ContractRegistry().FileDescriptorSet to satisfy protodesc.NewFiles imports. |
| cmd/workflow-plugin-eventbus/plugin_test.go | Add regression test ensuring every contract message is resolvable from the descriptor set. |
| CHANGELOG.md | Document the v0.3.4 fix in release notes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+233
to
+235
| // StreamConfig.max_age + ConsumerConfig.ack_wait — protodesc.NewFiles | ||
| // requires every imported file to be present in the FileDescriptorSet, | ||
| // so include the duration well-known type BEFORE eventbus_proto. |
Comment on lines
+20
to
+24
| // FileDescriptorSet). If any imported file is missing, NewFiles silently | ||
| // produces a registry that never registers the eventbus messages, and the | ||
| // engine falls through to protoregistry.GlobalTypes (which does not contain | ||
| // plugin-local protos) at module construction time — failing with | ||
| // "generated codec for protobuf message X not found: proto: not found". |
Comment on lines
+18
to
+24
| // google/protobuf/duration.proto which eventbus.proto imports). The engine | ||
| // builds its contract-types resolver via protodesc.NewFiles(registry. | ||
| // FileDescriptorSet). If any imported file is missing, NewFiles silently | ||
| // produces a registry that never registers the eventbus messages, and the | ||
| // engine falls through to protoregistry.GlobalTypes (which does not contain | ||
| // plugin-local protos) at module construction time — failing with | ||
| // "generated codec for protobuf message X not found: proto: not found". |
|
|
||
| ### Fixed | ||
|
|
||
| - **Include `google/protobuf/duration.proto` in `ContractRegistry.FileDescriptorSet`.** `eventbus.proto` imports `duration.proto` for `StreamConfig.max_age` and `ConsumerConfig.ack_wait`. `protodesc.NewFiles` requires every imported file to be present in the FileDescriptorSet, so the v0.3.3 set (struct + empty + eventbus) silently failed to register any eventbus messages — the engine's contract-types resolver ended up empty, and STRICT_PROTO modules fell through to `protoregistry.GlobalTypes` (which still doesn't contain plugin-local protos). Result: PR 279 image-launch *still* hit `generated codec ... not found` after the v0.3.3 bump. v0.3.4 adds the duration well-known type before the eventbus file in the descriptor set so resolution completes. |
| { | ||
| "name": "workflow-plugin-eventbus", | ||
| "version": "0.3.3", | ||
| "version": "0.3.4", |
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
v0.3.3 added FileDescriptorSet but only included struct + empty + eventbus protos. eventbus.proto imports google/protobuf/duration.proto (for StreamConfig.max_age + ConsumerConfig.ack_wait). protodesc.NewFiles requires every imported file to be present — without duration, the registry silently fails to register the eventbus messages, and the engine still hits "generated codec ... not found".
Surfaced by BMW PR #279 image-launch attempt #2 after the v0.3.3 bump.
Test
New
TestContractRegistry_FileDescriptorSetResolvesEveryContractMessageexercises the engine path: build resolver from FileDescriptorSet, assert every Config/Input/Output message name in Contracts is resolvable. Would have caught the v0.3.3 gap before release.🤖 Generated with Claude Code