chore(policy): List rpc search validation tests - #3612
Conversation
🤖 I have created a release *beep* *boop* --- ## [0.33.0](protocol/go/v0.32.0...protocol/go/v0.33.0) (2026-06-12) ### ⚠ BREAKING CHANGES * **policy:** DSPX-2998 add namespace fields to resource mapping protos ([#3565](#3565)) ### Features * **authz:** make v2 request limits configurable ([#3508](#3508)) ([9d16f80](9d16f80)) * **core:** Add search term information to protos. ([#3547](#3547)) ([40f35df](40f35df)) * **policy:** DSPX-2998 add namespace fields to resource mapping protos ([#3565](#3565)) ([e4a04ed](e4a04ed)) ### Bug Fixes * **ci:** Prefer go.work for toolchain info ([#3285](#3285)) ([3c05b22](3c05b22)) * **deps:** bump the external group across 1 directory with 4 updates ([#3494](#3494)) ([5b87b2b](5b87b2b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: opentdf-automation[bot] <149537512+opentdf-automation[bot]@users.noreply.github.com>
1.) Set `min_len` of search term to 1 when the field is present 2.) Remove `Search` from `ListRegisteredResourceValues` and `ListObligationTriggers` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Enforced minimum length validation for search terms to prevent empty searches. * Fixed field numbering conflicts in request messages. * **Refactor** * Updated request schemas to improve pagination handling in policy service requests. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Signed-off-by: Chris Reed <creed@virtru.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello, 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 enhances the robustness of search functionality across multiple List RPCs by introducing strict validation rules for search terms. By enforcing a minimum length on the search term, the system ensures that invalid or empty search queries are rejected early. The changes include updates to protocol buffer definitions, expanded test suites to verify these validation rules, and cleanup of generated documentation. Highlights
New Features🧠 You can now enable Memory (public preview) 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. Ignored Files
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 the 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 counterproductive. 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. A search term must have some length, To give our validation strength. No empty strings allowed to pass, We keep our data clean, alas. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates the search term in selectors.proto to enforce a minimum length of 1, removes the search field from ListObligationTriggersRequest and ListRegisteredResourceValuesRequest, and adds corresponding validation tests. Feedback suggests adding a pattern constraint to the search term to prevent whitespace-only inputs and removing an extra empty line in obligations.proto left after the field removal.
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.
Benchmark results, click to expandBenchmark authorization.GetDecisions Results:
Benchmark authorization.v2.GetMultiResourceDecision Results:
Benchmark Statistics
Bulk Benchmark Results
TDF3 Benchmark Results:
|
|
Summary
Adds proto validation coverage for
policy.Searchon each List RPC that supports search.Changes
ListNamespacesRequestsearch validation to include the empty-search failure case.