fix(go): implement recursive schema reference resolution#5667
fix(go): implement recursive schema reference resolution#5667MichaelDoyle wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates schema resolution in go/core/core.go to recursively resolve nested maps and arrays, and integrates this resolved schema in runJSONWithTelemetry within go/core/action.go. Feedback highlights that the test suite is missing coverage for a missing schema (which was removed) and circular references (which could cause a stack overflow). A code suggestion is provided to restore and add these tests.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
4cb92c7 to
b37163c
Compare
|
@cabljac this is somewhat related to your work supporting the new JSON schema field in the Gemini plugin (and conversely allowing recursion/references in schema generation) I think, can we validate both pieces of work and make sure they work well together? |
lemme know @cabljac @apascal07 -- I am also happy to back off from the slop cannon on this one. Right now, prompts with input schemas don't work on the dev-ui from what I can tell, so that's what I am aiming to fix. |
1e8945a to
cf5b17c
Compare
This change fixes "Reference must be canonical" validation errors when running actions through the JSON path (e.g., via the Dev UI). The Go framework now: 1. Recursively resolves 'genkit:' schema references within nested objects and arrays in ResolveSchema. 2. Ensures schema resolution is performed in runJSONWithTelemetry before input validation. This ensures that strict JSON schema validators see fully-resolved definitions rather than internal Genkit reference strings.
cf5b17c to
b35efb0
Compare
This change fixes "Reference must be canonical" validation errors when running actions through the JSON path (e.g., via the Dev UI).
The Go framework now:
This ensures that strict JSON schema validators see fully-resolved definitions rather than internal Genkit reference strings.