Skip to content

Fix proto/generated-code drift breaking gRPC reflection and samples - #18

Open
garvitkaushik-123 wants to merge 1 commit into
IABTechLab:mainfrom
garvitkaushik-123:fix/grpc-reflection-proto-drift
Open

Fix proto/generated-code drift breaking gRPC reflection and samples#18
garvitkaushik-123 wants to merge 1 commit into
IABTechLab:mainfrom
garvitkaushik-123:fix/grpc-reflection-proto-drift

Conversation

@garvitkaushik-123

Copy link
Copy Markdown

Fixes #11.

The Go-side proto/ sources had drifted from the checked-in generated code and from the Rust side's proto tree, breaking make bindings and gRPC server reflection:

  • proto/agenticrtbframework.proto imported com/iabtechlab/openrtb/v2.6/openrtb.proto, but the committed OpenRTB proto lives under v2/. Fixed the import to match.
  • MetricsPayload.metric referenced com.iabtechlab.openrtb.v2.BidRequest.Metric, but Metric is nested inside Imp. Fixed to BidRequest.Imp.Metric.
  • The RTBExtensionPoint service definition existed only under rust/proto/agenticrtbframeworkservices.proto — the Go side never had a matching proto/agenticrtbframeworkservices.proto, even though pkg/pb/artf/agenticrtbframework_grpc.pb.go was checked in for it. Added the missing proto (with go_package set on both proto files) and updated scripts/generate.sh / the Makefile bindings target to generate it correctly.
  • Regenerated pkg/pb/artf from the fixed protos. This restores server reflection: grpcurl describe was returning Symbol not found for RTBExtensionPoint because the checked-in generated code no longer matched any buildable proto source.
  • samples/multi-impression.json and samples/native-ad.json used 0/1 for device.js, regs.coppa, regs.gdpr, and source.fd, which are bool in the OpenRTB proto. The strict gRPC JSON marshaler rejects that, so these samples failed over gRPC even though the web/MCP path tolerated it. Switched to true/false.
  • Updated the now-stale import example in CLAUDE.md.

Testing

  • make build succeeds
  • scripts/generate.sh regenerates cleanly against current protoc/protoc-gen-go/protoc-gen-go-grpc
  • Started the agent with --enable-grpc and confirmed grpcurl -plaintext localhost:50051 describe com.iabtechlab.bidstream.mutation.services.v1.RTBExtensionPoint now resolves the service (previously: Symbol not found)
  • All five files in samples/ round-trip through RTBExtensionPoint/GetMutations via reflection alone (grpcurl -plaintext -d @ ...), with no -protoset workaround needed
  • go vet ./... and go test ./... pass

- proto/agenticrtbframework.proto: fix OpenRTB import path
  (com/iabtechlab/openrtb/v2.6/ -> v2/, matching the checked-in
  directory) and the nested Metric type reference
  (BidRequest.Metric -> BidRequest.Imp.Metric)
- Add missing proto/agenticrtbframeworkservices.proto (the
  RTBExtensionPoint service definition existed for the Rust build
  under rust/proto/ but was never added for Go), with go_package
  set on both proto files
- Update scripts/generate.sh to generate the services file
  separately with grpc output, and point Makefile's bindings
  target at it instead of a stale, broken protoc invocation
- Regenerate pkg/pb/artf from the fixed protos, restoring
  reflection-based service discovery (grpcurl describe now
  resolves RTBExtensionPoint instead of "Symbol not found")
- Fix samples/multi-impression.json and samples/native-ad.json to
  use JSON booleans instead of 0/1 for bool-typed OpenRTB fields
  (js, coppa, gdpr, fd), which the strict gRPC JSON marshaler
  rejects
- Update the stale import example in CLAUDE.md to match

Verified: make build succeeds, all five samples/*.json now
round-trip through GetMutations via gRPC reflection alone.
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.

Multiple proto/generated-code/sample bugs prevent gRPC reflection and break sample payloads

1 participant