Skip to content

Conversation

@vobradovich
Copy link
Member

No description provided.

@vobradovich vobradovich self-assigned this Jan 16, 2026
@vobradovich vobradovich requested a review from m62624 January 16, 2026 09:32
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @vobradovich, 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 refactors the internal message routing mechanism to use a standardized header-based approach. This change aims to improve the efficiency and consistency of message dispatch across programs and services by transitioning from string-based identifiers to numerical IDs embedded within a dedicated message header. The update impacts code generation, client-side interactions, and the IDL schema, ensuring a more robust and performant communication layer.

Highlights

  • Header-Based Routing Implementation: Introduced a new SailsMessageHeader structure to encapsulate routing information, including version, header length, interface ID, route ID, and entry ID, replacing previous string-based routing.
  • Numerical Identifiers for Services and Methods: Replaced string-based service names and method/event names with numerical route_id (for services) and entry_id (for methods/events) for more efficient message dispatch.
  • Identifiable Trait for Services and Events: Implemented the Identifiable trait for services and event enums, providing a const INTERFACE_ID for unique identification and entry_id() methods for event variants.
  • Updated Macro Syntax and Code Generation: Modified io_struct_impl! macros to accept entry_id and INTERFACE_ID arguments, and updated client generators to produce code that leverages these new header-based routing mechanisms for calls, replies, and events.
  • IDL Schema and Test Updates: The IDL schema was updated to reflect new interface IDs and the use of Result types for error handling, with all relevant benchmarks and examples adjusted to test the new routing system.
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 introduces a significant and valuable refactoring of the routing mechanism, moving from string-based routes to a more efficient and type-safe system based on headers with interface, route, and entry IDs. The changes are extensive, touching core logic, client generation, and numerous examples and tests to adopt the new protocol. My review focuses on the correctness and consistency of this new implementation. I've identified a performance regression in the message header encoding, a leftover debug print in a test, a disabled test for an important edge case, and some inconsistencies in test data. Overall, this is a solid improvement for the project's architecture.

@vobradovich vobradovich merged commit f37f086 into master-idl-v2 Jan 16, 2026
3 checks passed
@vobradovich vobradovich deleted the vo/idl-v2-macros-client branch January 16, 2026 14:25
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.

4 participants