Skip to content

Preserve nullable registry entries during gRPC conversion - #494

Merged
raphael merged 4 commits into
mainfrom
nullable-collection-converters
Oct 23, 2026
Merged

raphael merged 4 commits into
mainfrom
nullable-collection-converters

Conversation

@raphael

@raphael raphael commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

The registry's generated gRPC code converts typed tool declarations between service and protobuf values. Some declaration lists allow null entries, but the converter calls an object helper on every entry before validation. A metadata list containing a field, null, and another field can therefore panic while building the request instead of reaching the existing validation rules.

The framework and maintained quickstart select the merged Goa generator fix in goadesign/goa#4071 and the registry transports are regenerated with it. Nullable entries retain their positions during in-memory conversion, including nested field paths and union branches. Required-entry validation and service-level acceptance checks remain unchanged. Applications must regenerate their gRPC code to apply the same fix; updating a dependency alone does not replace generated converters.

The schema, public API, JSON codecs, validators, and protobuf representation are unchanged. Binary protobuf still turns a null repeated message into a present empty message, and ProtoJSON still rejects null repeated-message entries. The protobuf Go files differ only in the compiler-version comments produced by the repository's pinned compiler.

Synthetic request and response tests preserve nullable positions and populated neighbors, retain required-export rejection, and check the wire limits. A generated recursive fixture covers nullable arrays and map values in both directions while retaining its original JSON checks. A baseline check reproduces the original panic; focused race tests, affected registry/client tests, lint, and repeat-generation checks pass locally. The complete remote workflow passes, including root and quickstart tests, generated MCP checks, integration tests, and browser-host isolation checks. Live behavior has not been verified.

@raphael
raphael merged commit c4987b3 into main Oct 23, 2026
7 checks passed
@raphael
raphael deleted the nullable-collection-converters branch October 23, 2026 15:23
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.

1 participant