Skip to content

feat: Remove the max contextual tuple limit validation - #267

Open
OsmanMElsayed wants to merge 1 commit into
openfga:mainfrom
OsmanMElsayed:feat/configurable-contextual-tuple-limit
Open

OsmanMElsayed wants to merge 1 commit into
openfga:mainfrom
OsmanMElsayed:feat/configurable-contextual-tuple-limit

Conversation

@OsmanMElsayed

@OsmanMElsayed OsmanMElsayed commented Oct 19, 2026 •

Copy link
Copy Markdown

Description

What problem is being solved?

How is it being solved?

  • Make the contextual tuples limit configurable

What changes are made to solve it?

  • Remove the contextual tuple cap in the protobufs

References

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • [] The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

Summary by CodeRabbit

  • Bug Fixes
    • Requests involving contextual tuples are no longer rejected solely for exceeding a 100-item limit. Validation of each tuple remains in place.
    • Clarified that nonzero NullValue values are invalid and that ProtoJSON represents the value as null, which round-trips to zero.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6c9a3c8d-8cf2-4e1f-bffe-6f854b96d5e6
📥 Commits

Reviewing files that changed from the base of the PR and between c0650ce and c168df3.

⛔ Files ignored due to path filters: 2
  • proto/openfga/v1/openfga.pb.go is excluded by !**/*.pb.go
  • proto/openfga/v1/openfga_service.pb.go is excluded by !**/*.pb.go
📒 Files selected for processing: 6
  • docs/openapiv2/apidocs.swagger.json
  • docs/openapiv3/apidocs.openapi.json
  • openfga/v1/openfga.proto
  • openfga/v1/openfga_service.proto
  • proto/openfga/v1/openfga.pb.validate.go
  • proto/openfga/v1/openfga_service.pb.validate.go
💤 Files with no reviewable changes: 2
  • proto/openfga/v1/openfga.pb.validate.go
  • proto/openfga/v1/openfga_service.pb.validate.go

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The API definitions, generated validators, and OpenAPI documents no longer limit contextual tuple lists to 100 items. The OpenAPI descriptions for NullValue now document invalid nonzero values and ProtoJSON round-trip behavior.

Changes

API contract updates

Layer / File(s) Summary
Contextual tuple limits and schema documentation
openfga/v1/openfga.proto, openfga/v1/openfga_service.proto, proto/openfga/v1/openfga*.pb.validate.go, docs/openapiv2/apidocs.swagger.json, docs/openapiv3/apidocs.openapi.json
Removed the 100-item limit from contextual tuple definitions and validation. Updated the OpenAPI descriptions for NullValue to document its sentinel representation, invalid nonzero values, and ProtoJSON round-trip behavior.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Feature

Suggested reviewers: willvedd

Merge Risk: ⚪ Minimal · up to c168d

The change consistently removes the contextual-tuple cap from the API definitions and documentation. No actionable merge-blocking issue is established.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: removing the maximum contextual tuple limit validation.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (4 skipped: 4 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

🔧 Buf (1.73.0)
openfga/v1/openfga.proto

fatal: unable to access 'https://github.com/openfga/api.git/': Failed to connect to github.com:443 over proxy 127.0.0.1 after 0 ms: Could not connect to server
fatal: could not fetch ccdd82e7afedd5b00fd89f4eadef5df58f706067 from promisor remote

CODERABBIT_BUF_COMPATIBILITY_PHASE=materialize-base

openfga/v1/openfga_service.proto

fatal: unable to access 'https://github.com/openfga/api.git/': Failed to connect to github.com:443 over proxy 127.0.0.1 after 0 ms: Could not connect to server
fatal: could not fetch ccdd82e7afedd5b00fd89f4eadef5df58f706067 from promisor remote

CODERABBIT_BUF_COMPATIBILITY_PHASE=materialize-base

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.

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.

1 participant