Fix proto/generated-code drift breaking gRPC reflection and samples - #18
Open
garvitkaushik-123 wants to merge 1 commit into
Open
Fix proto/generated-code drift breaking gRPC reflection and samples#18garvitkaushik-123 wants to merge 1 commit into
garvitkaushik-123 wants to merge 1 commit into
Conversation
- 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.
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.
Fixes #11.
The Go-side
proto/sources had drifted from the checked-in generated code and from the Rust side's proto tree, breakingmake bindingsand gRPC server reflection:proto/agenticrtbframework.protoimportedcom/iabtechlab/openrtb/v2.6/openrtb.proto, but the committed OpenRTB proto lives underv2/. Fixed the import to match.MetricsPayload.metricreferencedcom.iabtechlab.openrtb.v2.BidRequest.Metric, butMetricis nested insideImp. Fixed toBidRequest.Imp.Metric.RTBExtensionPointservice definition existed only underrust/proto/agenticrtbframeworkservices.proto— the Go side never had a matchingproto/agenticrtbframeworkservices.proto, even thoughpkg/pb/artf/agenticrtbframework_grpc.pb.gowas checked in for it. Added the missing proto (withgo_packageset on both proto files) and updatedscripts/generate.sh/ the Makefilebindingstarget to generate it correctly.pkg/pb/artffrom the fixed protos. This restores server reflection:grpcurl describewas returningSymbol not foundforRTBExtensionPointbecause the checked-in generated code no longer matched any buildable proto source.samples/multi-impression.jsonandsamples/native-ad.jsonused0/1fordevice.js,regs.coppa,regs.gdpr, andsource.fd, which areboolin 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 totrue/false.CLAUDE.md.Testing
make buildsucceedsscripts/generate.shregenerates cleanly against currentprotoc/protoc-gen-go/protoc-gen-go-grpc--enable-grpcand confirmedgrpcurl -plaintext localhost:50051 describe com.iabtechlab.bidstream.mutation.services.v1.RTBExtensionPointnow resolves the service (previously:Symbol not found)samples/round-trip throughRTBExtensionPoint/GetMutationsvia reflection alone (grpcurl -plaintext -d @ ...), with no-protosetworkaround neededgo vet ./...andgo test ./...pass