chore: add Value depth level guard#15778
Conversation
diegomarquezp
commented
Nov 18, 2025
- chore: add Value depth level guard
- chore: add tests
Summary of ChangesHello @diegomarquezp, 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 introduces a crucial safeguard to the Highlights
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request introduces a depth guard to prevent stack overflows from deeply nested Value objects, which is a valuable defensive programming measure. The implementation correctly adds a depth parameter to the recursive validation functions and performs the necessary checks. Additionally, the tests have been improved to be more specific about error messages, and a new test case for the depth limit has been added. I have two suggestions for improvement: one to address duplicated code which violates the repository's style guide, and another to correct a confusing error message that appears to be a copy-paste error.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15778 +/- ##
=======================================
Coverage 92.94% 92.94%
=======================================
Files 2454 2454
Lines 226878 226919 +41
=======================================
+ Hits 210879 210921 +42
+ Misses 15999 15998 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…/diegomarquezp/google-cloud-cpp into bigtable-sql/value-recurse-guard