Skip to content

fix: remove duplicate empty-string alternative in continuation_token regex#249

Open
Siddhant-K-code wants to merge 1 commit intoopenfga:mainfrom
Siddhant-K-code:fix/duplicate-empty-string-continuation-token-regex
Open

fix: remove duplicate empty-string alternative in continuation_token regex#249
Siddhant-K-code wants to merge 1 commit intoopenfga:mainfrom
Siddhant-K-code:fix/duplicate-empty-string-continuation-token-regex

Conversation

@Siddhant-K-code
Copy link
Member

@Siddhant-K-code Siddhant-K-code commented Mar 15, 2026

What

Removes a redundant ^$| in the continuation_token validation pattern for ListStoresRequest.

Why

The pattern on line 1838 was:

^$|^$|^[A-Za-z0-9-_]+={0,2}$

All other continuation_token fields in the file use:

^$|^[A-Za-z0-9-_]+={0,2}$

The duplicate ^$| is functionally equivalent but inconsistent with the rest of the file.

Impact

No behavioral change — the regex matches the same set of strings. This is a consistency fix only.

Closes #245

Summary by CodeRabbit

Release Notes

  • Chores
    • Simplified validation logic for continuation tokens in store listing operations with no behavioral changes.

@Siddhant-K-code Siddhant-K-code requested a review from a team as a code owner March 15, 2026 05:44
Copilot AI review requested due to automatic review settings March 15, 2026 05:44
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Mar 15, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: Siddhant-K-code / name: Siddhant Khare (b334c7d)

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 15, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 949ff908-c735-4565-b7c1-e9ca84ba1c25

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

Removes a redundant empty-string alternative from the ListStoresRequest.continuation_token validation regex pattern in the proto file. The pattern changes from "^$|^$|^[A-Za-z0-9-_]+={0,2}$" to "^$|^[A-Za-z0-9-_]+={0,2}$", maintaining identical behavior while eliminating duplication.

Changes

Cohort / File(s) Summary
Proto Validation Rule Cleanup
openfga/v1/openfga_service.proto
Removed redundant empty-string alternative (`^$

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removing a duplicate empty-string alternative from the continuation_token regex pattern in the proto file.
Linked Issues check ✅ Passed The PR successfully addresses issue #245 by removing the duplicate '^$|' from the continuation_token validation pattern, making it consistent with other fields.
Out of Scope Changes check ✅ Passed The change is narrowly focused on the single redundant pattern fix in ListStoresRequest, with no extraneous modifications to unrelated code.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Siddhant-K-code Siddhant-K-code force-pushed the fix/duplicate-empty-string-continuation-token-regex branch from 005118f to a7ffbd6 Compare March 15, 2026 05:45
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR cleans up a redundant empty-string alternative in the continuation_token validation regex for ListStoresRequest in the OpenFGA v1 service proto, aligning it with the pattern used by other continuation token fields in the same file.

Changes:

  • Remove the duplicated ^$| alternative from the continuation_token validation regex in ListStoresRequest.
  • Standardize the regex to match the existing ^$|^[A-Za-z0-9-_]+={0,2}$ pattern used elsewhere.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@Siddhant-K-code Siddhant-K-code force-pushed the fix/duplicate-empty-string-continuation-token-regex branch from a7ffbd6 to 567d71a Compare March 15, 2026 05:47
…regex

The ListStoresRequest.continuation_token validation pattern had a
redundant '^$|' prefix, making it '^$|^$|^[A-Za-z0-9-_]+={0,2}$'
instead of '^$|^[A-Za-z0-9-_]+={0,2}$' like all other continuation_token
fields in the file.
@Siddhant-K-code Siddhant-K-code force-pushed the fix/duplicate-empty-string-continuation-token-regex branch from 567d71a to b334c7d Compare March 15, 2026 05:49
string continuation_token = 2 [
json_name = "continuation_token",
(validate.rules).string.max_bytes = 5120,
(validate.rules).string.pattern = "^$|^$|^[A-Za-z0-9-_]+={0,2}$",
Copy link
Member Author

Choose a reason for hiding this comment

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

primary change, rest of the changes are auto-generated code changes

Copy link

@senojj senojj left a comment

Choose a reason for hiding this comment

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

Change properly addresses the intent.

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.

Fix duplicate empty-string alternative in continuation_token regex

3 participants