Skip to content

Conversation

@daymxn
Copy link
Member

@daymxn daymxn commented Oct 10, 2025

This PR fixes a minor bug I came across in the ProtoDuration decoding. It's not a emergency release worthy bug, but it can produce an incorrect nanosecond value (ie; instead of 123000000 it currently produces 123). In practicality, this means that within LiveServerGoingAwayNotice, the timeLeft field could be off by +-1 second.

Tests have been added for ProtoDuration as well, to help avoid this in the future.

@daymxn daymxn requested review from andrewheard and ncooke3 October 10, 2025 22:30
@daymxn daymxn self-assigned this Oct 10, 2025
@gemini-code-assist
Copy link
Contributor

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

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.

@daymxn daymxn requested a review from ncooke3 October 13, 2025 16:24
@ncooke3
Copy link
Member

ncooke3 commented Oct 13, 2025

/gemini review

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 correctly fixes a bug in ProtoDuration decoding where the fractional part of a second was misinterpreted. The addition of unit tests is also a great improvement to prevent future regressions. My review includes a suggestion to use Decimal instead of Double for the nanosecond calculation to make it more robust against floating-point inaccuracies. I've also added some minor suggestions to improve the new tests by specifying accuracy for floating-point comparisons.

@daymxn daymxn merged commit d62802a into main Oct 13, 2025
51 checks passed
@daymxn daymxn deleted the dlr/fix-protoduration-bug branch October 13, 2025 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants