Repository navigation
Preserve nullable registry entries during gRPC conversion - #494
Merged
Merged
Conversation
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.
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.