Skip to content

fix: include google/protobuf/duration.proto in FileDescriptorSet (v0.3.4) - #12

Merged
intel352 merged 1 commit into
mainfrom
fix/duration-in-fds-v0.3.4
May 13, 2026
Merged

intel352 merged 1 commit into
mainfrom
fix/duration-in-fds-v0.3.4

Conversation

@intel352

Copy link
Copy Markdown
Contributor

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_FileDescriptorSetResolvesEveryContractMessage exercises 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

…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>
Copilot AI review requested due to automatic review settings May 13, 2026 19:18

Copilot AI left a comment

Copy link
Copy Markdown

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 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.proto to the FileDescriptorSet used for contract type resolution.
  • Add a regression test that rebuilds a type registry from the FileDescriptorSet and 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".
Comment thread CHANGELOG.md

### 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.
Comment thread plugin.json
{
"name": "workflow-plugin-eventbus",
"version": "0.3.3",
"version": "0.3.4",
@intel352
intel352 merged commit 4044d09 into main May 13, 2026
11 checks passed
@intel352
intel352 deleted the fix/duration-in-fds-v0.3.4 branch May 13, 2026 19:26
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