Skip to content

Conversation

@alisku
Copy link
Contributor

@alisku alisku commented Feb 3, 2026

No description provided.

@alisku alisku requested a review from klajmajk February 3, 2026 16:59
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @alisku, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request resolves an issue with the unmarshalling of the decisionOutput field by changing its type to json.RawMessage. This modification ensures that the raw JSON data is retained and correctly handled throughout the system, from the API definition to the generated client code and server-side logic. The change prevents errors that could occur during implicit or explicit unmarshalling into a generic interface map, thereby improving the robustness and reliability of decision instance data retrieval.

Highlights

  • Type Definition Change: The DecisionOutput field within the DecisionInstanceDetail struct has been updated from *map[string]interface{} to *json.RawMessage in both internal/rest/public/zz_generated.go and pkg/zenclient/zz_generated.go. This change ensures that the raw JSON output is preserved without immediate unmarshalling into a generic map.
  • API Schema Update: The openapi/api.yaml file was modified to reflect the new type for decisionOutput, specifying it as type: string with format: json and x-go-type: json.RawMessage. This aligns the API definition with the Go type changes.
  • Unmarshalling Logic Simplification: In internal/rest/server.go, the explicit json.Unmarshal call for decisionOutput has been removed. Instead, the value is now directly assigned as json.RawMessage, eliminating a potential source of unmarshalling errors and simplifying the data handling.
  • Test Adjustment: The end-to-end test in test/e2e/decision_instance_test.go was updated to assert the decisionOutput as a JSON string, consistent with its new json.RawMessage type.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • internal/rest/public/zz_generated.go
    • Updated DecisionOutput type in DecisionInstanceDetail from *map[string]interface{} to *json.RawMessage.
    • Reflected the type change in the embedded Swagger specification.
  • internal/rest/server.go
    • Removed explicit json.Unmarshal for decisionOutput and directly assigned it as json.RawMessage.
  • openapi/api.yaml
    • Changed decisionOutput schema to type: string, format: json, and x-go-type: json.RawMessage.
  • pkg/zenclient/zz_generated.go
    • Updated DecisionOutput type in DecisionInstanceDetail from *map[string]interface{} to *json.RawMessage.
  • test/e2e/decision_instance_test.go
    • Modified assertion for decisionOutput to expect a JSON string instead of a map[string]interface{}.
Activity
  • The pull request was opened by alisku with the title "Fix decision instance decisionOutput unmarshalling".
  • The changes primarily involve updating data types and handling of JSON data across several Go files and the OpenAPI specification.
  • An existing end-to-end test was updated to reflect the new data type handling.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request fixes an issue with unmarshalling the decisionOutput field by changing its type to json.RawMessage. This is a good approach as it correctly handles arbitrary JSON structures, improves efficiency by avoiding an unnecessary unmarshal/marshal cycle, and the change is applied consistently across the API specification, generated code, server logic, and tests.

@alisku alisku merged commit 4941283 into main Feb 3, 2026
4 checks passed
@alisku alisku deleted the feature/fix-decision-instance-decisionOutput branch February 3, 2026 21:26
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.

2 participants