Skip to content

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

Description

@jchambon-equativ

Generated with the help of AI.

Summary

While evaluating this repo as an ARTF reference, I hit four distinct upstream issues that together prevent the gRPC interface from being fully usable out of the box. They appear to stem
from a partial proto refactor (split into a separate services file + migration to edition = "2023") that left the committed generated code and sample payloads inconsistent.

Tested against commit 7428953220937154c86a4451dc662ded715efaf6. macOS arm64, Docker 29.4, protoc 33.4 / protoc-gen-go v1.36.11.

Symptoms

  • make generate / scripts/generate.sh fail (proto compilation errors)
  • grpcurl -plaintext <host>:50051 describe <service> returns Symbol not found even though list works
  • gRPC clients that rely on server reflection cannot introspect the service
  • Two bundled sample JSONs (multi-impression.json, native-ad.json) fail when sent via gRPC with expecting boolean ; instead got 1

Bug 1 — Wrong nested type reference

proto/agenticrtbframework.proto:198 references com.iabtechlab.openrtb.v2.BidRequest.Metric, but in the OpenRTB v2 proto, Metric is nested inside Imp (not directly inside
BidRequest). The committed pkg/pb/artf/agenticrtbframework.pb.go already uses the correct path (BidRequest_Imp_Metric), so the runtime works, but the proto source can no longer be
regenerated.

Fix (1 line):

- repeated com.iabtechlab.openrtb.v2.BidRequest.Metric metric = 1;
+ repeated com.iabtechlab.openrtb.v2.BidRequest.Imp.Metric metric = 1;

Bug 2 — Wrong import path

proto/agenticrtbframework.proto:6 imports com/iabtechlab/openrtb/v2.6/openrtb.proto, but the file is at proto/com/iabtechlab/openrtb/v2/openrtb.proto. The committed openrtb.pb.go
registers its FileDescriptor under the v2/ name, so at runtime the importer looks for a v2.6/ entry that doesn't exist — which is what causes the describe reflection failure
(manifests as File not found: com/iabtechlab/openrtb/v2.6/openrtb.proto once Bug 3 is addressed).

Fix (1 line):

- import "com/iabtechlab/openrtb/v2.6/openrtb.proto";
+ import "com/iabtechlab/openrtb/v2/openrtb.proto";

(Or rename the directory proto/com/iabtechlab/openrtb/v2/v2.6/ and update scripts/generate.sh and openrtb.proto's go_package accordingly. Either is fine; both files just need
to agree.)

Bug 3 — Generated code out of sync with proto sources

pkg/pb/artf/agenticrtbframework.pb.go and agenticrtbframework_grpc.pb.go were generated with protoc v3.21.12 (March 2022, pre-editions) from a version of the protos where services
and messages lived together in a single file with syntax = "proto2" (or proto3). Since then:

  • The services were extracted to agenticrtbframeworkservices.proto
  • agenticrtbframework.proto was migrated to edition = "2023"
  • The generated code was never re-run

This is what surfaces the previous two bugs as a runtime reflection failure (the registered FileDescriptors don't match the imports the generated stubs declare). Regenerating with current
protoc — once Bugs 1 & 2 are fixed — produces a consistent set and fully restores grpcurl describe and reflection-based clients.

Two related issues in the regen tooling:

  • proto/agenticrtbframework.proto and agenticrtbframeworkservices.proto no longer declare option go_package, so protoc-gen-go errors with "unable to determine Go import path"
    unless you pass M= mappings on the command line. The committed code clearly had go_package options at some point.
  • scripts/generate.sh only processes agenticrtbframework.proto (not the services file) and doesn't emit the _grpc.pb.go. The bindings target in Makefile references a
    non-existent root-level openrtb.proto and uses --experimental_editions, which is no longer needed on modern protoc.

Fix: restore option go_package = "github.com/iabtechlab/agentic-rtb-framework/pkg/pb/artf"; in both agenticrtbframework.proto and agenticrtbframeworkservices.proto, fix
scripts/generate.sh and Makefile bindings to include the services file and use a unified proto path, and check in a regenerated pkg/pb/artf/ produced by current protoc.

Bug 4 — Sample payloads use int where proto declares bool

samples/multi-impression.json and samples/native-ad.json use the legacy OpenRTB-JSON convention of integer 0/1 for fields the IAB OpenRTB v2 proto declares as bool. The web UI /
MCP path tolerates this (lenient JSON parsing), but the gRPC path fails with bad input: expecting boolean ; instead got 1 due to the strict protobuf-JSON marshaler.

Affected fields observed:

Field proto type sample value
device.js bool 1
regs.coppa bool 0
regs.gdpr bool 0
source.fd bool 1

Fix: in both sample files, use true/false instead of 1/0 for these fields. (Strictly, all bool-typed OpenRTB fields should be reviewed across the sample set.)

Reproduction (any UNIX, Docker)

git clone https://github.com/IABTechLab/agentic-rtb-framework.git
cd agentic-rtb-framework
docker build -t artf-test .
docker run --rm -d -p 50051:50051 -p 8080:8080 -p 8081:8081 --name artf-test artf-test

# Bug 3 surfaces here:
grpcurl -plaintext localhost:50051 describe \
  com.iabtechlab.bidstream.mutation.services.v1.RTBExtensionPoint
# → Failed to resolve symbol ... : Symbol not found

# Bug 4 surfaces here (after working around Bugs 1–3 with -protoset):
grpcurl -plaintext -protoset artf.protoset -d @ localhost:50051 \
  com.iabtechlab.bidstream.mutation.services.v1.RTBExtensionPoint/GetMutations \
  < samples/multi-impression.json
# → error getting request data: bad input: expecting boolean ; instead got 1

Validation

I applied the fixes locally (Bugs 1+2 in the .proto, restored go_package, regenerated with protoc 33.4 / protoc-gen-go 1.36.11, and coerced the bool fields in the two samples). After
that:

  • make build and docker build succeed
  • grpcurl -plaintext localhost:50051 describe <service> returns the full IDL
  • grpcurl -plaintext localhost:50051 describe MetricsPayload correctly shows BidRequest.Imp.Metric as the type
  • All 5 sample payloads return well-formed mutation responses via gRPC reflection alone (no -protoset)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions